Closed xlla closed 2 years ago
I have created another ubuntu 20.04 server , build ros2 galactic from source, it still failure to run Example 4.
$ ros2 run ros1_bridge parameter_bridge Trying to create bidirectional bridge for topic '/chatter' with ROS 2 type 'std_msgs/msg/String' [INFO] [1650894884.831267657] [ros_bridge]: create bidirectional bridge for topic /chatter Trying to create bridge for ROS 2 service '/add_two_ints' with type 'example_interfaces/srv/AddTwoInts' Created 1 to 2 bridge for service /add_two_ints The parameter 'services_2_to_1' either doesn't exist or isn't an array [INFO] [1650894885.151093541] [ros_bridge]: Passing message from ROS 1 std_msgs/String to ROS 2 std_msgs/msg/String (showing msg only once per type)
I unconsciously run ros1 client with ros2 server on this parameter_bridge, it is work!
So I think the bridge yaml for example 4 was inverted, the corrected should:
topics: - topic: /chatter # ROS1 topic name type: std_msgs/msg/String # ROS2 type name queue_size: 1 # For the publisher back to ROS1 services_2_to_1: - service: /add_two_ints # ROS2 service name type: roscpp_tutorials/TwoInts # The ROS1 type name
see the PR #357
Thanks for catching this! I'll follow up on the PR (:
Merged, https://github.com/ros2/ros1_bridge/pull/357 thanks!!
Bug report
Required Info:
Steps to reproduce issue
exactly as Example 4: bridge only selected topics and services
Expected behavior
as Example 4 described
Actual behavior
bridge create failure, can't call ros1 service from ros2
roscore was running on machine A
launch bridge on machine B
launch ros1 service on machine C
launch ros2 service caller on machine B
ros1 service was launch
ros1 service can be call from ros1 client
Additional information
Feature request
Feature description
Implementation considerations