Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rover: Walking robot support #14884

Closed
wants to merge 12 commits into from

Conversation

ashvath100
Copy link
Contributor

@ashvath100 ashvath100 commented Jul 22, 2020

This PR adds support for walking robots

Demo video

Steps to run simulation :

  1. Ensure the PC is runing Ubuntu 18.04 (other versions may work but this has not been confirmed yet)

  2. pip3 install pybullet

  3. cd to the ardupilot/Rover directory

  4. create a "scripts" directory and copy "/libraries/AP_Scripting/examples/quadruped.lua" into it

  5. start SITL using, "../Tools/autotest/simvehicle.py --map --console -D -f JSON"

  6. Enable scripting with "param set SCR_ENABLE 1" and then restart SITL

  7. Fromardupilot/libraries/SITL/examples/JSON/pybullet/

    run python3 walking_robot.py

Control inputs :

  • Channel 1: Yaw input

  • Channel 3: Throttle input

  • Channel 6: Gait select (switch)
    rc 6 > 1500 : two legs alternating gait
    rc 6 < 1500 : one leg wave gait

  • Channel 7: Control mode selector (3 way switch)
    rc 7 = 1500 : Height control
    rc 7 >1500 : Rotation control
    rc 7 < 1500 : Position control

In Height control

  • Channel 2: height input

In Rotation control

  • Channel 2: Roll input
  • Channel 4: Pitch input

In Position control

  • Channel 2: X axis input
  • Channel 4: Y axis input

To do:

  1. add Stabilize mode
  2. Hardware testing

@khancyr khancyr added GSoC Google Summer of Code Rover SITL labels Jul 22, 2020
@rmackay9
Copy link
Contributor

Really great to see this PR and video! well done!

Rover/Rover.cpp Outdated Show resolved Hide resolved
Rover/Rover.cpp Outdated Show resolved Hide resolved
Rover/mode.cpp Outdated Show resolved Hide resolved
Rover/mode_manual.cpp Outdated Show resolved Hide resolved
@peterbarker
Copy link
Contributor

peterbarker commented Jul 23, 2020 via email

@ashvath100 ashvath100 force-pushed the walkingrobot_support branch 7 times, most recently from a4f33ab to 159a8da Compare July 29, 2020 21:26
Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that is quite nice ! I have manage to use it.

Some comment, the model should have an arrow or something to show the forward direction.
it is surprisingly auto arming ...
We definitely need to remove the pyrobotlearn dependency.
I will put some comments on lua this afternoon

@rmackay9
Copy link
Contributor

rmackay9 commented Aug 7, 2020

I struggled a bit to get this working. Some key points and instructions:

  1. use Ubuntu 18.04 or higher
  2. sudo apt install python3-pip (to install pip3)
  3. git clone https://github.com/robotlearn/pyrobolearn
  4. cd pyrobolearn
  5. pip3 install numpy cython
  6. pip3 install gpytorch # this is for Python 3.5
  7. pip3 install -e .

In the instructions at the top of this PR, whenever it says type "python" you should actually type "python3"

@rmackay9
Copy link
Contributor

rmackay9 commented Sep 1, 2020

The alternatively PR has gone in so I'll close this one. We will need a new PR with the follow-up fixes.

@rmackay9 rmackay9 closed this Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Google Summer of Code Rover SITL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants