Problem after namespacing several turtlebot 2 (node subscription warning?)

asked 2020-02-11 04:02:38 -0600

hjoonl gravatar image

updated 2020-02-11 04:22:22 -0600

gvdhoorn gravatar image

Hi guys, I have been trying to run several turtlebot 2 robots on ubuntu 16.04 and ROS Kinetic for the past several weeks. I had only managed to run a single robot using keyboard teleop. The problem occurred as I tried to connect multiple robots, using a single master under separate namespaces.

Now I can't run a single turtlebot using keyboard_teleop. The linear and angular velocities seem to change just fine, but my turtlebot doesn't move at all. Keyop works just fine on the contrary. I'm wondering if this is because the node subscriptions are all messed up, for some reasons that I do not understand.

After running roswtf, I get a warning that says:

WARNING** The following node subscripts are unconnected:

* /mobile_base_nodelet_manager:
   * /cmd_vel_mux/input/teleop
   * /cmd_vel_mux/input/switch
   * /mobile_base/commands/motor_power


Apparently I don't have enough points to upload a screenshot. I'm wondering whether I should just reinstall everything or fix those subscriptions. I would greatly appreciate your help!!

edit retag flag offensive close merge delete


Can you show your launch files please ? It looks like you have a namespace for each turtlebot but you launch the keyboard teleop node without specifying one for it, that's would explain why the topics aren't connected.

Delb gravatar image Delb  ( 2020-02-11 04:48:11 -0600 )edit

The following is my keyboard_teleop.launch

<launch> <!-- turtlebot_teleop_key already has its own built in velocity smoother --> <node pkg="turtlebot_teleop" type="turtlebot_teleop_key" name="turtlebot_teleop_keyboard" output="screen"> <param name="scale_linear" value="0.5" type="double"/> <param name="scale_angular" value="1.5" type="double"/> <remap from="turtlebot_teleop_keyboard/cmd_vel" to="cmd_vel_mux/input/teleop"/> </node> </launch>

In my effort to fix the problem, I removed the ROS_NAMESPACE in .bashrc and restored all alterations in all launch files, so I'm not sure if namespace is still an issue while launching keyboard_teleop

hjoonl gravatar image hjoonl  ( 2020-02-11 05:18:19 -0600 )edit

Please edit your question instead of commenting to add the launch files. Also, we need the launch files where you launch the turtlebot nodes too, not simply the keyboard_teleop.launch. The output of rostopic list might also be helpful.

Delb gravatar image Delb  ( 2020-02-12 04:47:10 -0600 )edit