How to add a robot name to the intel realsense plugin?
Hello everyone, I'm new to ROS and I need your help. Sorry for my English.
Plugin and files I am using realsense2_description/urdf/_d435.gazebo.xacro and _d435.urdf.xacro
https://github.com/pal-robotics/reals...
https://github.com/pal-robotics-forks...
I want to post topics to ${robot_name}/camera/... and not in camera/... so that I can create several robots and each has its own topics.
Example:
the first robot name: rob
the second robot name: kiki
Topics:
rob/camera/...
kiki/camera/...
I tried to use remapping but it gave me nothing.
piece of code
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x) -y $(arg y) -z 0.0 -Y $(arg theta) -unpause -urdf -model $(arg robot_name) -param robot_description -b"
respawn="false" output="screen">
<!-- realsense plugin -->
<!-- color -->
<remap from="camera/color/camera_info" to="${arg robot_name}/camera/color/camera_info"/>
<remap from="camera/color/image_raw" to="${arg robot_name}/camera/color/image_raw"/>
<remap from="camera/color/image_raw/compressed" to="${arg robot_name}/camera/color/image_raw/compressed"/>
But the names of the topics remain /camera/color/..., /camera/depth/...
I tried to use tag <robotnamespace> in plugin
<gazebo>
<plugin name="${name}" filename="librealsense_gazebo_plugin.so">
<robotNamespace>${name}</robotNamespace>
<depthUpdateRate>30.0</depthUpdateRate>
<colorUpdateRate>30.0</colorUpdateRate>
<infraredUpdateRate>30.0</infraredUpdateRate>
but I get error "RealSensePlugin: The realsense_camera plugin is attach to model rob Segmentation fault (core dumped)"
What am I doing wrong? I will listen to any suggestion