ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosbag_v2 loop problem

asked 2021-06-10 08:44:04 -0600

mfatih gravatar image

Hi everyone; I am using Ubuntu 20.04 and installed Foxy and Noetic on my computer. I wanted to use a rosbag file in my environment and my main middle framework is Foxy and therefore, I installed ros-foxy-rosbag2-bag-v2-plugins to run rosbag files on ROS2. This tool works well. But, since the rosbag file is too short, I want to loop this file and obtain an appropriate simulation environment. When I used ros2 bag play -l rosbag_v2 for looping, I got the error: usage:

ros2 bag play [-h] [-s STORAGE] [--read-ahead-queue-size READ_AHEAD_QUEUE_SIZE] [-r RATE] [--topics TOPICS [TOPICS ...]] [--qos-profile-overrides-path QOS_PROFILE_OVERRIDES_PATH] [-l]
                     [--remap REMAP [REMAP ...]]
                     bag_file
ros2 bag play: error: argument bag_file: Bag file 'rosbag_v2' does not exist!

What is the reason of this error?

edit retag flag offensive close merge delete

Comments

Shouldn't you include the .bag extension?

gvdhoorn gravatar image gvdhoorn  ( 2021-06-10 09:45:27 -0600 )edit

You might be forgetting the .bag extension, as @gvdhoorn suggested

aprotyas gravatar image aprotyas  ( 2021-06-10 11:18:37 -0600 )edit

@gvdhoorn and @aprotyas Yes, its full name is rosbag_v2. It is not bag file, it is tool to play rosbag files on ROS2.

mfatih gravatar image mfatih  ( 2021-06-11 09:44:02 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-11 09:41:28 -0600

mfatih gravatar image

I fixed this by changing the place of -l command. I placed it in front of the bag file like that ros2 bag play -s rosbag_v2 -l <bag file>.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-06-10 08:44:04 -0600

Seen: 1,206 times

Last updated: Jun 10 '21