Hi folks I am using ros noetic and i have to create 12 file name as x.bag and x ranging upto 12. code is following.
import rospy
import os
for x in range(12):
cmd='rosbag record -o /home/mubashir/catkin_ws/src/germany1_trush/rosbag/x.bag /web_cam --duration 5 '
os.system(cmd)
how I get vlaue of x in cmd.
creating 12 file of 5sec duration using os.while having different name i am not able to acess value of x inside cmd