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

Ros1 to ros2 bridge a specific topics

asked 2022-08-15 14:39:43 -0600

iimata gravatar image

Hello, Is there any way to bridge a specific topic

Like I'm using a kinect camera to generate a laser scan data

When I run the bridge there are a big delay in the laser scan data Close to 1 fps

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-08-16 09:35:42 -0600

msmcconnell gravatar image

The most direct way would be to use the parameter_bridge instead of the dynamic_bridge https://github.com/ros2/ros1_bridge#e...

The above instructions ^ will work with the ros1_bridge provided by your ROS distribution.

In my own work, I found the separation of the two to be a bit limiting and instead manually combined the parameter_bridge and dynamic_bridge in my team's fork. https://github.com/usdot-fhwa-stol/ro... (ROS2 foxy). Launched with

rosparam load bridge.yml && source /opt/ros/foxy/setup.bash && ros2 run ros1_bridge dynamic_bridge

To use my fork you would need to compile it following the ros1_bridge instructions. The bridge.yml file takes precedence over the dynamic behavior.

edit flag offensive delete link more

Comments

first, thank u bro for you help

  • i tried to bridge my laserscanner data and i got this error

    [INFO] [1660674982.068587236] bridge for topic /depth_scan

    failed to create bidirectional bridge for topic '/depth_scan' with ROS 2 type 'sensor_msgs/LaserScan': No template specialization for the pair

    Trying to create bridge for ROS 2 service '/depthimage_to_laserscan/get_loggers' with type 'roscpp/GetLoggers'

    failed to create bridge ROS 1 service '/depthimage_to_laserscan/get_loggers' no conversion for type 'roscpp/GetLoggers'

    Trying to create bridge for ROS 1 service '/add_two_ints' with type 'example_interfaces/srv/AddTwoInts'

    failed to create bridge ROS 2 service '/add_two_ints' no conversion for type 'example_interfaces/srv/AddTwoInts'

iimata gravatar image iimata  ( 2022-08-16 13:38:09 -0600 )edit

@mh-ta: I wonder if you need to compile your IDL files with ros1_bridge first. I have found the ros1_bridge working all right this way.

ravijoshi gravatar image ravijoshi  ( 2022-08-16 21:15:26 -0600 )edit

its work fine bro .. but im using kinect camera to generate a laser scan data, the camera launch file generates alot of topics that i dont need such as(/camera/depth/image_raw)which it has a heavy data to bridge, and it is making alot of lag

iimata gravatar image iimata  ( 2022-08-17 04:38:22 -0600 )edit

i solved the problem, i wrote the ros1 type topic it has to be a ros2 type

iimata gravatar image iimata  ( 2022-08-17 05:15:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-08-15 14:39:43 -0600

Seen: 715 times

Last updated: Aug 16 '22