Skip to content

Commit 1438d04

Browse files
authored
Merge pull request #78 from AGH-CEAI/feature/add_disable_cell_option
Add disable cell option
2 parents a01fe26 + efb36a4 commit 1438d04

File tree

10 files changed

+128
-78
lines changed

10 files changed

+128
-78
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repos:
3535
args: [-w]
3636

3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: v0.14.8
38+
rev: v0.14.9
3939
hooks:
4040
- id: ruff
4141
args:

aegis_bringup/CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
12+
* [PR-78](https://github.com/AGH-CEAI/aegis_ros/pull/78) - Introduced `disable_cell` and `disable_cell_collision` launch arguments.
13+
1114
### Changed
1215

16+
* [PR-78](https://github.com/AGH-CEAI/aegis_ros/pull/78) - Updated README.
1317
* [PR-73](https://github.com/AGH-CEAI/aegis_ros/pull/73) - Updated PlantUML launch files diagram.
14-
* [PR-63](https://github.com/AGH-CEAI/aegis_ros/pull/63) - Updated readme.
18+
* [PR-63](https://github.com/AGH-CEAI/aegis_ros/pull/63) - Updated README.
1519
* [PR-60](https://github.com/AGH-CEAI/aegis_ros/pull/60) - Updated launch files diagram.
1620

1721
### Deprecated
@@ -29,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2933

3034
### Added
3135

32-
* [PR-9](https://github.com/AGH-CEAI/aegis_ros/pull/9) - Introduced `mock_hardware` and `launch_rviz` launch args.
36+
* [PR-9](https://github.com/AGH-CEAI/aegis_ros/pull/9) - Introduced `mock_hardware` and `launch_rviz` launch arguments.
3337
* [PR-7](https://github.com/AGH-CEAI/aegis_ros/pull/7) - Initial version of the Aegis ROS 2 packages.
3438

3539
### Changed

aegis_bringup/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package provides the configuration and launch files required to enable all
99
## Run the project
1010

1111
> [!CAUTION]
12-
> Never startup the project on the real hardware unattended!
12+
> Never start the project on real hardware unattended!
1313
1414
1. Ensure that the `ros2_driver` program on the robot is loaded, and the robot is set to the `Remote` mode (the top-right corner on the teach pendant).
1515

@@ -21,13 +21,15 @@ ros2 launch aegis_bringup bringup.launch.py
2121
ros2 launch aegis_bringup bringup.launch.py mock_hardware:=false launch_rviz:=true
2222
```
2323

24-
And you are ready to go!
24+
The system should now be up and running!
2525

2626
Possible launch arguments:
27-
* `mock_hardware:={false, true}` (default: `false`) - enables the _fake_hardware_ feature of the ros2_control (the simplest "simulation").
28-
* `launch_rviz:={false, true}` (default: `true`) - launches visualization in RViz.
27+
* `mock_hardware:={false, true}` (default: `false`) – enables the _fake_hardware_ feature of the `ros2_control` (the simplest "simulation")
28+
* `launch_rviz:={false, true}` (default: `true`) – launches visualization in RViz
29+
* `disable_cell:={false, true}` (default: `false`) – completely removes the cell from the robot description
30+
* `disable_cell_collision:={false, true}` (default: `false`) – keeps the cell visual geometry but removes its collision geometry
2931

30-
### Control the the client program on the robot via dashboard service:
32+
### Control the client program on the robot via dashboard service:
3133

3234
```bash
3335
# Stop the program

aegis_bringup/launch/bringup.launch.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,24 @@ def generate_launch_description() -> LaunchDescription:
120120
)
121121
)
122122

123+
declared_arguments.append(
124+
DeclareLaunchArgument(
125+
"disable_cell",
126+
default_value=EnvironmentVariable("DISABLE_CELL", default_value="false"),
127+
description="Exclude the cell from description.",
128+
)
129+
)
130+
131+
declared_arguments.append(
132+
DeclareLaunchArgument(
133+
"disable_cell_collision",
134+
default_value=EnvironmentVariable(
135+
"DISABLE_CELL_COLLISION", default_value="false"
136+
),
137+
description="Exclude the cell collision from description.",
138+
)
139+
)
140+
123141
declared_arguments.append(
124142
DeclareLaunchArgument(
125143
"launch_rviz",

aegis_description/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
12+
* [PR-78](https://github.com/AGH-CEAI/aegis_ros/pull/78) - Added logic to allow selective inclusion of cell visual and collision geometry.
13+
1114
### Changed
1215

1316
* [PR-77](https://github.com/AGH-CEAI/aegis_ros/pull/77) - Changed `ur_base` frame to the `world` frame (simulation simplification).

aegis_description/launch/robot_description.launch.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
def generate_launch_description():
1515
tf_prefix = LaunchConfiguration("tf_prefix", default="")
1616
mock_hardware = LaunchConfiguration("mock_hardware", default="false")
17+
disable_cell = LaunchConfiguration("disable_cell", default="false")
18+
disable_cell_collision = LaunchConfiguration(
19+
"disable_cell_collision", default="false"
20+
)
1721

1822
robot_description_str = Command(
1923
[
@@ -32,6 +36,12 @@ def generate_launch_description():
3236
" ",
3337
"mock_hardware:=",
3438
mock_hardware,
39+
" ",
40+
"disable_cell:=",
41+
disable_cell,
42+
" ",
43+
"disable_cell_collision:=",
44+
disable_cell_collision,
3545
]
3646
)
3747

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0"?>
22
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="aegis">
33
<xacro:arg name="mock_hardware" default="false"/>
4+
<xacro:arg name="disable_cell" default="false"/>
5+
<xacro:arg name="disable_cell_collision" default="false"/>
46

57
<xacro:arg name="base_link" default="world"/>
68
<xacro:arg name="prefix" default=""/>
@@ -9,5 +11,12 @@
911
<xacro:include filename="$(find aegis_description)/urdf/aegis.xacro"/>
1012

1113
<link name="$(arg base_link)"/>
12-
<xacro:aegis_robot parent="$(arg base_link)" tf_prefix="$(arg tf_prefix)" prefix="$(arg prefix)" mock_hardware="$(arg mock_hardware)"/>
14+
<xacro:aegis_robot
15+
parent="$(arg base_link)"
16+
tf_prefix="$(arg tf_prefix)"
17+
prefix="$(arg prefix)"
18+
mock_hardware="$(arg mock_hardware)"
19+
disable_cell="$(arg disable_cell)"
20+
disable_cell_collision="$(arg disable_cell_collision)"
21+
/>
1322
</robot>

aegis_description/urdf/aegis.xacro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<xacro:include filename="$(find aegis_description)/urdf/modules/camera_tool_basler.xacro"/>
1414
<xacro:include filename="$(find aegis_description)/urdf/modules/lens_computar.xacro"/>
1515

16-
<xacro:macro name="aegis_robot" params="parent tf_prefix prefix mock_hardware">
17-
<xacro:cell parent="${parent}"/>
16+
<xacro:macro name="aegis_robot" params="parent tf_prefix prefix mock_hardware disable_cell disable_cell_collision">
17+
<xacro:cell parent="${parent}" disable_cell="${disable_cell}" disable_cell_collision="${disable_cell_collision}"/>
1818
<xacro:ur_definition name="aegis" parent="${parent}" tf_prefix="${tf_prefix}" mock_hardware="${mock_hardware}"/>
1919
<xacro:adapter_to_sensor parent="tool0" prefix="${prefix}"/>
2020
<xacro:ft_sensor_schunk_axia80 parent="adapter_to_sensor_end" prefix="${prefix}" mock_hardware="${mock_hardware}"/>
@@ -23,7 +23,7 @@
2323
<xacro:mount_camera_tool_luxonis parent="adapter_mount_front" prefix="${prefix}"/>
2424
<xacro:mount_camera_tool_basler parent="adapter_mount_right" prefix="${prefix}" side="right"/>
2525
<xacro:mount_camera_tool_basler parent="adapter_mount_left" prefix="${prefix}" side="left"/>
26-
<xacro:camera_scene_luxonis parent="cell"/>
26+
<xacro:camera_scene_luxonis parent="base_link"/>
2727
<xacro:camera_tool_luxonis parent="mount_front_end" prefix="${prefix}"/>
2828
<xacro:camera_tool_basler parent="mount_right_end" prefix="${prefix}" side="right"/>
2929
<xacro:camera_tool_basler parent="mount_left_end" prefix="${prefix}" side="left"/>

aegis_description/urdf/modules/camera_scene_luxonis.xacro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
parent="${parent}"
1414
camera_model="$(arg scene_camera_model)"
1515
base_frame="$(arg scene_camera_base_frame)"
16-
cam_pos_x="0.014"
17-
cam_pos_y="0.33"
18-
cam_pos_z="1.972"
19-
cam_roll="${pi / 2}"
16+
cam_pos_x="0.33"
17+
cam_pos_y="0.014"
18+
cam_pos_z="1.166"
19+
cam_roll="0"
2020
cam_pitch="${pi / 2}"
2121
cam_yaw="0"
2222
rs_compat="$(arg scene_camera_rs_compat)"
Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,71 @@
11
<?xml version="1.0"?>
22
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3-
<xacro:macro name="cell" params="parent">
4-
<joint name="world_to_cell" type="fixed">
5-
<origin xyz="0 0 -0.806" rpy="0 0 -${0.5 * pi}"/>
6-
<parent link="${parent}"/>
7-
<child link="cell"/>
8-
</joint>
3+
<xacro:macro name="cell" params="parent disable_cell disable_cell_collision">
4+
<xacro:unless value="${disable_cell}">
5+
<joint name="world_to_cell" type="fixed">
6+
<origin xyz="0 0 -0.806" rpy="0 0 -${0.5 * pi}"/>
7+
<parent link="${parent}"/>
8+
<child link="cell"/>
9+
</joint>
910

10-
<link name="cell">
11-
<visual>
12-
<origin xyz="-0.460 -0.240 0.786" rpy="0 0 0"/>
13-
<geometry>
14-
<mesh filename="package://aegis_description/meshes/cell.dae" scale="1.0 1.0 1.0"/>
15-
</geometry>
16-
</visual>
17-
<collision>
18-
<origin xyz="0 -0.162 0.435" rpy="0 0 0"/>
19-
<geometry>
20-
<box size="0.72 0.324 0.87"/>
21-
</geometry>
22-
</collision>
23-
<collision>
24-
<origin xyz="0 0.162 0.41" rpy="0 0 0"/>
25-
<geometry>
26-
<box size="0.72 0.324 0.82"/>
27-
</geometry>
28-
</collision>
29-
<collision>
30-
<origin xyz="0.48 0 0.97" rpy="0 0 0"/>
31-
<geometry>
32-
<box size="0.08 0.648 1.94"/>
33-
</geometry>
34-
</collision>
35-
<collision>
36-
<origin xyz="0.4 0 0.435" rpy="0 0 0"/>
37-
<geometry>
38-
<box size="0.08 0.648 0.87"/>
39-
</geometry>
40-
</collision>
41-
<collision>
42-
<origin xyz="-0.48 0 0.97" rpy="0 0 0"/>
43-
<geometry>
44-
<box size="0.08 0.648 1.94"/>
45-
</geometry>
46-
</collision>
47-
<collision>
48-
<origin xyz="-0.4 0 0.435" rpy="0 0 0"/>
49-
<geometry>
50-
<box size="0.08 0.648 0.87"/>
51-
</geometry>
52-
</collision>
53-
<collision>
54-
<origin xyz="0 0.04 1.98" rpy="0 0 0"/>
55-
<geometry>
56-
<box size="1.04 0.728 0.08"/>
57-
</geometry>
58-
</collision>
59-
<collision>
60-
<origin xyz="0 -0.62 1.2" rpy="0 0 0"/>
61-
<geometry>
62-
<box size="2.4 0.02 2.4"/>
63-
</geometry>
64-
</collision>
65-
</link>
11+
<link name="cell">
12+
<visual>
13+
<origin xyz="-0.460 -0.240 0.786" rpy="0 0 0"/>
14+
<geometry>
15+
<mesh filename="package://aegis_description/meshes/cell.dae" scale="1.0 1.0 1.0"/>
16+
</geometry>
17+
</visual>
18+
<xacro:unless value="${disable_cell_collision}">
19+
<collision>
20+
<origin xyz="0 -0.162 0.435" rpy="0 0 0"/>
21+
<geometry>
22+
<box size="0.72 0.324 0.87"/>
23+
</geometry>
24+
</collision>
25+
<collision>
26+
<origin xyz="0 0.162 0.41" rpy="0 0 0"/>
27+
<geometry>
28+
<box size="0.72 0.324 0.82"/>
29+
</geometry>
30+
</collision>
31+
<collision>
32+
<origin xyz="0.48 0 0.97" rpy="0 0 0"/>
33+
<geometry>
34+
<box size="0.08 0.648 1.94"/>
35+
</geometry>
36+
</collision>
37+
<collision>
38+
<origin xyz="0.4 0 0.435" rpy="0 0 0"/>
39+
<geometry>
40+
<box size="0.08 0.648 0.87"/>
41+
</geometry>
42+
</collision>
43+
<collision>
44+
<origin xyz="-0.48 0 0.97" rpy="0 0 0"/>
45+
<geometry>
46+
<box size="0.08 0.648 1.94"/>
47+
</geometry>
48+
</collision>
49+
<collision>
50+
<origin xyz="-0.4 0 0.435" rpy="0 0 0"/>
51+
<geometry>
52+
<box size="0.08 0.648 0.87"/>
53+
</geometry>
54+
</collision>
55+
<collision>
56+
<origin xyz="0 0.04 1.98" rpy="0 0 0"/>
57+
<geometry>
58+
<box size="1.04 0.728 0.08"/>
59+
</geometry>
60+
</collision>
61+
<collision>
62+
<origin xyz="0 -0.62 1.2" rpy="0 0 0"/>
63+
<geometry>
64+
<box size="2.4 0.02 2.4"/>
65+
</geometry>
66+
</collision>
67+
</xacro:unless>
68+
</link>
69+
</xacro:unless>
6670
</xacro:macro>
6771
</robot>

0 commit comments

Comments
 (0)