-
Notifications
You must be signed in to change notification settings - Fork 57
Mujoco Simulator for K1 #2130
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
Mujoco Simulator for K1 #2130
Conversation
39a55c5 to
1a77f97
Compare
alexschmander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially a few comments, not completed yet...
7b57921 to
464d6b4
Compare
create mujoco-rust-server fix rebase fuckup add mujoco-simulator add torque-velocity-position control to simulation (wip) mujoco webrtc add three-js visualizer rename K1_serial -> K1 add robot camera and encoder remove unused code add websocket handler for camera frames rename motor_command -> motor_commands add time to simulation messages
--wip--
464d6b4 to
793bda2
Compare
alexschmander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more comment, otherwise looks good!
tools/mujoco-simulator/mujoco-simulator/mujoco_simulator/rate_logger.py
Outdated
Show resolved
Hide resolved
alexschmander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why? What?
This PR implements a simulator for the K1 robot in MuJoCo.
The main simulation loop is implemented in python, but the new
mujoco-rust-serverlibrary controls how the simulation advances and can be connected to via Websockets.Upon connection, a client has to send a
ConnectionInfo, which specifies a schedule for events.For example, the
hulk_mujocobinary sends aConnectionInfowhich resets the simulation, and specifies the update rate ofLowStateandLowCommandto be of 10ms in the same phase.The three-js webrenderer shows another application of this, where on connect, a description of the scene is sent and on every change in simulation, updated positions and rotations of all bodies are sent.
The simulation is not feature complete. While the architecture of the simulator is explicitly designed to handle connections from multiple frameworks, this is not yet implemented.
Also, the simulation scene is relatively boring and does not yet contain a field or a ball.
Fixes #2108
ToDo / Known Issues
LowState. For instance, if simulation time ist=5, step size is 2, and the controller asks for aLowStateatt=6, the simulation step will not be shortened, leading to a delayedLowStateatt=7.Ideas for Next Iterations (Not This PR)
How to Test
npm i && npm run devuv run main.pypepsi run hulk_mujoco