How can I install rosbag2 plugin in ros2 foxy

672 views Asked by At

I am trying to install ros2bag plugin, while doing this I am encountering with this error.

Starting >>> ros1_rosbag_storage_vendor
Finished <<< ros1_rosbag_storage_vendor [1.05s]                  
Starting >>> rosbag2_bag_v2_plugins
--- stderr: rosbag2_bag_v2_plugins                         
CMake Error at CMakeLists.txt:28 (message):
  Failed to find ROS 1 roscpp, cannot build.


---
Failed   <<< rosbag2_bag_v2_plugins [0.74s, exited with code 1]
                                
Summary: 1 package finished [2.02s]
  1 package failed: rosbag2_bag_v2_plugins
  1 package had stderr output: rosbag2_bag_v2_plugins

Can someone please help me.

I tried using git clone and then colcon build

1

There are 1 answers

3
Aposhian On

You need to install ROS 1.

It looks like rosbag2_bag_v2_plugins is looking for its dependency roscpp

This means that you don't have ROS 1 (properly) installed. As is mentioned is a requirement here.

If you install rosbag2_bag_v2_plugins from the bloomed debian package like ros-humble-rosbag2-bag-v2-plugins (on Ubuntu), it will automatically install what you need from ros-noetic-*. But since you are doing it from source, and since rosdep can't help you, you need to install ROS 1 manually as as a separate step.