ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ramapping ros-control controller topic

asked 2020-05-26 22:03:26 -0500

d_joshi gravatar image

updated 2020-05-27 19:42:05 -0500

I am using a force controller integrated with ros-control to control a simulated robot arm. The controller relies on data from an ft sensor publishing to /robot_controller/ft_sensor_wrench. I am using the gazebo ft sensor plugin described here to get ft data. The plugin publishes to a topic called /gazebo_ft_wrench. How do I make the force controller subscribe to /gazebo_ft_wrench rather than /robot_controller/ft_sensor_topic? I have tried to remap using:

<remap from="/robot_controller/ft_sensor_wrench" to="gazebo_ft_wrench" />

in the launch file, before loading the controller using controller_manager, but this does not work.

Edit: Adding the code from my launch file.

1) Adding the remap tag before loading the controller:

<remap from="/robot_controller/ft_sensor_wrench" to="gazebo_ft_wrench" /><node name="robot_controller_spawner" pkg="controller_manager" type="controller_manager" args="load robot_controller" respawn="false" output="screen"/>

2) Adding the remap tag inside the node block (as suggested in the comments):

<node name="robot_controller_spawner" pkg="controller_manager" type="controller_manager" args="load robot_controller" respawn="false" output="screen"><remap from="/robot_controller/ft_sensor_wrench" to="/gazebo_ft_wrench"/></node>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-27 08:54:42 -0500

Dragonslayer gravatar image

Please post your launchfile. For me it works like this.

example:

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"> <remap from="/joint_states" to="/rrbot/joint_states"/> </node>

edit flag offensive delete link more

Comments

I tried putting the remap statement inside the node tag as suggested. This does not work though.

d_joshi gravatar image d_joshi  ( 2020-05-27 20:01:53 -0500 )edit

Without the complete files its difficult to say whats wrong, maybe read link text, I dont see how you actually give the conroller args to controller_manager. Maybe the controllers arent even loading. Could you post a "rostopic list" and "rostopic info" of the relevant topics?

Dragonslayer gravatar image Dragonslayer  ( 2020-05-28 08:12:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-05-26 22:03:26 -0500

Seen: 245 times

Last updated: May 27 '20