A voice-controlled robotic arm simulation framework using MuJoCo physics engine and OpenAI's Realtime API.
π¬ Demo Video: Watch on Bilibili
π₯ Newest Demo!!! Move 6+ kg box!!!: Watch on Bilibili
We are StarbotUSA, a startup robotics company in Santa Barbara. This project is aimed to take AI embedding on the robot. The code here is more of an experimental tryout but you can imagine that robots are going to interact with human beings in a very revolutionary way (Probably we don't need the smart phone to interact with everything very soon). In the future, we will implement this function in ROS2 of the real Unitree G1 robot. Please follow us. If you are interested in robotics and would like to share codes, like AI embedding, ROS2, IV algr, vision perception, locomotion, and manipulation, please contact me lloyd@starbotusa.com. We will be happy to pay or collaborate with you!!!
pip install mujoco
pip install numpyFor voice control:
pip install websockets pyaudio python-dotenvFor IK solver:
pip install pinocchioFor keyboard control:
pip install keyboardFor visualization:
pip install mujoco-viewer # If built-in viewer not availablepython test_ik.py- Create a
.envfile in the project root - Add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here - Run the script and start speaking commands like:
- "Move forward"
- "Go up"
- "Rotate left"
- "Reset position"
- Arrow Keys: Move forward/backward/left/right
- Page Up/Down: Move up/down
- Shift + Arrow Keys: Rotate around pitch/yaw axes
- Shift + Page Up/Down: Rotate around roll axis
- ESC: Exit simulation
.
βββ test_ik.py # Main simulation script
βββ robot_arm_ik.py # IK solver implementation
βββ weighted_moving_filter.py # Filter utilities
βββ assets/ # Robot models and meshes
β βββ g1_29dof_rev_1_0.xml
β βββ meshes/
βββ unitree_ros/ # Unitree ROS packages
βββ xr_teleoperate/ # XR teleoperation modules
move forward [normal/large]move backward [normal/large]move left [normal/large]move right [normal/large]move up [normal/large]move down [normal/large]
rotate roll [normal/large]rotate pitch [normal/large]rotate yaw [normal/large]
reset hand- Reset to initial position
position_step: 0.01 (keyboard)voice_position_step: 0.05 (voice)
rotation_step: 0.05 (keyboard)voice_rotation_step: 0.2 (voice)
- Python 3.8+
- MuJoCo 2.3+
- OpenAI API key (for voice control)
- Audio input device (for voice control)
Contributions are welcome! Please feel free to submit issues or pull requests.
This project includes components from Unitree Robotics. Please refer to individual component licenses.