Is it possible to remap /camera/color topics in realsense2_camera
I am working with a realsense camera (relasense2_camera package), such that I need to remap the /my_namespace/camera/color/*
topics to /my_namespace/camera/rgb/*
. I have tried with a launch file as below:
<launch>
<group ns="my_namespace">
<remap from="/my_namespace/camera/color" to="/my_namespace/camera/rgb" />
<remap from="/my_namespace/camera/depth/image_rect_raw" to="/my_namespace/camera/depth/image_rect" />
<include file="$(find realsense2_camera)/launch/rs_rgbd.launch">
<arg name="namespace" value="camera"/>
<arg name="rgb" value="rgb"/>
</include>
</group>
</launch>
Nevertheless, when launching the file and checking the rostopic list outuput, I noted those topic didn't change. Is it possible to remap them?
From my launch file, the second remap (from="/my_namespace/camera/depth/image_rect_raw" to="/my_namespace/camera/depth/image_rect"
) works well.
Thank you
Are you sure you actually have a topic /my_namespace/camera/color when doing rostopic list ? (and without the remapping obviously).
Also this (
<arg name="namespace" value="camera"/>
) shouldn't work since there are no arguments namespace defined in the launch file (unless you've modified it ?)Hi, it is not actually just a topic but a set of topics. When I do
rostopic list
, the following topics appear (among others):...
...
those are the topics I need to remap (
color
torgb
). About the namespace argument @Delb is right, it seems I used a previous version. After an update it is<arg name="camera" value="camera"/>
now.You can get rid of your first remap, you have to remap a topic but you can't for a set of topics. But you did well setting the arg
rgb
torgb
, its default value iscolor
so I'm not sure why it's not affected correctly.Can you try to replace
<arg name="camera" value="camera"/>
by something like<arg name="camera" value="other_camera"/>
just to see if you will actually get a set of topics like/my_namespace/other_camera/
?Yes, I replaced camera argument to
other_camera
, and all topics changedBut you still have the
/color/
set of topics ? It's weird that when you change the arg camera it works but not with rgb, are you sure you have<arg name="rgb" default="color" />
in your rs_rgbd.launch
? You can even change the default value directly torgb
.