Can't run Sphero Gazebo Sim (Solved: use gui:=true)

Following the ROS Basics in 5 Days - Sphero Project, I ran “roslaunch sphero_gazebo main.launch” in the terminal and then opened up Gazebo. However, the simulation does not appear at all in Gazebo, despite no errors in the terminal. What’s wrong?

Hi Anaam,

Could you please tell us where you are running the command exactly? What specific notes are you following for running that command?

You mentioned that you were in the Sphero Project unit of the course, but it seems you are running the ROSDS environment (because that’s where you need to open Gazebo manually).

Some screenshots will also help here.

Thanks for your reply. I am running it in the ROSDS environment because I want to make my own rosject with it. As shown below, the notes simply say to open a new empty Shell, enter the command, and manually open Gazebo.

Screenshot 2023-08-22 092717
Screenshot 2023-08-22 092740

But here are my results.

user:~$ roslaunch sphero_gazebo main.launch… logging to /home/user/.ros/log/1db5b3f4-4108-11ee-974d-0242ac130007/roslaunch-1_xterm-1640.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; pleaseuse xacro instead
started roslaunch server http://1_xterm:42403/

SUMMARY

========

PARAMETERS

  • /robot_description: <?xml version="1…
  • /robot_state_publisher/publish_frequency: 10.0
  • /rosdistro: kinetic
  • /rosversion: 1.12.14
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [1668]
ROS_MASTER_URI=http://1_xterm:11311

setting /run_id to 1db5b3f4-4108-11ee-974d-0242ac130007
process[rosout-1]: started with pid [1681]
started core service [/rosout]
process[gazebo-2]: started with pid [1684]
process[robot_state_publisher-3]: started with pid [1686]
process[urdf_spawner-4]: started with pid [1693]
SpawnModel script started
[INFO] [1692721372.349273, 0.000000]: Loading model XML from ros parameter
[INFO] [1692721372.351277, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1692721385.272128990]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1692721385.272855063]: waitForService: Service [/gazebo/set_physics_properties] hasnot been advertised, waiting…
[ INFO] [1692721398.190559969, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1692721398.231863695, 0.061000000]: Physics dynamic reconfigure ready.
[INFO] [1692721398.272744, 0.100000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1692721398.344995, 0.135000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1692721398.459663679, 0.135000000]: Starting plugin DiffDrive(ns = //)
[ WARN] [1692721398.459789675, 0.135000000]: DiffDrive(ns = //): missing default is na
[ INFO] [1692721398.473328918, 0.135000000]: DiffDrive(ns = //): <tf_prefix> =
[ WARN] [1692721398.473523853, 0.135000000]: DiffDrive(ns = //): missing default is false
[ WARN] [1692721398.473814426, 0.135000000]: DiffDrive(ns = //): missing default is 0
[ WARN] [1692721398.473864555, 0.135000000]: DiffDrive(ns = //): missing default is 5
[ WARN] [1692721398.474677108, 0.135000000]: GazeboSpheroController Plugin (ns = ) missing , defaults to 1
[ INFO] [1692721398.475800146, 0.135000000]: DiffDrive(ns = //): Advertise joint_states!
[ INFO] [1692721398.476818850, 0.135000000]: DiffDrive(ns = //): Try to subscribe to /cmd_vel!
[ INFO] [1692721398.481197697, 0.135000000]: DiffDrive(ns = //): Subscribe to /cmd_vel!
[ INFO] [1692721398.482051627, 0.135000000]: DiffDrive(ns = //): Advertise odom on /odom !
[ INFO] [1692721398.568228572, 0.135000000]: imu plugin missing , defaults to 0s
[ INFO] [1692721398.568285088, 0.136000000]: imu plugin missing , defaults to 0s
[ INFO] [1692721398.568328446, 0.136000000]: imu plugin missing , defaults to
[urdf_spawner-4] process has finished cleanly
log file: /home/user/.ros/log/1db5b3f4-4108-11ee-974d-0242ac130007/urdf_spawner-4*.log

I’m afraid this project may have been discontinued and may no longer supported. If you are taking the ROS Basics in 5 Days course (Python or C++ version), the project of interest here is the Real Robot Project, which is specified at the end of the Understanding ROS Topics - Subscribers unit.

I’m not sure what the problem could be in this case, but keep in mind that other things may not work in that project, and we may not be able to support it.

Hi @anaam.mostafiz,

I just cloned your rosject, and tried the command.

For me, at first it didn’t open the gzclient (the graphical visualization of the simulation)

But then I used the gui:= true argument, and the simulation appeared as expected.

This is the command I used:

roslaunch sphero_gazebo main.launch gui:=true

Below we have my screenshot:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.