This code implements the collision model of Mecanum wheels to mimic the actual driving behavior of wheels.
By using macro file, users can develop their robot model easily.
- Mecamum wheel model (visual and collision) for Mujoco.
- Python3 based macro
- Example code about SUMMIT-XL STEEL
Collision Model | Visual Model |
---|---|
- mujoco_py
- numpy (
pip install numpy
) - argparse (
pip install argparse
)
In macro code, there are some parameters that can be customized according to user settings.
- link_name: link name of wheel
- n_roller: number of rollers of wheel
- pos: position of wheel wrt body frame
- mass: mass of a wheel
- diag_inertia: diagonal inertia of a wheel [ixx, iyy, izz]
- size: size of a wheel [radius, height]
- type: type of a wheel (1 or 2)
python3 wheel_code_gen.py --link_name mecanum
After running this code, you can get wheel.xml
. Using this, you can implement collision model of mecanum wheel.
SUMMIT XL STEEL model was used to implement mecanum wheel.
In this code, you can see how to use.
And you can simmulate this model.
python3 summit_test.py
For using this model, you can not use velocity actuator like below.
<actuator>
<velocity name="mecanum_wheel_joint" .../>
</actuator>
Rather than using velocity, use force based actuator.
<actuator>
<motor name="mecanum_wheel_joint" .../>
</actuator>
And in controller code, you can control wheel by PID controller like this code.
mujoco mecanum
is releasd under MIT license. Please see the LICENSE file for more information.