How to use ros_gz_bridge in roslaunch with conf yaml and readme issue ?
Hi !
- First remark : would there be a typo mistake on the readme page of rosgzbridge ?
I believe, in the equivalence array, all sensor_msgs messages
sensormsgs/BatteryState,sensormsgs/CameraInfo ,sensormsgs/FluidPressure ,sensormsgs/Image ,sensormsgs/Imu ,sensormsgs/JointState, sensormsgs/LaserScan ,sensormsgs/MagneticField ,sensormsgs/NavSatFix ,sensormsgs/PointCloud2
should have an extra /msgs/ in the path to work. Example : sensor_msgs /msgs/ Imu
At least, it works only this way for me and took me a few hours to figure it out.
- Also, I am trying to launch the bridge using a YAML file, like explained in the readme.
My config works well from command line :
ros2 run rosgzbridge parameterbridge --ros-args -p configfile:=/colconws/install/trrbringup/share/trrbringup/config/gzbridge.yaml
But I can't get it work from a roslaunch. It's a simple question of YAML arguments declaration but can't figure it out
I tried :
# Gz Sim-ROS2 Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=[
'--ros-args -p config_file:='+os.path.join(pkg_trr_bringup, 'config', 'gz_bridge.yaml')
],
output='screen'
)
Any idea
Asked by Luczia on 2022-12-23 11:05:15 UTC
Answers
Hey ! A little late but if someone has the same issue :
# Bridge gazebo
ExecuteProcess(
cmd=[FindExecutable(name='ros2'),
'run ros_gz_bridge parameter_bridge --ros-args -p config_file:=YOURPATH/your_file.yaml'
],
output='screen',
shell=True
),
I suppose that's a little messy but there is no documentation for that case and it works so...
Asked by mls on 2023-05-05 08:39:42 UTC
Comments