Skip to content

Commit 1990765

Browse files
committed
Minor fixes
Signed-off-by: Gerardo Puga <glpuga@gmail.com>
1 parent 53490a5 commit 1990765

File tree

11 files changed

+26
-26
lines changed

11 files changed

+26
-26
lines changed

.clang-format

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ColumnLimit: 120
66
AlignAfterOpenBracket: AlwaysBreak
77
QualifierAlignment: Left
88
---
9+
Language: Json
10+
BasedOnStyle: llvm
11+
---
912
BasedOnStyle: Chromium
1013
Language: JavaScript
1114
...

ar4_isaac/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Build the packages
2020

2121
```
2222
source /opt/ros/humble/setup.bash
23-
colcon build
23+
colcon build --packages-up-to ar4_isaac
2424
```
2525

2626
Source the built packages

ar4_mujoco_sim/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Description
2-
A Gazebo simulation of the AR4 Package.
32

4-
To build the package, run
5-
`colcon build`
3+
This package contains the simulation of the AR4 robot in Mujoco.
64

7-
To run the simulation, source and run
8-
`ros2 launch ar4_mujoco_sim ar4_sim.launch.py`
5+
## Instructions to import the model
96

10-
#### Launch file arguments
11-
- 'rsp':
12-
- Run [`robot state publisher`](https://github.com/ros/robot_state_publisher) node. (default: 'false')
13-
- 'rviz':
14-
- Start RViz. (default: 'false')
7+
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.
8+
9+
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.
10+
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.
11+
12+
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: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,19 @@ def generate_launch_description():
5252
"mj_ar4.urdf.xacro",
5353
)
5454

55-
robot_description_urdf = xacro.process_file(mjcf_equiv_robot_description_file).toprettyxml(
56-
indent=" "
57-
)
55+
robot_description_urdf = xacro.process_file(
56+
mjcf_equiv_robot_description_file
57+
).toprettyxml(indent=" ")
5858

5959
rsp_robot_description_file = os.path.join(
6060
get_package_share_directory("ar4_description"),
6161
"urdf",
6262
"ar4.urdf.xacro",
6363
)
6464

65-
rsp_robot_description_urdf = xacro.process_file(rsp_robot_description_file).toprettyxml(
66-
indent=" "
67-
)
68-
65+
rsp_robot_description_urdf = xacro.process_file(
66+
rsp_robot_description_file
67+
).toprettyxml(indent=" ")
6968

7069
mujoco_model = os.path.join(
7170
this_pkg_share,

ar4_mujoco_sim/meta/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
]
1313
}
1414
]
15-
}
15+
}

ar4_mujoco_sim/mjcf/robot/mj_ar4.mjcf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@
134134
<framelinvel name="base_link_vel" objtype="site" objname="base_link_site" />
135135
<frameangvel name="base_link_ang_vel" objtype="site" objname="base_link_site" />
136136
</sensor>
137-
</mujoco>
137+
</mujoco>

ar4_mujoco_sim/mjcf/scene.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
<light pos="0 0 1.5" dir="0 0 -1" directional="true" />
2626
<geom name="floor" size="0 0 0.05" type="plane" material="groundplane" />
2727
</worldbody>
28-
</mujoco>
28+
</mujoco>

ar4_mujoco_sim/scripts/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set +e
44

5-
exec "$@"
5+
exec "$@"

ar4_mujoco_sim/urdf/mj_ar4.urdf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@
347347
</joint>
348348
.
349349

350-
350+
351351
<mujoco>
352352
<compiler balanceinertia="true" discardvisual="false" meshdir=""/>
353353
</mujoco>
354-
<ros2_control name="GazeboSystem" type="system">
354+
<ros2_control name="MujocoSystem" type="system">
355355
<hardware>
356356
<plugin>mujoco_ros2_control/MujocoSystem</plugin>
357357
</hardware>

ar4_mujoco_sim/xacro/includes/mujoco.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111

1212
</mujoco>
1313

14-
</robot>
14+
</robot>

0 commit comments

Comments
 (0)