parameter_bridge with collection of topic in command line on ROS2 FOXY
Question,
I wanted to run ros2 run ros_ign_bridge parameter_bridge in the command line on ros2 foxy.
So, my topic list look like this:
'/model/freenove_smart_car/cmd_vel@geometry_msgs/msg/Twist@ignition.msgs.Twist',
'/model/freenove_smart_car/odometry@nav_msgs/msg/Odometry@ignition.msgs.Odometry',
'/ultrasonic0@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan',
'/IR1/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/IR2/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/IR0/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/S0@std_msgs/msg/Float64@ignition.msgs.Double',
'/S1@std_msgs/msg/Float64@ignition.msgs.Double',
'/M0@std_msgs/msg/Float64@ignition.msgs.Double',
'/M1@std_msgs/msg/Float64@ignition.msgs.Double',
'/M2@std_msgs/msg/Float64@ignition.msgs.Double',
'/M3@std_msgs/msg/Float64@ignition.msgs.Double',
'/model/freenove_smart_car/battery/linear_battery/state@sensor_msgs/msg/BatteryState@ignition.msgs.BatteryState'
Those topics are from ignition Fortress or real life freenove smart car.
So, when I ran it in the command line like this;
`ros2 run ros_ign_bridge parameter_bridge '/model/freenove_smart_car/cmd_vel@geometry_msgs/msg/Twist@ignition.msgs.Twist',
'/model/freenove_smart_car/odometry@nav_msgs/msg/Odometry@ignition.msgs.Odometry',
'/ultrasonic0@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan',
'/IR1/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/IR2/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/IR0/image@sensor_msgs/msg/Image@ignition.msgs.Image',
'/S0@std_msgs/msg/Float64@ignition.msgs.Double',
'/S1@std_msgs/msg/Float64@ignition.msgs.Double',
'/M0@std_msgs/msg/Float64@ignition.msgs.Double',
'/M1@std_msgs/msg/Float64@ignition.msgs.Double',
'/M2@std_msgs/msg/Float64@ignition.msgs.Double',
'/M3@std_msgs/msg/Float64@ignition.msgs.Double',
'/model/freenove_smart_car/battery/linear_battery/state@sensor_msgs/msg/BatteryState@ignition.msgs.BatteryState'
Obviously, it didn't work. So when I run with one topic, it works well. When I run with two topics, the first topic failed and the last topic is working properly.
So, the question is how do you pass the collection of topic to the command line? Just more than one topic, actually.
Thank you so much for your time!
Asked by kak13 on 2022-03-09 15:21:16 UTC
Answers
i solved it by creating a yaml file(galactic)..
topics:
-
topic: /tf
type: tf2_msgs/msg/TFMessage
queue_size: 1
-
topic: /depth_scan
type: sensor_msgs/msg/LaserScan
queue_size: 1
rosparam load bridge.yaml && source /opt/ros/galactic/setup.bash && ros2 run ros1_bridge parameter_bridge
Asked by iimata on 2022-08-17 05:26:32 UTC
Comments
Just a note for future readers - earlier in the question was ROS 2 Foxy, here you have ROS 2 Galactic
Asked by ljaniec on 2022-08-17 06:46:23 UTC
Comments
did u solve the problem? im facing the same problem
Asked by iimata on 2022-08-17 05:10:52 UTC