Spectrum is now read-only. Learn more about the decision in our official announcement.


MuSHR is an open-source robotics platform for learning and researching AI with autonomous vehicles.


Cannot move the servo

March 29, 2021 at 3:46pm

Cannot move the servo

March 29, 2021 at 3:46pm
Hi, I am building a Mushr car. I got the BOM and followed the tutorial. I am unable to move the servo to steer the car. I can move it forwards and backwards but my servo commands have no effect. Any clue?

March 29, 2021 at 4:24pm
Hi (akin1) - Could you try the following:
  1. Launch the robot: roslaunch mushr_base teleop.launch
  2. Echo the drive commands: rostopic echo /mux/ackermann_cmd_mux/output
  3. Hold down L1 and move the right joy stick to the left and right
From the console where you ran the rostopic command, do you see any non-zero values in the 'steering' field?
Also, if you instead hold down L1 and move the right joy stick up and down, do you see any non-zero values in the steering field?
I only launch vesc.launch and publish directly to /commands/servo/position. /commands/motor/position works I can see the wheels turning. /commands/servo/position doesn't work.
A few more questions:
  1. What range of values are you publishing to /commands/servo/position?
  2. Have you double checked that you installed the correct vesc firmware, i.e. bldc-tool/firmwares/hw_410_411_412/VESC_servoout.bin
  3. Have you double checked that your servo is connected to the VESC correctly? Particularly that the colors of the wires match correctly and that they are making solid electrical contact with each other?
  1. Between 0 and 1.0
  1. Yes I make sure that I uploaded the correct firmware. 3. I think the colors match. I will check if there is a contact issue
yes there is a solid contact
Could you check what the publish rate to the command topic is with this command: rostopic hz /commands/servo/position.
I am publishing to that topic by hand: rostopic pub /commands/servo/position std_msgs/Float64 0.5
Does the servo move if you do this: rostopic pub -r 10 /commands/servo/position std_msgs/Float64 0.75 Note that I've added an argument so that the message is published at a fixed rate instead of just latched once
:-( no it doesn't. Is there a way to check if vesc is able to control the servo through the vesc tool?
Not that I know of.
Is there a reason that you can't try the procedure I described in my very first response? Trying to replicate your test setup makes it more difficult for me to help you debug.
Sure. I can. I don't have /mux/... topics but /car/mux/... /car/mux/ackermann_cmd_mux/output gives me non zero steering_angle values but 0 steering_angle_velocity. I am using an xbox joystick so the keys are mapped differently. Instead of right joystick I need to use the left trigger

March 30, 2021 at 5:14pm
I see, that means that the VESC should be receiving the steering commands, so that makes me think that it is a hardware issue. Since you've double checked the wiring and I assume you followed the build tutorial, my next guess would be that the servo is somehow broken. If you have an oscilloscope, you could verify this by hooking it up to the servo control output of the VESC and confirming that the pulse width of the PWM signal changes as the steering command is changed. Otherwise I would recommend replacing the servo with a new one to see if the current one has broken. Sorry that I don't have a better solution for you.
yes you are right, it is the servo
I switched back to the original servo and it's steering fine. I guess I have a defective unit :-/
Sorry your servo was defective, but glad you figured it out! Let us know if you have any other questions.