Skip to content

Commit

Permalink
Rename nexus_integration_tests to nexus_demos
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Feb 5, 2025
1 parent 7479795 commit b572dab
Show file tree
Hide file tree
Showing 57 changed files with 69 additions and 69 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nexus_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
rosdep update
rosdep install --from-paths . -yir
- name: build
run: /ros_entrypoint.sh colcon build --packages-up-to nexus_calibration nexus_gazebo nexus_integration_tests nexus_motion_planner --mixin release lld --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
run: /ros_entrypoint.sh colcon build --packages-up-to nexus_calibration nexus_gazebo nexus_demos nexus_motion_planner --mixin release lld --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Test - Unit Tests
run: . ./install/setup.bash && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /ros_entrypoint.sh colcon test --packages-select nexus_motion_planner --event-handlers=console_direct+
- name: Test - Integration Test
run: . ./install/setup.bash && cd nexus_integration_tests && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /ros_entrypoint.sh python3 -m unittest
run: . ./install/setup.bash && cd nexus_demos && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /ros_entrypoint.sh python3 -m unittest
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
## Configuration

The workcell and system orchestrators rely on behavior trees for orchestration. `NEXUS` provides several BT skills that may be reused for a variety of applications.
See sample BTs for [system_orchestrator](nexus_integration_tests/config/system_orchestrator_bt.xml) and [workcell_orchestrator](nexus_integration_tests/config/workcell_1_bts/place_on_conveyor.xml) for a pick & place application.
See sample BTs for [system_orchestrator](nexus_demos/config/system_orchestrator_bt.xml) and [workcell_orchestrator](nexus_demos/config/workcell_1_bts/place_on_conveyor.xml) for a pick & place application.

At present, capabilities are registered as plugins with the `orchestrator` at runtime.
We support [these capabilities](./nexus_capabilities/src/capabilities/plugins.xml) out of the bo
Expand All @@ -61,15 +61,15 @@ A current limitation of this approach is the need to manually update the palette

### Generating Zenoh bridge configurations

The script in `nexus_network_configuration` helps to simplify configuration of Zenoh bridges for multiple machines. The Zenoh bridge files are generated from [NEXUS Network Configuration](nexus_integration_tests/config/zenoh/nexus_network_config.yaml) and [nexus_endpoints.redf.yaml](./nexus_endpoints.redf.yaml). After configuring the [NEXUS Network Configuration](nexus_integration_tests/config/zenoh/nexus_network_config.yaml), you can run `ros2 run nexus_network_configuration nexus_network_configuration -n <PATH_TO_NEXUS_NETWORK_CONFIG> -r <PATH_TO_REDF_CONFIGS> -o <ZENOH_CONFIGS_OUTPUT_DIRECTORY>` to generate the Zenoh bridges.
The script in `nexus_network_configuration` helps to simplify configuration of Zenoh bridges for multiple machines. The Zenoh bridge files are generated from [NEXUS Network Configuration](nexus_demos/config/zenoh/nexus_network_config.yaml) and [nexus_endpoints.redf.yaml](./nexus_endpoints.redf.yaml). After configuring the [NEXUS Network Configuration](nexus_demos/config/zenoh/nexus_network_config.yaml), you can run `ros2 run nexus_network_configuration nexus_network_configuration -n <PATH_TO_NEXUS_NETWORK_CONFIG> -r <PATH_TO_REDF_CONFIGS> -o <ZENOH_CONFIGS_OUTPUT_DIRECTORY>` to generate the Zenoh bridges.

Further detailed instructions on running the Zenoh bridges with said configurations are in the [package README](nexus_network_configuration/README.md)

## Demos

![](./docs/media/nexus_demo.png)

Follow instructions [here](nexus_integration_tests/README.md) to run pick and place demonstrations with a line comprising of two workcells that perform different types of tasks.
Follow instructions [here](nexus_demos/README.md) to run pick and place demonstrations with a line comprising of two workcells that perform different types of tasks.

TODO: Add a dedicated demo package.

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
set(PROJECT_NAME nexus_integration_tests)
set(PROJECT_NAME nexus_demos)
project(${PROJECT_NAME} VERSION 0.0.1)

find_package(ament_cmake REQUIRED)
Expand Down Expand Up @@ -152,7 +152,7 @@ if(BUILD_TESTING)
find_package(rcpputils REQUIRED)

# To run the test use:
# ros2 run nexus_integration_tests test_mocks
# ros2 run nexus_demos test_mocks
add_executable(test_mocks
test/main.cpp
src/test_mock_detection.cpp
Expand Down
36 changes: 18 additions & 18 deletions nexus_integration_tests/README.md → nexus_demos/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nexus_integration_tests
# nexus_demos

## Launch system and workcell orchestrators and all mock nodes
The [launch.py script](launch/launch.py) will launch the system orchestrator and 2 workcells orchestrators (each with a IRB910SC and IRB1300 robot), along with a Zenoh bridge to link selected ROS endpoints between them. These 3 orchestrators and their accompany components will be in different ROS_DOMAIN_IDs. To launch these components individually, use the following examples given.
Expand All @@ -10,40 +10,40 @@ The [launch.py script](launch/launch.py) will launch the system orchestrator and
`export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp`
(If testing with real hardware, specify the arguments `use_fake_hardware=False`, `robot1_ip=<IP>` and `robot2_ip=<IP>`)
```bash
ros2 launch nexus_integration_tests launch.py headless:=False
ros2 launch nexus_demos launch.py headless:=False
```

### Method 2: Launch System Orchestrator and 1 Workcell without Zenoh bridge (Same ROS_DOMAIN_ID)
Launch with Workcell 1
```bash
ros2 launch nexus_integration_tests launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=true run_workcell_2:=false
ros2 launch nexus_demos launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=true run_workcell_2:=false
```

Launch with Workcell 2
```bash
ros2 launch nexus_integration_tests launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=false run_workcell_2:=true
ros2 launch nexus_demos launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=false run_workcell_2:=true
```

Testing with real hardware
```bash
ros2 launch nexus_integration_tests launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=True run_workcell_2:=False use_fake_hardware:=False robot1_ip:=<IP_ADDR>
ros2 launch nexus_demos launch.py headless:=False use_zenoh_bridge:=False run_workcell_1:=True run_workcell_2:=False use_fake_hardware:=False robot1_ip:=<IP_ADDR>
```

## Launch Orchestrators individually

### System Orchestrator
```bash
ros2 launch nexus_integration_tests control_center.launch.py ros_domain_id:=0 headless:=False
ros2 launch nexus_demos control_center.launch.py ros_domain_id:=0 headless:=False
```

### IRB910SC Workcell
```bash
ros2 launch nexus_integration_tests workcell.launch.py workcell_id:=workcell_1 ros_domain_id:=1 support_package:=abb_irb910sc_support robot_xacro_file:=irb910sc_3_45.xacro moveit_config_package:=abb_irb910sc_3_45_moveit_config controllers_file:=abb_irb910sc_controllers.yaml moveit_config_file:=abb_irb910sc_3_45.srdf.xacro tf_publisher_launch_file:=irb910sc_tf.launch.py planner_config_package:=nexus_integration_tests planner_config_file:=irb910sc_planner_params.yaml sku_detection_params_file:=irb910sc_detection.yaml zenoh_config_file:=workcell_1.json5 headless:=False
ros2 launch nexus_demos workcell.launch.py workcell_id:=workcell_1 ros_domain_id:=1 support_package:=abb_irb910sc_support robot_xacro_file:=irb910sc_3_45.xacro moveit_config_package:=abb_irb910sc_3_45_moveit_config controllers_file:=abb_irb910sc_controllers.yaml moveit_config_file:=abb_irb910sc_3_45.srdf.xacro tf_publisher_launch_file:=irb910sc_tf.launch.py planner_config_package:=nexus_demos planner_config_file:=irb910sc_planner_params.yaml sku_detection_params_file:=irb910sc_detection.yaml zenoh_config_file:=workcell_1.json5 headless:=False
```

### IRB1300 Workcell
```bash
ros2 launch nexus_integration_tests workcell.launch.py workcell_id:=workcell_2 ros_domain_id:=2 support_package:=abb_irb1300_support robot_xacro_file:=irb1300_10_115.xacro moveit_config_package:=abb_irb1300_10_115_moveit_config controllers_file:=abb_irb1300_controllers.yaml moveit_config_file:=abb_irb1300_10_115.srdf.xacro tf_publisher_launch_file:=irb1300_tf.launch.py sku_detection_params_file:=irb1300_detection.yaml zenoh_config_file:=workcell_2.json5 headless:=False
ros2 launch nexus_demos workcell.launch.py workcell_id:=workcell_2 ros_domain_id:=2 support_package:=abb_irb1300_support robot_xacro_file:=irb1300_10_115.xacro moveit_config_package:=abb_irb1300_10_115_moveit_config controllers_file:=abb_irb1300_controllers.yaml moveit_config_file:=abb_irb1300_10_115.srdf.xacro tf_publisher_launch_file:=irb1300_tf.launch.py sku_detection_params_file:=irb1300_detection.yaml zenoh_config_file:=workcell_2.json5 headless:=False
```

## Submit a job
Expand Down Expand Up @@ -75,7 +75,7 @@ ros2 action send_goal /test_workcell/request nexus_orchestrator_msgs/action/Work
Gripper position from 0 to `gripper_max_value`:

```bash
ros2 run nexus_integration_tests mock_gripper --ros-args -p gripper_max_value:=0.5
ros2 run nexus_demos mock_gripper --ros-args -p gripper_max_value:=0.5
```

To transition lifecycle states
Expand Down Expand Up @@ -112,7 +112,7 @@ sku_id2:
Save this file and launch the vision mock node:

```bash
ros2 run nexus_integration_tests mock_detection --ros-args -p config_file:=<path config file>
ros2 run nexus_demos mock_detection --ros-args -p config_file:=<path config file>
```

To transition lifecycle states
Expand All @@ -138,7 +138,7 @@ ros2 run nexus_transporter nexus_transporter_node --ros-args -p transporter_plug
## mock_printer
To launch the mock printer:
```bash
ros2 run nexus_integration_tests mock_printer_node
ros2 run nexus_demos mock_printer_node
```

To transition lifecycle states
Expand All @@ -155,7 +155,7 @@ ros2 service call /mock_printer/dispense nexus_dispenser_msgs/srv/Dispense '{}'
## mock_robot_arm_controller
To launch the mock_robot_arm_controller
```bash
ros2 run nexus_integration_tests mock_robot_arm_controller
ros2 run nexus_demos mock_robot_arm_controller
```

To launch the mock_robot_arm_controller
Expand All @@ -175,33 +175,33 @@ ros2 action send_goal /joint_trajectory_position_controller/follow_joint_traject
First launch `abb_control`
```bash
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_integration_tests description_package:=abb_irb910sc_support description_file:=irb910sc_3_45.xacro launch_rviz:=false moveit_config_package:=abb_irb910sc_3_45_moveit_config use_fake_hardware:=true controllers_file:=abb_irb910sc_controllers.yaml
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_demos description_package:=abb_irb910sc_support description_file:=irb910sc_3_45.xacro launch_rviz:=false moveit_config_package:=abb_irb910sc_3_45_moveit_config use_fake_hardware:=true controllers_file:=abb_irb910sc_controllers.yaml
```

If running with real robot
```bash
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_integration_tests description_package:=abb_irb910sc_support description_file:=irb910sc_3_45.xacro launch_rviz:=false moveit_config_package:=abb_irb910sc_3_45_moveit_config use_fake_hardware:=true controllers_file:=abb_irb910sc_controllers.yaml use_fake_hardware:=false rws_ip:=<ROBOTSTUDIO_IP>
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_demos description_package:=abb_irb910sc_support description_file:=irb910sc_3_45.xacro launch_rviz:=false moveit_config_package:=abb_irb910sc_3_45_moveit_config use_fake_hardware:=true controllers_file:=abb_irb910sc_controllers.yaml use_fake_hardware:=false rws_ip:=<ROBOTSTUDIO_IP>
```

Then launch moveit
```bash
ros2 launch nexus_integration_tests abb_irb910sc_moveit.launch.py
ros2 launch nexus_demos abb_irb910sc_moveit.launch.py
```

### IRB1300

For more information see README in `abb_ros2` repo.
First launch `abb_control`
```bash
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_integration_tests description_package:=abb_irb1300_support description_file:=irb1300_10_115.xacro launch_rviz:=false moveit_config_package:=abb_irb1300_10_115_moveit_config use_fake_hardware:=true controllers_file:=abb_irb1300_controllers.yaml
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_demos description_package:=abb_irb1300_support description_file:=irb1300_10_115.xacro launch_rviz:=false moveit_config_package:=abb_irb1300_10_115_moveit_config use_fake_hardware:=true controllers_file:=abb_irb1300_controllers.yaml
```

If running with real robot
```bash
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_integration_tests description_package:=abb_irb1300_support description_file:=irb1300_10_115.xacro launch_rviz:=false moveit_config_package:=abb_irb1300_10_114_moveit_config use_fake_hardware:=true controllers_file:=abb_irb1300_controllers.yaml use_fake_hardware:=false rws_ip:=<ROBOTSTUDIO_IP>
ros2 launch abb_bringup abb_control.launch.py runtime_config_package:=nexus_demos description_package:=abb_irb1300_support description_file:=irb1300_10_115.xacro launch_rviz:=false moveit_config_package:=abb_irb1300_10_114_moveit_config use_fake_hardware:=true controllers_file:=abb_irb1300_controllers.yaml use_fake_hardware:=false rws_ip:=<ROBOTSTUDIO_IP>
```

Then launch moveit
```bash
ros2 launch nexus_integration_tests abb_irb1300_moveit.launch.py
ros2 launch nexus_demos abb_irb1300_moveit.launch.py
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_launch_description():
declared_arguments.append(
DeclareLaunchArgument(
"runtime_config_package",
default_value="nexus_integration_tests",
default_value="nexus_demos",
description='Package with the controller\'s configuration in "config" folder. \
Usually the argument is not set, it enables use of a custom setup.',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def launch_setup(context, *args, **kwargs):
[
PathJoinSubstitution(
[
FindPackageShare("nexus_integration_tests"),
FindPackageShare("nexus_demos"),
"launch",
"rmf_transporter.launch.xml",
]
Expand Down Expand Up @@ -182,7 +182,7 @@ def launch_setup(context, *args, **kwargs):
mock_emergency_alarm_node = LifecycleNode(
name="mock_emergency_alarm",
namespace="",
package="nexus_integration_tests",
package="nexus_demos",
executable="mock_emergency_alarm",
)

Expand All @@ -200,7 +200,7 @@ def launch_setup(context, *args, **kwargs):
[
PathJoinSubstitution(
[
FindPackageShare("nexus_integration_tests"),
FindPackageShare("nexus_demos"),
"launch",
"zenoh_bridge.launch.py",
]
Expand Down Expand Up @@ -264,7 +264,7 @@ def generate_launch_description():
),
DeclareLaunchArgument(
name="zenoh_config_package",
default_value="nexus_integration_tests",
default_value="nexus_demos",
description="Package containing Zenoh DDS bridge configurations",
),
DeclareLaunchArgument(
Expand Down Expand Up @@ -299,12 +299,12 @@ def generate_launch_description():
),
DeclareLaunchArgument(
"nexus_rviz_config",
default_value=os.path.join(get_package_share_directory("nexus_integration_tests"), "rviz", "nexus_panel.rviz"),
default_value=os.path.join(get_package_share_directory("nexus_demos"), "rviz", "nexus_panel.rviz"),
description="Absolute path to an RViZ config file.",
),
DeclareLaunchArgument(
"system_orchestrator_bt_dir",
default_value=os.path.join(get_package_share_directory("nexus_integration_tests"), "config", "system_bts"),
default_value=os.path.join(get_package_share_directory("nexus_demos"), "config", "system_bts"),
description="Absolute path directory containing BTs for the system orchestrator.",
),
DeclareLaunchArgument(
Expand Down
Loading

0 comments on commit b572dab

Please sign in to comment.