Git Product home page Git Product logo

openquadruped / spot_mini_mini Goto Github PK

View Code? Open in Web Editor NEW
781.0 41.0 166.0 863.07 MB

Dynamics and Domain Randomized Gait Modulation with Bezier Curves for Sim-to-Real Legged Locomotion.

Home Page: https://moribots.github.io/project/spot-mini-mini

License: MIT License

Python 12.72% CMake 0.23% C++ 77.79% Shell 0.25% HTML 9.02%
quadruped locomotion reinforcement-learning pybullet environment ros optimization control open-source quadruped-robot-gaits

spot_mini_mini's People

Contributors

grassjelly avatar moribots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spot_mini_mini's Issues

roslaunch mini_ros spot_move.launch exit code 127

Describe the bug
The launching of the node doesn't do anything

To Reproduce
Steps to reproduce the behavior:

  1. Get everything ready (roscore, joy node)
    2.roslaunch mini_ros spot_move.launch
  2. Nothing happens and the error pops out

Expected behavior
Control robot in simulator with joystick controller

Screenshots
jon@jon-noetic:~/catkin_ws$ roslaunch mini_ros spot_move.launch
... logging to /home/jon/.ros/log/4d0e42a6-cde7-11eb-8559-f11a37245d28/roslaunch-jon-noetic-17165.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://jon-noetic:38909/

SUMMARY

PARAMETERS

  • /rosdistro: noetic
  • /rosversion: 1.15.11
  • /spot_joy/deadzone: 0.05
  • /spot_joy/dev: /dev/input/js0
  • /spot_sm/frequency: 200.0
  • /spot_teleop/axis_angular: 0
  • /spot_teleop/axis_linear_x: 4
  • /spot_teleop/axis_linear_y: 3
  • /spot_teleop/axis_linear_z: 1
  • /spot_teleop/button_estop: 1
  • /spot_teleop/button_switch: 0
  • /spot_teleop/frequency: 200.0
  • /spot_teleop/scale_angular: 1.0
  • /spot_teleop/scale_linear: 1.0

NODES
/
spot_joy (joy/joy_node)
spot_pybullet (mini_ros/spot_pybullet_interface)
spot_sm (mini_ros/spot_sm)
spot_teleop (mini_ros/teleop_node)

ROS_MASTER_URI=http://localhost:11311

process[spot_sm-1]: started with pid [17179]
process[spot_joy-2]: started with pid [17180]
[ INFO] [1623770031.194453852]: STARTING NODE: spot_mini State Machine
process[spot_teleop-3]: started with pid [17181]
process[spot_pybullet-4]: started with pid [17186]
/usr/bin/env: ‘python’: No such file or directory
[ INFO] [1623770031.203788747]: STARTING NODE: Teleoperation
[spot_pybullet-4] process has died [pid 17186, exit code 127, cmd /home/jon/catkin_ws/src/spot_mini_mini/mini_ros/src/spot_pybullet_interface __name:=spot_pybullet __log:=/home/jon/.ros/log/4d0e42a6-cde7-11eb-8559-f11a37245d28/spot_pybullet-4.log].
log file: /home/jon/.ros/log/4d0e42a6-cde7-11eb-8559-f11a37245d28/spot_pybullet-4*.log
[ WARN] [1623770031.228110980]: Couldn't set gain on joystick force feedback: Bad file descriptor

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

old non-functional guide

who runs this mess of links that lead nowhere??? spot mini mini unmaintained pages, old non-functional guide.

Considerations for 'Learning Quadrupedal Locomotion over Challenging Terrain' Paper

Hi @moribots ,

Thank you for this fantastic effort in making this niche field open sourced. I was browsing through your source code as well as the research paper that inspired this work, and made some comparisons with more recent advancements in Deep Reinforcement Learning for robotic quadrupeds.

  1. How much effort is required to use this existing work to train another robotic quadruped of an entirely different set of URDF? For instance, how much changes do we need to do in order to train the Anymal Model C robot (URDF here)?

  2. If adapting the existing framework to accomodate other types of quadrupeds is simple, how much effort is required to update the the approach to match current approaches? For instance, the work as shown by the ETH Zurich's Robotics Systems Lab? (For one, they use Raisim while this repository is in the OpenAI Gym environment)

I am really excited about the prospect of Legged robots, and would love to invest the time to furthering the work in this repository. Looking forward to hearing from you!

Regards,
Derek

Source code filename collisions on case-insensitive filesystems

Describe the bug
Several files of this repository have same filenames ignoring cases. When cloned on Mac OS / Windows, it would cause filename collision problems. Known collisions are:

To Reproduce
run git clone on Mac OS / Windows

Expected behavior
Some of the files should be renamed to avoid collisions.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Failed to process package 'mini_ros'

Install the project...
-- Install configuration: "Release"
-- Installing: /opt/ros/melodic/_setup_util.py
-- Installing: /opt/ros/melodic/env.sh
-- Installing: /opt/ros/melodic/setup.bash
-- Installing: /opt/ros/melodic/local_setup.bash
-- Installing: /opt/ros/melodic/setup.sh
-- Installing: /opt/ros/melodic/local_setup.sh
-- Installing: /opt/ros/melodic/setup.zsh
-- Installing: /opt/ros/melodic/local_setup.zsh
-- Installing: /opt/ros/melodic/.rosinstall

  • cd /home/pi/ros_catkin_ws/src/spot_mini_mini/mini_ros

  • mkdir -p /opt/ros/melodic/lib/python2.7/dist-packages

  • /usr/bin/env PYTHONPATH=/opt/ros/melodic/lib/python2.7/dist-packages:/home/pi/ros_catkin_ws/build_isolated/mini_ros/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages CATKIN_BINARY_DIR=/home/pi/ros_catkin_ws/build_isolated/mini_ros /usr/bin/python2 /home/pi/ros_catkin_ws/src/spot_mini_mini/mini_ros/setup.py build --build-base /home/pi/ros_catkin_ws/build_isolated/mini_ros install --root=/ --install-layout=deb --prefix=/opt/ros/melodic --install-scripts=/opt/ros/melodic/bin
    running build
    running build_py
    error: package directory 'mini_bullet' does not exist
    CMake Error at catkin_generated/safe_execute_install.cmake:4 (message):

    execute_process(/home/pi/ros_catkin_ws/build_isolated/mini_ros/catkin_generated/python_distutils_install.sh)
    returned error code
    Call Stack (most recent call first):
    cmake_install.cmake:137 (include)

make: *** [Makefile:83: install] Chyba 1
<== Failed to process package 'mini_ros':
Command '['/opt/ros/melodic/env.sh', 'make', 'install']' returned non-zero exit status 2.

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/mini_ros && /opt/ros/melodic/env.sh make install

Command failed, exiting.

Hi, can someone please help me?
there is a lot of "mini_bullet" on the github, but none refer here. who is the one I need to download to make it work?

The calibration code does not work

I don't understand what should I put in the calibration code for the elbow lie down and wrist lie down , I cannot understand the parameters ?
I have noted the 90 degree pwm and 0.
What should I do next?

Reward difference paper

Hi @moribots,
I am recreating this project and building upon it for a project for my uni, yet there is an important incongruity I can't figure out.
When I run the code straight away I get an reward per step of 5.4 at the first training steps. However, in figure 6 of your paper(see attached figure) the reward is supposed to start at -2.0 and never surpass 0.5 . Could you tell me where this difference in reward is coming from?
Thanks in advance!
Leon

bezierpaper_rewards

CAD model outside of OnShape

Hello! I understand that this is no longer being developed on, but I was wondering if it might be possible to get the CAD model/URDF/etc files outside of the OnShape platform? There doesn't appear to be an easy way to download the entire OnShape project, only whatever you can see and select at-a-time.

Starting walking motion

First of all, thank you for providing this very nice repository! I have a question about the simulation:

After cloning the repo and installing the dependencies, I am able to start the simulation using ./env_tester.py. Using the provided sliders, I am able to change the roll, pitch, yaw etc. and the robot shows the changes in the simulation. However, I am not able to start the walking motion. Is there some specific step that I need to perform to start the walk?

Non strainge forward walk

Hello!
At first, I would like to say that your project is great and well-done.
I went through the project and tried to simulate the spot:

  1. Run ./env_tester.py.
  2. Define StepLenght=0.05
    However, the spot were walking forward with small shifting in left side. I saw that you tried fix that by AutoYaw (if I understood corectly).
    Could you tell me why this problem appears? Is this problem in a BezierGait algorithm?
    I am looking forwad for your answer. Thanks.

Information regarding usability of model

Is your feature request related to a problem? Please describe.
Not really. It's more about the missing information regarding how the spot_real code really works on the Rpi in order to implement it in other similar systems.

Describe the solution you'd like
More information on how the code works and handles the models and information.

Additional context
I’m finishing my masters degree project with spotmicroai and my idea is to communicate via ros and do Control + extract all sensor info and after reading the paper and seeing the project, I was very interested in using RL for the gait.
I’m using an ESP32 as an interface for low level control inside the robot and I’m able to comunicate via serial and/or wifi with a linux system (RPi / PC) for the heavy lifting. My goal is to use the spot_real with RL as a starting point and further down the line develope the model and extras. But I really did not get how the software runs on the RPi on your implementation. I understood that The board on spot reads and handles sensors via serial as well as handling the bidirectional communication with the motors. But I’d love to know/understand better how does the RPi handle this info and apply the trained model with RL for the gait control (I believe it’s part of the launch file) but if you could explain it a bit it would be wonderful and really appreciated. This way I could iterate on it and develope a new approach for communication that I will share and cite on the publication.

Any help is welcomed. :D

How do I use the OpenSource Code in this Github Project?

Hello Spot Micro AI developers! I am so in love with this project and really want to build and try it for myself. Before I build it, I really wanted to have a concrete set of steps laid out for myself. While I did read the documentation which included assembly instructions and saw the video of the robot, I still don't understand the process behind uploading the different kinds of code on this page. I couldn't find assembly instructions including the code. I wanted to use the Raspberry Pi 4 and Arduino for this project. Are there any tutorials I may not have seen or any instructions on what kind of code goes to what device? Thank you so much in advance! I am a beginner at robotics as I am more of a software person!

Keyboard Teleop Support

Why not use a "param" value in ROS launch file,
to choose from Controller / Keyboard / terminal command (ros cmd_vel publisher)

spot_ars_eval.py is not working that URDF file can not found 'spot.urdf'.

Hi
I use 'spot_mini_mini' to my project. 'spot_mini_mini' is very nice project.
I want to use reinforcement learning to my quadruped robot.
But, When I use 'spot_ars_eval.py', I got an error message about
"spot_best\spot_2\src\spotmicro\util\pybullet_data/assets/urdf/spot.urdf' not found".

Can give a comment for me?

Unable to run training

When training minispot using spot_ars.py, there are two options to train: multiprocessing or without multiprocessing.

1. If multiprocessing is used, process is frozen when ars.py is called. It is stuck at line 605, I suspect parentPipe.send() is sending data larger than buffer on computer (I have tried with a few computers to run the code). Is there an alternative way to send using multiprocessing?

2. If no multiprocessing is used, ars.py is again called. This time it is stuck at line 403, with the following error message:

_Traceback (most recent call last):
File "C:\Users\TON93824\OneDrive - Mott MacDonald\Desktop\scripts\083. dmd\spot_bullet\src\spot_ars.py", line 227, in
main()
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\spot_ars.py", line 184, in main
episode_reward, episode_timesteps = agent.train()#parallel(parentPipes)
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\ars_lib\ars.py", line 564, in train
positive_rewards[i] = self.deploy(direction="+", delta=deltas[i])
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\ars_lib\ars.py", line 407, in deploy
state, reward, done, _ = self.env.step(action)
File "../..\spotmicro\GymEnvs\spot_bezier_env.py", line 163, in step
action = self.ja # during training state have to use action[2:]
AttributeError: 'spotBezierEnv' object has no attribute 'ja'

A closer look shows that the "def pass_joint_angles" was not called under spot_bezier_env.py, thus "def step" cannot call for self.ja. I suspect the no multiprocessing training function was not complete but I cannot fix the script myself, any hint?

3. Under the "contact" folder where trained policies are stored, they do not seem to be able to be loaded during evaluation. The following error message is found:

Traceback (most recent call last):
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\spot_ars_eval.py", line 313, in
main()
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\spot_ars_eval.py", line 186, in main
agent.load(models_path + "/" + file_name + str(agent_num))
File "C:\Users\Desktop\scripts\083. dmd\spot_bullet\src\ars_lib\ars.py", line 702, in load
self.policy.theta = pickle.load(filehandle)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 0: ordinal not in range(128)

Looks like the originally generated policy files were done differently? (Maybe on a linux machine??)

Details on PDB board production

I'm trying to reproduce the project. However I'm not that into PCB design, and while being able to understand the PDB design at a high level I am not able to fulfill some details. It would be great if you can provide a BOM for the single-power version, or if you could help me with the following questions please:

  1. in the single power version there are four slots for "resistors" -- what type and size (ohm) should I use for each resistor?
  2. if I use the servo as suggested in the list (JX CLS6336 Servo (36KG)), what is the suggested size of the capacitors? Or any between 100uF and 470 uF is fine?
  3. What are the usage of S1, S2, S3, S4 ? Are they for the hall sensor connections?
  4. It is mentioned that hall sensor slots are added on the feet, but there is no hall sensor listed on the BOM? are they still in the TODO list?

Thanks!

Controller does not move spot

Describe the bug
After launching the spot_move.launch and previously setting up the joystick controller, there is no movement even though the joy node is registering it

Expected behavior
For the robot to move as explained in the guide

Screenshots
Screenshot from 2021-06-15 18-30-03

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Lay down starting pose

ocation? mini_ros\src\mini_ros\teleop.cpp

Example: Line 62 - Switch Trigger: Button A (having a different button control lay down / stand up)

Idea: Would it be possible to add another button command to direct spot to lay down (the positions are in the teensy code already - but would it be possible to transition from a standing state to a laying down state through a controller button press? (similar to the BD spot) spot mini could start laying down and stand up on controller button press.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.