Joystick Controller Connection

268 views
Skip to first unread message

ya Ho

unread,
May 11, 2020, 7:23:19 AM5/11/20
to Stanford Quadrupeds
Hi, Nathan. Thank you so much for always replying.

We finished making the robot and checked that all the motors were working through motor calibration.

However, when you run the run_robot.py, the joystick normally lights up green, but it doesn't respond when you press L1.
The robot does not move when pressing any buttons on the controller.


Next is the code we executed.





KakaoTalk_20200511_195919552.pngKakaoTalk_20200511_200819278.png

ㅎ로.png





It is not responding.
Can you tell me what the problem is? 
Thank you.

Nathan

unread,
May 11, 2020, 2:38:43 PM5/11/20
to Stanford Quadrupeds
Hi ya ho, fantastic that you got this far. One thing to note is that the "robot.service" service is running run_robot.py behind the scenes, so if you also do "python3 run_robot.py" you'll be running the same code in two different places and that will cause conflicts. I'll try to update the readme to warn about this. After pressing L1, you should notice that the servos become activated. Then, to check if it's working, you can press R1 to enter trotting.

Mr Robot

unread,
May 11, 2020, 3:58:54 PM5/11/20
to Stanford Quadrupeds
I think I had the same problem with the UDPcomms issue I had in the beginning https://groups.google.com/forum/#!topic/stanford-quadrupeds/GO5GPiBUcnc
Did you use the linux image that is recommended?
Message has been deleted
Message has been deleted

ya Ho

unread,
May 11, 2020, 11:03:41 PM5/11/20
to Stanford Quadrupeds
Thanks for your quick reply.
We tried to execute it again based on your reply, but the results are the same. There is still no response when I press L1 and R1 or other buttons.
The following is the result of our retry.

1111.png


2222.png



We installed 'Raspbian Buster with desktop', not the 'Raspbian Buster Lite' version.

3333.png


Is this the problem?
Thank you always.



2020년 5월 12일 화요일 오전 3시 38분 43초 UTC+9, Nathan 님의 말:
Hi ya ho, fantastic that you got this far. One thing to note is that the "robot.service" service is running run_robot.py behind the scenes, so if you also do "python3 run_robot.py" you'll be running the same code in two different places and that will cause conflicts. I'll try to update the readme to warn about this. After pressing L1, you should notice that the servos become activated. Then, to check if it's working, you can press R1 to enter trotting.

On Monday, May 11, 2020 at 4:23:19 AM UTC-7, ya Ho wrote:
Hi, Nathan. Thank you so much for always replying.

We finished making the robot and checked that all the motors were working through motor calibration.

However, when you run the run_robot.py, the joystick normally lights up green, but it doesn't respond when you press L1.
The robot does not move when pressing any buttons on the controller.


Next is the code we executed.





Nathan

unread,
May 12, 2020, 12:49:05 AM5/12/20
to Stanford Quadrupeds
My guess is that the UDPComms library used by the joystick script is conflicting with your version of Raspbian. Several other people had this problem and it basically boiled down the fact that out install script doesn't quite work on the latest version of raspbian, in which case some critical settings aren't set.

Try doing "systemctl status joystick" to check if that is indeed the issue. You can also stop the joystick service with "sudo systemctl stop joystick" and then run it manually with "python3 <TypeYourPupperCommandDirectoryHere>/joystick.py". If UDP comms is in fact raising the issue, you can check out this post for how to manually set the correct network settings: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/stanford-quadrupeds/GO5GPiBUcnc

Mr Robot

unread,
May 12, 2020, 2:45:45 AM5/12/20
to Stanford Quadrupeds

ya Ho

unread,
May 12, 2020, 6:55:35 AM5/12/20
to Stanford Quadrupeds
I solved the joystick problem!
Mr. Robot and Nathan, thank you very much.
You've been very helpful.

We want to control the robot more slowly and smoothly.
Could you tell me where the cord part can be used to control the speed of the motor?

When walking to the 'trot', the position of the motor stands still when the robot stops. Which switch changes the position of the motor to its initial state?

Thank you so much.

ellis....@gmail.com

unread,
Jun 16, 2020, 11:03:51 PM6/16/20
to Stanford Quadrupeds
Could you explain how you solved the problem for those of us with a similar problem?  Thanks!

محمود محمد

unread,
Mar 31, 2024, 9:40:13 PM3/31/24
to Stanford Quadrupeds

Could you explain how you solved the problem for those of us with a similar problem? 

Felix Schambach

unread,
Apr 4, 2024, 12:33:45 PM4/4/24
to Stanford Quadrupeds
Are you using the linux image mentioned above?

Shail Dalal

unread,
Oct 15, 2024, 11:17:56 PM10/15/24
to Stanford Quadrupeds
I had the same issue and decided to not use the service and create a quick ROS2 wrapper where I can run the joy node on my laptop and run just a subscriber on the pi to get the joint angles. It works like a charm. Used the same UDP Comms library to send and receive joint angles. 
Reply all
Reply to author
Forward
0 new messages