Gazebo | Ignition | Community
Ask Your Question
0

Cannot teleop turtlebot3 with ROS melodic in Ubuntu 18

asked 2020-06-12 09:17:18 -0500

teshansj gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

Comments

Check that ros-melodic-gazebo-ros-pkgs is installed.

nlamprian gravatar imagenlamprian ( 2020-06-12 16:21:01 -0500 )edit

That was the problem. Thank you. Please add it as an answer

teshansj gravatar imageteshansj ( 2020-06-13 04:19:46 -0500 )edit

I am having the same problem. Once you solved it in what topic did you publish so as to make the robot move? Oh found it. it was cmd_vel

KansaiRobot gravatar imageKansaiRobot ( 2021-03-07 06:48:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-13 07:05:44 -0500

Judging from the topic list, the gazebo plugins are not running, which means they were not found when loading the turtlebot model. Install the ros-melodic-gazebo-ros-pkgs package.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-12 09:17:18 -0500

Seen: 5,435 times

Last updated: Jun 13 '20