[Last generated: Thu 07 Dec 2023 02:38:20 PM EST]
- Mujoco Simulation Packages
# Mujoco Simulation Packages
Mujoco Physics Simulation Package for Waterloo Steel Robot
- Launch Package (includes models) (This Package)
- Graphical User Interface / Direct OnOff-screen Render: uwarl-mujoco-python-viewer
- branching from jx-mujoco-python-viewer
- Main Engine Code uwarl-mujoco-python-engine
- branching from jx-mujoco-python-engine (similar to deepmind/dm_control)
- MuJoCo 2.2.x locking variants jx-mujoco
- [TODO: ROS Integration] for bridging SIL and HIL
- [TODO: Unity Integration] for rendering and realistic camera views
- [TODO: Migration to MuJoCo 3] for rendering higher simulation speeds
- Full Assembly
- Simulation setup
- Contact Physics [Last Edit: 15/Jun/2022]
- [WAM] Ensure Mechanical Params are Verified
- [BHAND] Ensure Mechanical Params are Verified
- [?] [SUMMIT] Ensure Mechanical Params are Verified
- Control Descriptors
- PID control for base
- ROS integration
- Real-time simulation synchronization
- Find solution for convex hull of wagon handle
- Passing all variables in highest level launch file
- ....
:announcement: Starting version 2.1.2, MuJoCo comes with python bindings, no need to look into mujoco_py package (which only works for 210) Migration notes: https://mujoco.readthedocs.io/en/latest/python.html#migration-notes-for-mujoco-py Right now, we will use mujoco-viewer based on https://github.com/rohanpsingh/mujoco-python-viewer TODO: We will migrate to the official viewer in python bindings later: Watch PR: google-deepmind/mujoco#201
- Submodule Update
$ cd submodules $ git submodule update
- Install editable python viewer:
$ cd uwarl-mujoco-python-viewer $ pip install -e .
- Install editable python engine:
$ cd uwarl-mujoco-python-engine $ pip install -e .
Launches the cart manipulation simulation with ROS integration. The launch file will launch:
- Clock publisher for simulation time
- Mujoco Engine and Viewer based on submodules
- ROS controllers which are used for trajectory control of the WAM
- Hardware simulation interface node to connect MuJoCo to ROS controllers
- Trajectory following action server for mobile base
- Rosbag recorder action server
Demo_V09_mujoco.py
node
$ roslaunch waterloo_steel_sim_bringup waterloo_steel_complete_cart_mujoco.launch
These variables can be changed depending on the simulation.
- In
launch/mujocolaunch.launch
paramsim_frequency_mujoco
. This changes the frequency of the node which updates the engine. It is synched to the simulation Hardware Simulation Interface for control of the WAM. - In
components/include_common.xml
paramtimestep
for changing the engines stepsize.
Important
Make sure 1/frequency of the ROS node updating the engine is equal to a multiple of the engine stepsize for real-time simulation.
- In
playground/playground_mobile_wagon_manipulation.xml
comment out the world body and the contact exclusions to simulate without a world. This increases the rendering performance.- You might want to compress the mesh to increase rendering performance, by using MeshLab for example.
- In
components/include_e7_3rd_floor_Dependencies.xml
, the world .stl file is defined. Change to simulate different world. - In
src/main.py
the MuJoCo viewer rate can be defined. - In
src/main.py
the onboard cameras of the Summit and WAM can be enabled. This can be done by passingTrue
in the Engine_update
function. Default value equalsFalse
.
.
├── CITATION.cff
├── LICENSE
├── README.md
├── components
│ ├── meshes
│ │ ├── bases
│ │ ├── meshes_bhand
│ │ └── ...
│ ├── robots
│ │ ├── wam_7dof_wam_bhand.urdf.xacro
│ │ └── waterloo_steel_mujoco.urdf.xacro
│ ├── urdf
│ │ ├── bases
│ │ ├── wagon
│ │ ├── wam
│ │ └── wheels
│ ├── include_common.xml
│ ├── include_{assembly-name}_Chain.xml
│ ├── include_{assembly-name}_Dependencies.xml
│ ├── include_{assembly-name}_actuators.xml
│ └── ...
├── documentation
│ └── ...
├── include
│ └── mujoco_ros_control
│ │ ├── mujoco_ros_control.h
│ │ ├── robot_hw_sim_plugin.h
│ │ └── robot_hw_sim.h
├── meshes
│ ├── maps_thirdfloor
│ │ ├── map_e7_3_v6.stl
│ │ └── ...
│ ├── meshes_{module-name}
│ │ ├── {3D-model-component-name}.stl
│ │ └── ...
│ └── ...
├── playground
│ ├── playground_{playground-name}.xml
│ └── ...
├── src
│ ├── {scripts}.py # [launch files]
│ └── ...
├── submodules
│ ├── uwarl-mujoco-python-viewer # [Mujoco Render/Interaction GUI]
│ └── uwarl-mujoco-python-engine # [Main engine code]
└── textures
│ └── ...
x
[ 5 directories, # files ]
- WAM sim file is a CORRECTED and MODIFIED version based on the official archived MuJoCo model made by Vikash kumar
- Findings: The original model has collision disabled, and parameters are incorrectly populated
- Note: We have modified the original model based on the given stl files completely, and configured MoI based on the Official Barrett WAM Specification.
- Specifically, we made exactly the same as described in the document, and removed incorrect quaternion parameters for
inertial
, and populated theinertial
purely based on the centre of the mass and translated the coordinate frames to the stl model frame (manually)
- Specifically, we made exactly the same as described in the document, and removed incorrect quaternion parameters for
- Shall you have any concern with the parameters, kindly open an issue.
Joints | MOI |
---|---|
- Install MuJoCo 2.2.x via
$ sudo pip install mujoco
- Download MuJoCo 2.2.x release package from https://github.com/deepmind/mujoco/releases
- M1 Macbook Pro 14"
- Ubuntu 20.04
- [TBD] WINDOWS ---x
- Make directory
MuJoCo_v2.2
under/Applications
- Copy all files from MuJoCo 2.2.x release dmg into
/Applications/MuJoCo_v2.2
- The directory for the
.dylib
has been modified to/Applications/MuJoCo_v2.2/MuJoCo.app/Contents/Frameworks
under thissubmodules/jx-mujoco
The current MuJoCo-ROS integration is shown below:
In detail, zoomed in on the Hardware Simulation Interface:
To find more details on the ROS integration of the MuJoCo simulator, see the pdf file in the documentation folder.