Skip to content

Commit 9dedfff

Browse files
authored
Make demos a project folder and setup for GitHub (#1)
* Rename and move the existing project * Update the README * Add pre-commit workflow * Apply pre-commit fixes * Hide the model in the planning rviz view
1 parent 4c225d4 commit 9dedfff

File tree

12 files changed

+105
-65
lines changed

12 files changed

+105
-65
lines changed

.github/workflows/format.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: format
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- humble
9+
- jazzy
10+
- '*-devel'
11+
pull_request:
12+
branches:
13+
- '*'
14+
workflow_dispatch:
15+
16+
# Do not run multiple jobs for the same branch
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
pre-commit:
23+
name: pre-commit
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
- uses: pre-commit/action@v3.0.1

README.md

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,16 @@
1-
# CLR CTB Grasping Demonstration
1+
# CLR Sim Demos
22

3-
This package contains a demonstration of a perception-enabled CTB picking and placing task.
3+
This repository contains demonstration applications using the [MuJoCo simulation](https://github.com/NASA-JSC-Robotics/chonkur_l_raile/) of ChonkUR L Rail-E.
44

5-
The application has been used to trial a sim-to-real transfer of simulated behaviors using [MuJoCo](https://mujoco.readthedocs.io/en/stable/overview.html).
5+
This project is intended to be included in an application workspace such as the [clr_dynamic_sim_demo](https://github.com/NASA-JSC-Robotics/clr_dynamic_sim_demo) repository.
66

7-
![alt text](./dynamic_sim_rviz.png "Rviz Rendering of CLR")
7+
## Overview
88

9-
## Simulation Instructions
9+
The examples here, as well as the simulation itself, have been used to trial a sim-to-real pipeline for developing behaviors to run in iMETRO facilities.
10+
These include behaviors requiring color/depth perception, force/torque sensors, or realistic dynamics of the robot in its environment.
1011

11-
To run this demo in simulation, run the following in a dynamic sim container:
12+
As of now there is a single example available for public consumption made with open-source tools:
1213

13-
```bash
14-
# Start the mujoco ros2 control-based simulation including the environment
15-
ros2 launch clr_mujoco_config clr_mujoco.launch.py
14+
* [Pick and Place with a CTB](./clr_pick_and_place_demo/README.md)
1615

17-
# Launch the moveit group and the demo's planning GUI
18-
ros2 launch clr_dynamic_sim_demo demo_planning_viz.launch.py
19-
20-
# Start the demonstration, the console will display prompts from MoveItVisualTools and provide
21-
# other information.
22-
ros2 launch clr_dynamic_sim_demo demo.launch.py
23-
```
24-
25-
By default, each stage of the demonstration requires operator approval by clicking `next` in the RViz console.
26-
To disable this and just let the simulation run, use (still click `next` to start the sim):
27-
28-
```bash
29-
ros2 launch clr_dynamic_sim_demo demo.launch.py wait_for_prompt:=false
30-
```
31-
32-
## Hardware Instructions
33-
34-
To run this demo on hardware, run the following in a dynamic sim container on the controls PC:
35-
36-
```bash
37-
ros2 launch clr_deploy clr_hw.launch.py include_mockups_in_description:=true
38-
39-
ros2 launch chonkur_deploy ur_tools.launch.py
40-
```
41-
42-
Then run the following in the dynamic sim container on the console PC:
43-
44-
```bash
45-
ros2 launch clr_moveit_config clr_moveit.launch.py launch_rviz:=false include_mockups_in_description:=true
46-
47-
ros2 launch clr_dynamic_sim_demo demo_planning_viz.launch.py sim:=false
48-
49-
ros2 launch clr_dynamic_sim_demo demo.launch.py sim:=false
50-
```
16+
![alt text](./clr_mujoco_simulation.png "CLR MuJoCo simulation")

clr_mujoco_simulation.png

431 KB
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.8)
2-
project(clr_dynamic_sim_demo)
2+
project(clr_pick_and_place_demo)
33

44
# Default to C++14
55
if(NOT CMAKE_CXX_STANDARD)

clr_pick_and_place_demo/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# CLR CTB Grasping Demonstration
2+
3+
This package contains a demonstration of a perception-enabled CTB picking and placing task.
4+
5+
The application has been used to trial a sim-to-real transfer of simulated behaviors using [MuJoCo](https://mujoco.readthedocs.io/en/stable/overview.html).
6+
7+
![alt text](./dynamic_sim_rviz.png "Rviz Rendering of CLR")
8+
9+
## Simulation Instructions
10+
11+
To run this demo in simulation, run the following in a dynamic sim container:
12+
13+
```bash
14+
# Start the mujoco ros2 control-based simulation including the environment
15+
ros2 launch clr_mujoco_config clr_mujoco.launch.py
16+
17+
# Launch the moveit group and the demo's planning GUI
18+
ros2 launch clr_pick_and_place_demo demo_planning_viz.launch.py
19+
20+
# Start the demonstration, the console will display prompts from MoveItVisualTools and provide
21+
# other information.
22+
ros2 launch clr_pick_and_place_demo demo.launch.py
23+
```
24+
25+
By default, each stage of the demonstration requires operator approval by clicking `next` in the RViz console.
26+
To disable this and just let the simulation run, use (still click `next` to start the sim):
27+
28+
```bash
29+
ros2 launch clr_pick_and_place_demo demo.launch.py wait_for_prompt:=false
30+
```
31+
32+
## Hardware Instructions
33+
34+
To run this demo on hardware, run the following in a dynamic sim container on the controls PC:
35+
36+
```bash
37+
ros2 launch clr_deploy clr_hw.launch.py include_mockups_in_description:=true
38+
39+
ros2 launch chonkur_deploy ur_tools.launch.py
40+
```
41+
42+
Then run the following in the dynamic sim container on the console PC:
43+
44+
```bash
45+
ros2 launch clr_moveit_config clr_moveit.launch.py launch_rviz:=false include_mockups_in_description:=true
46+
47+
ros2 launch clr_pick_and_place_demo demo_planning_viz.launch.py sim:=false
48+
49+
ros2 launch clr_pick_and_place_demo demo.launch.py sim:=false
50+
```

config/waypoints.yaml renamed to clr_pick_and_place_demo/config/waypoints.yaml

File renamed without changes.

dynamic_sim_rviz.png renamed to clr_pick_and_place_demo/dynamic_sim_rviz.png

File renamed without changes.

launch/demo.launch.py renamed to clr_pick_and_place_demo/launch/demo.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def generate_launch_description():
7979
sim = LaunchConfiguration("sim")
8080
wp_cfg_file_name = LaunchConfiguration("waypoint_cfg")
8181
waypoint_cfg = PathJoinSubstitution(
82-
[get_package_share_directory("clr_dynamic_sim_demo"), "config", wp_cfg_file_name]
82+
[get_package_share_directory("clr_pick_and_place_demo"), "config", wp_cfg_file_name]
8383
)
8484

8585
description_package = "clr_imetro_environments"
@@ -100,7 +100,7 @@ def generate_launch_description():
100100

101101
nodes_to_start = [
102102
Node(
103-
package="clr_dynamic_sim_demo",
103+
package="clr_pick_and_place_demo",
104104
executable="run_demo",
105105
output="both",
106106
parameters=[

launch/demo_planning_viz.launch.py renamed to clr_pick_and_place_demo/launch/demo_planning_viz.launch.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def generate_launch_description():
4444
description_file = "clr_trainer_multi_hatch.urdf.xacro"
4545
moveit_config_file_path = "srdf/clr_and_sim_mockups.srdf.xacro"
4646
description_full_path = os.path.join(get_package_share_directory(description_package), "urdf", description_file)
47-
rviz_config_file = os.path.join(get_package_share_directory("clr_dynamic_sim_demo"), "rviz", "demo_config.rviz")
47+
rviz_config_file = os.path.join(get_package_share_directory("clr_pick_and_place_demo"), "rviz", "demo_config.rviz")
4848

4949
moveit_config = (
5050
MoveItConfigsBuilder("clr", package_name="clr_moveit_config")
@@ -70,15 +70,15 @@ def generate_launch_description():
7070
],
7171
),
7272
IncludeLaunchDescription(
73-
PythonLaunchDescriptionSource(
74-
os.path.join(get_package_share_directory("clr_moveit_config"), "launch", "clr_moveit.launch.py"),
75-
),
76-
launch_arguments={
77-
"launch_rviz" : "false",
78-
"include_mockups_in_description": "true",
79-
"use_sim_time": sim,
80-
}.items(),
81-
)
73+
PythonLaunchDescriptionSource(
74+
os.path.join(get_package_share_directory("clr_moveit_config"), "launch", "clr_moveit.launch.py"),
75+
),
76+
launch_arguments={
77+
"launch_rviz": "false",
78+
"include_mockups_in_description": "true",
79+
"use_sim_time": sim,
80+
}.items(),
81+
),
8282
]
8383

8484
return LaunchDescription(declared_arguments + launches)

package.xml renamed to clr_pick_and_place_demo/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>clr_dynamic_sim_demo</name>
4+
<name>clr_pick_and_place_demo</name>
55
<version>1.0.0</version>
66
<description>Application demonstration of the CLR robot operating in its dynamic simulation</description>
77
<maintainer email="nikki.j.hart@nasa.gov">njhart</maintainer>

0 commit comments

Comments
 (0)