My turtlebot3 burger do not move when I publish to /cmd_vel

asked 2019-10-23 09:31:27 -0600

oovidiustr gravatar image

Hello!

I have a turtlebot3 burger and I want to play with it. I established ssh connection with robot successfully and I can see /cmd_vel topic when I run rostopic list command.

However, when I try to publish in /cmd_vel the robot do not do anything. I tried to run roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch to control the robot from keyboard but still not working.

This is my .bashrc file:

[...]
export ROS_MASTER_URI=http://192.168.0.201:11311
export ROS_HOSTNAME=192.168.0.100
export TURTLEBOT3_MODEL=burger


source /opt/ros/kinetic/setup.bash
source /home/ovidiu/catkin_ws/devel/setup.bash
source /home/ovidiu/perception_catikin_ws/devel/setup.bash

I use Kinetic ROS on Ubuntu 16.04 LTS.

I don't receive any error in console, just the robot do not move.

Am I missing something?

edit retag flag offensive close merge delete

Comments

Whats the output of rostopic list? do you see a /cmd_vel topic that it might read?

stevemacenski gravatar imagestevemacenski ( 2019-10-23 11:59:55 -0600 )edit

Yes. There are all topics that i can see:

/battery_state
/cmd_vel
/cmd_vel_rc100
/diagnostics
/firmware_version
/imu
/joint_states
/magnetic_field
/motor_power
/odom
/raspicam_node/camera_info
/raspicam_node/image/compressed
/raspicam_node/parameter_descriptions
/raspicam_node/parameter_updates
/reset
/rosout
/rosout_agg
/rpms
/scan
/sensor_state
/sound
/tf
/version_info
oovidiustr gravatar imageoovidiustr ( 2019-10-24 02:32:21 -0600 )edit

What's cmd_vel_rc100? That seems suspiciously what you might need to be publishing to. Check rostopic info on both of the cmd_vel_* topics and make sure that your base is even subscribing to them.

stevemacenski gravatar imagestevemacenski ( 2019-10-24 13:19:59 -0600 )edit

Ok.. Here are the infos about topics:

~$ rostopic info /cmd_vel
Type: geometry_msgs/Twist

Publishers: None

Subscribers: 
 * /turtlebot3_core (http://192.168.0.201:37247/)


~$ rostopic info /cmd_vel_rc100 
Type: geometry_msgs/Twist

Publishers: 
 * /turtlebot3_core (http://192.168.0.201:37247/)

Subscribers: None
oovidiustr gravatar imageoovidiustr ( 2019-10-25 02:17:38 -0600 )edit

I also tried to reinstall ROS but i still have the same problem.

oovidiustr gravatar imageoovidiustr ( 2019-10-25 04:22:35 -0600 )edit

If you look, both topics have no connections. One node is subscribing or publishing, but there's not both nodes in either topic. You need to have someone publishing to the topic the base is subscribing to. Also make sure if you just rostopic pub something that the base actually responds so that things are setup

stevemacenski gravatar imagestevemacenski ( 2019-10-25 11:06:14 -0600 )edit

I tried rostopic pub /cmd_vel [...] and in other console rostopic echo /cmd_vel:

oovidiustr gravatar imageoovidiustr ( 2019-10-28 03:23:55 -0600 )edit

console_1 output:

~$ rostopic pub /cmd_vel geometry_msgs/Twist "linear:
  x: 0.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.5" 
publishing and latching message. Press ctrl-C to terminate
oovidiustr gravatar imageoovidiustr ( 2019-10-28 03:24:12 -0600 )edit