remapping actionlib topics
I have a node that contains a SimpleActionClient
that subscribes to a hard-coded action name. In my network I have an action server that provides an action of the same type but under a different name. I was trying to remap the node's (client) action name to match the servers name but couldn't get it to work. In general, how do you remap actions via launch files? (e.g., can the client use remapping, do I need to remap all of the individual topics or is the high-level action topic sufficient, etc.)
To be a bit more specific I have the following:
actionlib::SimpleActionClient<control_msgs::FollowJointTrajectoryAction> ac("joint_trajectory_action", true)
and was trying to remap in the launch file node with the following:
<remap to="follow_joint_trajectory" from="joint_trajectory_action"/>
As above, the action client was failing to connect. If I hard-coded the correct name it connects.. Should this remapping work in theory or am I doing something else wrong.
Thanks
just an observation: this is actually accepted practice. Your phrasing made it sound (to me) like this is a bad thing, but imo, making topic/service/action names a parameter is worse. Remapping should always be used for these things.
Sure. I've never done it any other way. Just typing and trying to be specific...
It's not the best example, but remapping individual topics will work: abb_irb120_gazebo/launch/irb120_3_58_gazebo.launch.
Thanks, this works now for me remapping the server's (driver) topics. I was changing a bunch of stuff simultaneously the other day (shame on me) and had trouble getting a client to work with the renaming pushed down into a different namespace.