Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
exclude: ^ar4_description/config/ar4.yaml$
- id: check-xml
- id: end-of-file-fixer
exclude: 'ar4_isaac/usda/'
exclude: 'ar4_isaac_sim/usda/'
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-clang-format
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ These are the main packages providing launch files for the different use cases:

- [`ar4_description`](./ar4_description): Contains the platform-agnostic parts of the URDF robot description.
- [`ar4_gazebo_bringup`](./ar4_gazebo): Launch a Gazebo Sim simulation of AR4.
- [`ar4_isaac_bringup`](./ar4_gazebo): **Not yet available.** Launch an Isaac Sim simulation of AR4.
- [`ar4_mujoco_bringup`](./ar4_gazebo): **Not yet available.** Launch a MuJoCo-based simulation of AR4.
- [`ar4_isaac_bringup`](./ar4_gazebo): Launch an Isaac Sim simulation of AR4.
- [`ar4_mujoco_bringup`](./ar4_gazebo): Launch a MuJoCo-based simulation of AR4.
- [`ar4_realbot_bringup`](./ar4_gazebo): Launch drivers and control software for the real AR4 robot.
- [`ar4_isaac`](./ar4_isaac): Isaac simulation for the ar4 arm.


```mermaid
Expand Down
Binary file not shown.
55 changes: 5 additions & 50 deletions ...isaac/launch/ar4_in_empty_world.launch.py → ar4_isaac_bringup/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# BSD 3-Clause License
#
# Copyright 2025 Ekumen, Inc.
Expand Down Expand Up @@ -30,54 +28,11 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cmake_minimum_required(VERSION 3.7)
project(ar4_isaac_bringup)

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, ExecuteProcess
from launch.conditions import IfCondition, UnlessCondition
from launch.substitutions import LaunchConfiguration


def generate_launch_description():
headless = LaunchConfiguration('headless') # noqa F841
declare_headless = DeclareLaunchArgument(
'headless',
default_value='false',
description='Launch Isaac in headless mode',
)

pkg_ar4_isaac = get_package_share_directory('ar4_isaac')
run_sim_path = os.path.join(pkg_ar4_isaac, 'scripts', 'run_sim.py')

isaac_process = ExecuteProcess(
cmd=[
'/isaac-sim/python.sh',
run_sim_path,
'--robot_model_path',
os.path.join(pkg_ar4_isaac, 'usda', 'ar4.usda'),
],
shell=True,
output='screen',
condition=UnlessCondition(LaunchConfiguration('headless')),
)

isaac_process_headless = ExecuteProcess(
cmd=[
'/isaac-sim/python.sh',
run_sim_path,
'--robot_model_path',
os.path.join(pkg_ar4_isaac, 'usda', 'ar4.usda'),
'--headless',
],
shell=True,
output='screen',
condition=IfCondition(LaunchConfiguration('headless')),
)
find_package(ament_cmake REQUIRED)

ld = LaunchDescription()
ld.add_action(declare_headless)
ld.add_action(isaac_process)
ld.add_action(isaac_process_headless)
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}/)

return ld
ament_package()
File renamed without changes.
22 changes: 22 additions & 0 deletions ar4_isaac_bringup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Description

Bringup package for the AR4 software stack on the Isaac simulator.

```bash
colcon build --packages-up-to ar4_isaac_bringup
. install/setup.bash
```

To run the simulation, source and run:

```bash
ros2 launch ar4_isaac_bringup main.launch.py
```

#### Launch file arguments

To see a detailed list of the arguments, run:

```bash
ros2 launch ar4_isaac_bringup main.launch.py --show-args
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,77 +31,40 @@
"""launch file for integrating Isaac with MoveIt for the AR4 robot."""

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.substitutions import FindPackageShare
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution


def generate_launch_description():
"""Launch the AR4 robot in Isaac and MoveIt."""
use_sim_time = LaunchConfiguration('use_sim_time')
headless = LaunchConfiguration('headless')
declare_use_sim_time_cmd = DeclareLaunchArgument(
'use_sim_time',
default_value='true',
description='Use simulation (Isaac) clock if true',
)
declare_headless = DeclareLaunchArgument(
'headless',
default_value='false',
description='Launch Isaac in headless mode',
)

ar4_isaac_pkg = FindPackageShare('ar4_isaac')
ar4_moveit_config_pkg = FindPackageShare('ar4_moveit_config')

isaac_launch = IncludeLaunchDescription(
common_stack_include = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
ar4_isaac_pkg,
'launch',
'ar4_in_empty_world.launch.py',
FindPackageShare("ar4_common"),
"launch",
"main.launch.py",
]
)
),
launch_arguments={
'headless': headless,
}.items(),
)

controllers_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
ar4_isaac_pkg,
'launch',
'ar4_controllers.launch.py',
]
),
),
launch_arguments={
'use_sim_time': use_sim_time,
}.items(),
)
)

moveit_launch = IncludeLaunchDescription(
isaac_sim_include = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
ar4_moveit_config_pkg,
'launch',
'demo.launch.py',
FindPackageShare("ar4_isaac_sim"),
"launch",
"main.launch.py",
]
)
)
)

ld = LaunchDescription()
ld.add_action(declare_use_sim_time_cmd)
ld.add_action(declare_headless)
ld.add_action(isaac_launch)
ld.add_action(controllers_launch)
ld.add_action(moveit_launch)

return ld
return LaunchDescription(
[
common_stack_include,
isaac_sim_include,
]
)
22 changes: 22 additions & 0 deletions ar4_isaac_bringup/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package format="3">
<name>ar4_isaac_bringup</name>
<version>0.0.1</version>
<description>
Launch Isaac simulation with Ar4 robot.
</description>
<author email="[email protected]">Santiago Lopez mendez</author>
<maintainer email="[email protected]">Steven Desvars</maintainer>
<maintainer email="[email protected]">Gerardo Puga</maintainer>
<license file="LICENSE">BSD-3-Clause</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>ar4_common</exec_depend>
<exec_depend>ar4_isaac_sim</exec_depend>
<exec_depend>ros2launch</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cmake_minimum_required(VERSION 3.7)
project(ar4_isaac)
project(ar4_isaac_sim)

find_package(ament_cmake REQUIRED)

Expand Down
29 changes: 29 additions & 0 deletions ar4_isaac_sim/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2025, Ekumen Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions ar4_isaac/README.md → ar4_isaac_sim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Build the packages

```
source /opt/ros/humble/setup.bash
colcon build --packages-up-to ar4_isaac
colcon build --packages-up-to ar4_isaac_bringup
```

Source the built packages
Expand All @@ -31,7 +31,7 @@ source install/setup.bash

## Launch the simulation
```
ros2 launch ar4_isaac ar4_in_empty_world.launch.py
ros2 launch ar4_isaac_bringup main.launch.py
```
![AR4 in Isaac Sim](docs/pics/isaac_sim.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ For changes made to the robot's urdf or meshes to impact the Isaac Sim model it'
- Import Inertia Tensor
- Clear Stage
- Self Collision
- Collision From Visuals

7. Select the generated `urdf` in step 2 (with step 3 mods) as the input file

Expand Down Expand Up @@ -96,4 +95,4 @@ For changes made to the robot's urdf or meshes to impact the Isaac Sim model it'

Finally save your output as `usda` overriding the existing ar4_layer. (Note: Select the type to `*.usda`)

File > Save As... > ar4_isaac/usda/layers/ar4_layer.usda
File > Save As... > ar4_isaac_sim/usda/layers/ar4_layer.usda
Loading