Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

I am trying to control a turtlebot3 in gazebo using ROS. I can do this without a problem in Ubuntu 16 ros kinetic (gazebo 7). But I cannot do the same thing with same commands in Ubuntu 18 ros melodic (gazebo 9)

Here's the log shown from roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch in ros melodic

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://xxxxxx:45893/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.5
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [3042]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 331250c0-acb1-11ea-af42-0c5b8f279a64
process[rosout-1]: started with pid [3053]
started core service [/rosout]
process[gazebo-2]: started with pid [3056]
process[gazebo_gui-3]: started with pid [3064]
process[spawn_urdf-4]: started with pid [3070]
[ INFO] [1591968766.435037191]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968766.435766509]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968766.484922295]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968766.485743143]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968766.762218392, 0.003000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591968767.093444620, 0.168000000]: Physics dynamic reconfigure ready.
[spawn_urdf-4] process has finished cleanly
log file: /home/XXXXX/.ros/log/331250c0-acb1-11ea-af42-0c5b8f279a64/spawn_urdf-4*.log

ROS topic list after launching this is as follows

/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg

Here's the log from the same roslaunch in ros kinetic in which this works fine

started roslaunch server http://xxxxxx-l-l:41851/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [8166]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a1193f98-acb1-11ea-8274-8c04ba099a14
process[rosout-1]: started with pid [8179]
started core service [/rosout]
process[gazebo-2]: started with pid [8187]
process[gazebo_gui-3]: started with pid [8207]
process[spawn_urdf-4]: started with pid [8213]
[ INFO] [1591968950.965463454]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968950.965900805]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968950.978686441]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591968950.979178680]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591968951.385803403, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591968951.738905171, 0.163000000]: Laser Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1591968951.738957452, 0.163000000]: Starting Laser Plugin (ns = /)
[ INFO] [1591968951.740414014, 0.163000000]: Physics dynamic reconfigure ready.
[ INFO] [1591968951.740771321, 0.163000000]: Laser Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1591968951.833262130, 0.163000000]: Starting plugin DiffDrive(ns = //)
[ INFO] [1591968951.833336896, 0.163000000]: DiffDrive(ns = //): <rosDebugLevel> = na
[ INFO] [1591968951.834254336, 0.163000000]: DiffDrive(ns = //): <tf_prefix> = 
[ INFO] [1591968951.836164861, 0.163000000]: DiffDrive(ns = //): Advertise joint_states
[ INFO] [1591968951.836952897, 0.163000000]: DiffDrive(ns = //): Try to subscribe to cmd_vel
[ INFO] [1591968951.840035635, 0.163000000]: DiffDrive(ns = //): Subscribe to cmd_vel
[ INFO] [1591968951.840746578, 0.163000000]: DiffDrive(ns = //): Advertise odom on odom 
[ INFO] [1591968951.865549383, 0.185000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591968951.925287635, 0.245000000]: Physics dynamic reconfigure ready.
[spawn_urdf-4] process has finished cleanly
log file: /home/XXXXX/.ros/log/a1193f98-acb1-11ea-8274-8c04ba099a14/spawn_urdf-4*.log

And this is the ROS topic list

/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/gazebo_gui/parameter_descriptions
/gazebo_gui/parameter_updates
/imu
/joint_states
/odom
/rosout
/rosout_agg
/scan
/tf

It seems like ROS related stuff are not running properly in Ubuntu 18 ros melodic. Am I doing anything wrong or what's the issue here?