How to include the ROS_NAMESPACE in the default attribute in a launch file?
Hi,
I am really new to ROS. I have a launch file which has the following written in it: (When there is no ROS_NAMESPACE defined)
<arg name="max_track_error" default="0.2" />
<arg name="cam_image_topic" default="/head_camera/depth_registered/points" />
Now if I define a in the .bashrc: export ROS_NAMESPCE=fetch
I want the launch file to be "equivalent to" the following:
<arg name="max_track_error" default="0.2" />
<arg name="cam_image_topic" default="/fetch/head_camera/depth_registered/points" />
How do I do that, without physically editing the launch file. Can I include some kind of variable or something in the launch file that take the value of the ROS_NAMESPCE (when defined) that will change that default attribute?
and:
would seem to be in conflict with each other.
I don't intend to use both of these methods, either one of the solutions (if there is one) will work. Can you tell me how to do this in the launch file?
I would suggest you look at the answer to this question, where the proper syntax for running a node in a namespace.