Sphero, copy pasted code does not work

Hello, I am doing 11th episode moving the Sphere and I got stuck at Step 2: Use Topics through Services

I have copy pasted the solutions and everything seems to run correctly. When I do ‘rosservice list’, the /crash_direction_service is there. Also the programs run smoothly, when client starts publishing, the server is printing out the data received, otherwise server is quiet.
The imu_topic_subscriber is also copy pasted.

However, when I launch teleop and try to crash the robot into the wall, the robot crashes but it has no effect on the shell output. I have been stuck on this for 5 days at least and I am really wondering, what is wrong, since I have just copy pasted the solution ?

Also, you have typo in the source code in the Server at Step 2:
import rospy
from std_srvs.srv import Trigger, TriggerResponse
from imu_topic_susbcriber import ImuTopicReader

The third line, it is SUB-scriber not sus-briber.

Please, help me overcome this frustration… Is there a place I can find all the working solutions ? I can self-discipline myself to look/not look at solutions… I peeked at 12 episode and there seems to be no solutions ready.

Hi! Were you able to figure out how the “crash” even interacted with the IMU data? there seemed to be no change whatsoever, I’m using teleop to find out how crashes work with IMU before I write the code, but it is not working.

Hello @t.hri and @rik.raut98,

First of all, apologies for the late response. I’ve been doing some tests in the Sphero project and the IMU is not working as expected, as you detected. I suggest you try to complete the Turtlebot project (which works without the Imu) while we solve this issue. Sorry for the inconvenience.


Hey there!
Just to confirm: The Sphero IMU data is still not working right? All the acceleration values are so low, they never reach the threshold value of ‘7’ to register a crash… Could you please give an update about this?

Thank-you in advance.

Hi, I will get in touch with prof @albertoezquerro to see the status of the Sphero IMU

1 Like

Hello @tuan.vu and @roalgoal,

No, the issues with the Sphero simulation have not been solved yet. I think the best option is to disable temporarily this project in order to avoid more users getting into this (and point them to the Turtlebot project instead). We will let you know as soon as the Sphero simulation is working as expected. Sorry for the inconvenience,


1 Like