Skip to content

Commit 2f0528e

Browse files
authored
Add gripper to MuJoCo simulation (#35)
* Add gripper to MuJoCo simulation Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> * Add equality constraint to make the grippers close Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> * Remove unnecessary meshes Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> * Add the meshes for MuJoCo Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> * Add instructions for update the model Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> * Address comments - part 1 Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com> --------- Signed-off-by: Steven Desvars <steven.desvars@ekumenlabs.com>
1 parent b0055ac commit 2f0528e

29 files changed

+212
-87
lines changed
-30.5 KB
Binary file not shown.

ar4_mujoco_bringup/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ ros2 launch ar4_mujoco_bringup main.launch.py
1818
The MuJoCo model of the AR4 robot can be imported from the URDF description in the `ar4_description` package. The process requires running the two scripts in the `scripts/` folder in sequence.
1919

2020
1. First run `stage1_create_urdf_from_xacro.sh` from **within** the development container. This script will generate the URDF file from the xacro description.
21-
1. Then run `stage2_create_mjcf_from_urdf.sh` from **outside** the development container (this script needs to create a new containerized environment running Ubuntu 24.04). This script will generate the MuJoCo model from the URDF file.
21+
2. Then run `stage2_create_mjcf_from_urdf.sh` from **outside** the development container (this script needs to create a new containerized environment running Ubuntu 24.04). This script will generate the MuJoCo model from the URDF file.
22+
3. For the gripper mimic function to work correctly, this code needs to be added into the [mj_ar4.mjcf](../ar4_mujoco_sim/mjcf/robot/mj_ar4.mjcf) file
23+
24+
```
25+
<equality>
26+
<joint joint1="finger_joint_1" joint2="finger_joint_2" solimp="0.95 0.99 0.001" solref="0.005 1"/>
27+
</equality>
28+
29+
```
2230

2331
At this point you'll see the `urdf/` and `mjcf/` folders in the `ar4_mujoco_sim` package as updated. Commit those changes.

ar4_mujoco_sim/launch/main.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def generate_launch_description():
117117
spawn_joint_trajectory_controller = Node(
118118
package="controller_manager",
119119
executable="spawner",
120-
arguments=["arm_controller"],
120+
arguments=["arm_controller", "gripper_controller"],
121121
output="screen",
122122
)
123123

684 Bytes
Binary file not shown.
298 KB
Binary file not shown.
684 Bytes
Binary file not shown.
File renamed without changes.
684 Bytes
Binary file not shown.
1.25 KB
Binary file not shown.
2.43 KB
Binary file not shown.

0 commit comments

Comments
 (0)