Skip to content

Commit 7772351

Browse files
committed
Add initial placeholder samples and sample test scripts
1 parent 5ff311b commit 7772351

24 files changed

+1344
-0
lines changed

clearpath_generator_common/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ install(
3333
RUNTIME DESTINATION lib/clearpath_generator_common
3434
INCLUDES DESTINATION lib/clearpath_generator_common
3535
)
36+
install(DIRECTORY samples
37+
DESTINATION share/${PROJECT_NAME}
38+
)
3639

3740
ament_python_install_package(${PROJECT_NAME})
3841

@@ -53,6 +56,7 @@ if(BUILD_TESTING)
5356
test/test_generator_description.py
5457
test/test_generator_discovery_server.py
5558
test/test_generator_vcan.py
59+
test/test_samples.py
5660
)
5761
foreach(_test_path ${_pytest_tests})
5862
get_filename_component(_test_name ${_test_path} NAME_WE)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source /opt/ros/jazzy/setup.bash
2+
echo "Discovery server not enabled. If this was launched as a service then the service will now end."
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--This does not replace URDF, and is not an extension of URDF.
3+
This is a format for representing semantic information about the robot structure.
4+
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
5+
-->
6+
<robot name="a200-0000">
7+
<!--DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. -->
8+
<disable_collisions link1="backpack_masts_link" link2="backpack_shell_link" reason="Adjacent"/>
9+
<disable_collisions link1="backpack_masts_link" link2="base_link" reason="Never"/>
10+
<disable_collisions link1="backpack_masts_link" link2="camera_0_link" reason="Never"/>
11+
<disable_collisions link1="backpack_masts_link" link2="camera_1_link" reason="Never"/>
12+
<disable_collisions link1="backpack_masts_link" link2="camera_2_body_link" reason="Never"/>
13+
<disable_collisions link1="backpack_masts_link" link2="camera_2_head_link" reason="Never"/>
14+
<disable_collisions link1="backpack_masts_link" link2="front_left_wheel_link" reason="Never"/>
15+
<disable_collisions link1="backpack_masts_link" link2="front_right_wheel_link" reason="Never"/>
16+
<disable_collisions link1="backpack_masts_link" link2="rear_left_wheel_link" reason="Never"/>
17+
<disable_collisions link1="backpack_masts_link" link2="rear_right_wheel_link" reason="Never"/>
18+
<disable_collisions link1="backpack_shell_link" link2="base_link" reason="Adjacent"/>
19+
<disable_collisions link1="backpack_shell_link" link2="camera_0_link" reason="Adjacent"/>
20+
<disable_collisions link1="backpack_shell_link" link2="camera_1_link" reason="Adjacent"/>
21+
<disable_collisions link1="backpack_shell_link" link2="camera_2_body_link" reason="Adjacent"/>
22+
<disable_collisions link1="backpack_shell_link" link2="camera_2_head_link" reason="Never"/>
23+
<disable_collisions link1="backpack_shell_link" link2="front_left_wheel_link" reason="Never"/>
24+
<disable_collisions link1="backpack_shell_link" link2="front_right_wheel_link" reason="Never"/>
25+
<disable_collisions link1="backpack_shell_link" link2="gps_0_link" reason="Adjacent"/>
26+
<disable_collisions link1="backpack_shell_link" link2="gps_1_link" reason="Adjacent"/>
27+
<disable_collisions link1="backpack_shell_link" link2="lidar3d_0_link" reason="Adjacent"/>
28+
<disable_collisions link1="backpack_shell_link" link2="rear_left_wheel_link" reason="Never"/>
29+
<disable_collisions link1="backpack_shell_link" link2="rear_right_wheel_link" reason="Never"/>
30+
<disable_collisions link1="base_link" link2="camera_0_link" reason="Never"/>
31+
<disable_collisions link1="base_link" link2="camera_1_link" reason="Never"/>
32+
<disable_collisions link1="base_link" link2="camera_2_body_link" reason="Never"/>
33+
<disable_collisions link1="base_link" link2="camera_2_head_link" reason="Never"/>
34+
<disable_collisions link1="base_link" link2="front_left_wheel_link" reason="Adjacent"/>
35+
<disable_collisions link1="base_link" link2="front_right_wheel_link" reason="Adjacent"/>
36+
<disable_collisions link1="base_link" link2="gps_0_link" reason="Never"/>
37+
<disable_collisions link1="base_link" link2="gps_1_link" reason="Never"/>
38+
<disable_collisions link1="base_link" link2="lidar3d_0_link" reason="Never"/>
39+
<disable_collisions link1="base_link" link2="rear_left_wheel_link" reason="Adjacent"/>
40+
<disable_collisions link1="base_link" link2="rear_right_wheel_link" reason="Adjacent"/>
41+
<disable_collisions link1="camera_0_link" link2="camera_1_link" reason="Never"/>
42+
<disable_collisions link1="camera_0_link" link2="camera_2_body_link" reason="Never"/>
43+
<disable_collisions link1="camera_0_link" link2="camera_2_head_link" reason="Never"/>
44+
<disable_collisions link1="camera_0_link" link2="front_left_wheel_link" reason="Never"/>
45+
<disable_collisions link1="camera_0_link" link2="front_right_wheel_link" reason="Never"/>
46+
<disable_collisions link1="camera_0_link" link2="gps_0_link" reason="Never"/>
47+
<disable_collisions link1="camera_0_link" link2="gps_1_link" reason="Never"/>
48+
<disable_collisions link1="camera_0_link" link2="lidar3d_0_link" reason="Never"/>
49+
<disable_collisions link1="camera_0_link" link2="rear_left_wheel_link" reason="Never"/>
50+
<disable_collisions link1="camera_0_link" link2="rear_right_wheel_link" reason="Never"/>
51+
<disable_collisions link1="camera_1_link" link2="camera_2_body_link" reason="Never"/>
52+
<disable_collisions link1="camera_1_link" link2="camera_2_head_link" reason="Never"/>
53+
<disable_collisions link1="camera_1_link" link2="front_left_wheel_link" reason="Never"/>
54+
<disable_collisions link1="camera_1_link" link2="front_right_wheel_link" reason="Never"/>
55+
<disable_collisions link1="camera_1_link" link2="gps_0_link" reason="Never"/>
56+
<disable_collisions link1="camera_1_link" link2="gps_1_link" reason="Never"/>
57+
<disable_collisions link1="camera_1_link" link2="lidar3d_0_link" reason="Never"/>
58+
<disable_collisions link1="camera_1_link" link2="rear_left_wheel_link" reason="Never"/>
59+
<disable_collisions link1="camera_1_link" link2="rear_right_wheel_link" reason="Never"/>
60+
<disable_collisions link1="camera_2_body_link" link2="camera_2_head_link" reason="Adjacent"/>
61+
<disable_collisions link1="camera_2_body_link" link2="front_left_wheel_link" reason="Never"/>
62+
<disable_collisions link1="camera_2_body_link" link2="front_right_wheel_link" reason="Never"/>
63+
<disable_collisions link1="camera_2_body_link" link2="gps_0_link" reason="Never"/>
64+
<disable_collisions link1="camera_2_body_link" link2="gps_1_link" reason="Never"/>
65+
<disable_collisions link1="camera_2_body_link" link2="lidar3d_0_link" reason="Never"/>
66+
<disable_collisions link1="camera_2_body_link" link2="rear_left_wheel_link" reason="Never"/>
67+
<disable_collisions link1="camera_2_body_link" link2="rear_right_wheel_link" reason="Never"/>
68+
<disable_collisions link1="camera_2_head_link" link2="front_left_wheel_link" reason="Never"/>
69+
<disable_collisions link1="camera_2_head_link" link2="front_right_wheel_link" reason="Never"/>
70+
<disable_collisions link1="camera_2_head_link" link2="gps_0_link" reason="Never"/>
71+
<disable_collisions link1="camera_2_head_link" link2="gps_1_link" reason="Never"/>
72+
<disable_collisions link1="camera_2_head_link" link2="lidar3d_0_link" reason="Never"/>
73+
<disable_collisions link1="camera_2_head_link" link2="rear_left_wheel_link" reason="Never"/>
74+
<disable_collisions link1="camera_2_head_link" link2="rear_right_wheel_link" reason="Never"/>
75+
<disable_collisions link1="front_left_wheel_link" link2="front_right_wheel_link" reason="Never"/>
76+
<disable_collisions link1="front_left_wheel_link" link2="gps_0_link" reason="Never"/>
77+
<disable_collisions link1="front_left_wheel_link" link2="gps_1_link" reason="Never"/>
78+
<disable_collisions link1="front_left_wheel_link" link2="lidar3d_0_link" reason="Never"/>
79+
<disable_collisions link1="front_left_wheel_link" link2="rear_left_wheel_link" reason="Never"/>
80+
<disable_collisions link1="front_left_wheel_link" link2="rear_right_wheel_link" reason="Never"/>
81+
<disable_collisions link1="front_right_wheel_link" link2="gps_0_link" reason="Never"/>
82+
<disable_collisions link1="front_right_wheel_link" link2="gps_1_link" reason="Never"/>
83+
<disable_collisions link1="front_right_wheel_link" link2="lidar3d_0_link" reason="Never"/>
84+
<disable_collisions link1="front_right_wheel_link" link2="rear_left_wheel_link" reason="Never"/>
85+
<disable_collisions link1="front_right_wheel_link" link2="rear_right_wheel_link" reason="Never"/>
86+
<disable_collisions link1="gps_0_link" link2="gps_1_link" reason="Never"/>
87+
<disable_collisions link1="gps_0_link" link2="lidar3d_0_link" reason="Never"/>
88+
<disable_collisions link1="gps_0_link" link2="rear_left_wheel_link" reason="Never"/>
89+
<disable_collisions link1="gps_0_link" link2="rear_right_wheel_link" reason="Never"/>
90+
<disable_collisions link1="gps_1_link" link2="lidar3d_0_link" reason="Never"/>
91+
<disable_collisions link1="gps_1_link" link2="rear_left_wheel_link" reason="Never"/>
92+
<disable_collisions link1="gps_1_link" link2="rear_right_wheel_link" reason="Never"/>
93+
<disable_collisions link1="lidar3d_0_link" link2="rear_left_wheel_link" reason="Never"/>
94+
<disable_collisions link1="lidar3d_0_link" link2="rear_right_wheel_link" reason="Never"/>
95+
<disable_collisions link1="rear_left_wheel_link" link2="rear_right_wheel_link" reason="Never"/>
96+
</robot>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="a200-0000">
3+
4+
<!-- Arms -->
5+
6+
7+
<!-- Grippers -->
8+
9+
10+
<!-- Lifts -->
11+
12+
13+
</robot>
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="a200-0000">
3+
4+
<!-- Common -->
5+
<xacro:include filename="$(find clearpath_platform_description)/urdf/common.urdf.xacro"/>
6+
7+
<!-- Platform -->
8+
<xacro:include filename="$(find clearpath_platform_description)/urdf/a200/a200.urdf.xacro"/>
9+
<xacro:a200 control="diff_4wd" front_wheels="outdoor" rear_wheels="outdoor"/>
10+
11+
12+
<!-- Attachments -->
13+
14+
<xacro:include filename="$(find clearpath_platform_description)/urdf/a200/attachments/bumper.urdf.xacro"/>
15+
<xacro:bumper name="front_bumper" model="default" parent_link="front_bumper_mount" extension="0.0">
16+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
17+
</xacro:bumper>
18+
19+
<xacro:include filename="$(find clearpath_platform_description)/urdf/a200/attachments/bumper.urdf.xacro"/>
20+
<xacro:bumper name="rear_bumper" model="default" parent_link="rear_bumper_mount" extension="0.0">
21+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
22+
</xacro:bumper>
23+
24+
<xacro:include filename="$(find clearpath_platform_description)/urdf/a200/attachments/observer_backpack.urdf.xacro"/>
25+
<xacro:observer_backpack name="backpack" model="observer_backpack" parent_link="default_mount">
26+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
27+
</xacro:observer_backpack>
28+
29+
30+
<!-- Links -->
31+
32+
33+
<!-- Mounts -->
34+
35+
36+
<!-- Sensors -->
37+
38+
<!-- lidar2d_0 -->
39+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/hokuyo_ust.urdf.xacro"/>
40+
<xacro:hokuyo_ust name="lidar2d_0" parent_link="backpack_front_lidar_mount" ang_res="0.5" min_ang="-1.5707963267948966" max_ang="1.5707963267948966" min_range="0.05" max_range="25.0" update_rate="40">
41+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
42+
</xacro:hokuyo_ust>
43+
44+
<!-- lidar2d_1 -->
45+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/hokuyo_ust.urdf.xacro"/>
46+
<xacro:hokuyo_ust name="lidar2d_1" parent_link="backpack_rear_lidar_mount" ang_res="0.5" min_ang="-1.5707963267948966" max_ang="1.5707963267948966" min_range="0.05" max_range="25.0" update_rate="40">
47+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
48+
</xacro:hokuyo_ust>
49+
50+
<!-- lidar3d_0 -->
51+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/velodyne_lidar.urdf.xacro"/>
52+
<xacro:velodyne_lidar name="lidar3d_0" parent_link="backpack_center_lidar_mount" ang_res_h="0.4" ang_res_v="2.0" min_ang_h="-3.141592" max_ang_h="3.141592" min_ang_v="-0.261799" max_ang_v="0.261799" min_range="0.9" max_range="130.0" update_rate="20">
53+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
54+
</xacro:velodyne_lidar>
55+
56+
<!-- camera_0 -->
57+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/intel_realsense.urdf.xacro"/>
58+
<xacro:intel_realsense name="camera_0" parent_link="backpack_front_realsense_mount" update_rate="30" image_height="480" image_width="640" model="d435">
59+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
60+
</xacro:intel_realsense>
61+
62+
<!-- camera_1 -->
63+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/intel_realsense.urdf.xacro"/>
64+
<xacro:intel_realsense name="camera_1" parent_link="backpack_rear_realsense_mount" update_rate="30" image_height="480" image_width="640" model="d435">
65+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
66+
</xacro:intel_realsense>
67+
68+
<!-- camera_2 -->
69+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/axis_camera.urdf.xacro"/>
70+
<xacro:axis_camera name="camera_2" parent_link="backpack_center_mount" update_rate="20" model="q62">
71+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
72+
</xacro:axis_camera>
73+
74+
<!-- imu_0 -->
75+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/microstrain_imu.urdf.xacro"/>
76+
<xacro:microstrain_imu name="imu_0" parent_link="backpack_imu_mount" update_rate="100">
77+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
78+
</xacro:microstrain_imu>
79+
80+
<!-- gps_0 -->
81+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/swiftnav_duro.urdf.xacro"/>
82+
<xacro:swiftnav_duro name="gps_0" parent_link="backpack_right_antenna_mount">
83+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
84+
</xacro:swiftnav_duro>
85+
86+
<!-- gps_1 -->
87+
<xacro:include filename="$(find clearpath_sensors_description)/urdf/swiftnav_duro.urdf.xacro"/>
88+
<xacro:swiftnav_duro name="gps_1" parent_link="backpack_left_antenna_mount">
89+
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
90+
</xacro:swiftnav_duro>
91+
92+
93+
<!-- Manipulators -->
94+
95+
96+
<!-- Extras -->
97+
98+
99+
</robot>
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
serial_number: a201-0000
2+
version: 0
3+
system:
4+
hosts:
5+
- hostname: cpr-a201-0000
6+
ip: 192.168.131.1
7+
ros2:
8+
namespace: a201_0000
9+
platform:
10+
attachments:
11+
- name: front_bumper
12+
type: a200.bumper
13+
parent: front_bumper_mount
14+
- name: rear_bumper
15+
type: a200.bumper
16+
parent: rear_bumper_mount
17+
- name: backpack
18+
type: a200.observer_backpack
19+
sensors:
20+
lidar2d:
21+
- model: hokuyo_ust
22+
urdf_enabled: true
23+
launch_enabled: true
24+
parent: backpack_front_lidar_mount
25+
ros_parameters:
26+
urg_node:
27+
laser_frame_id: lidar2d_0_laser
28+
ip_address: 192.168.131.21
29+
ip_port: 10940
30+
angle_min: -1.5707963267948966
31+
angle_max: 1.5707963267948966
32+
- model: hokuyo_ust
33+
urdf_enabled: true
34+
launch_enabled: true
35+
parent: backpack_rear_lidar_mount
36+
ros_parameters:
37+
urg_node:
38+
laser_frame_id: lidar2d_1_laser
39+
ip_address: 192.168.131.22
40+
ip_port: 10940
41+
angle_min: -1.5707963267948966
42+
angle_max: 1.5707963267948966
43+
lidar3d:
44+
- model: velodyne_lidar
45+
urdf_enabled: true
46+
launch_enabled: true
47+
parent: backpack_center_lidar_mount
48+
ros_parameters:
49+
velodyne_driver_node:
50+
frame_id: lidar3d_0_laser
51+
device_ip: 192.168.131.20
52+
port: 2368
53+
model: VLP16
54+
velodyne_transform_node:
55+
model: VLP16
56+
fixed_frame: lidar3d_0_laser
57+
target_frame: lidar3d_0_laser
58+
camera:
59+
- model: intel_realsense
60+
parent: backpack_front_realsense_mount
61+
ros_parameters:
62+
intel_realsense:
63+
camera_name: camera_0
64+
device_type: d435
65+
serial_no: "1234567890"
66+
- model: intel_realsense
67+
parent: backpack_rear_realsense_mount
68+
ros_parameters:
69+
intel_realsense:
70+
camera_name: camera_1
71+
device_type: d435
72+
serial_no: "9876543210"
73+
- model: axis_camera
74+
parent: backpack_center_mount
75+
ros_parameters:
76+
axis_camera:
77+
device_type: q62
78+
hostname: "192.168.131.10"
79+
http_port: 80
80+
username: "root"
81+
password: ""
82+
width: 640
83+
height: 480
84+
fps: 20
85+
tf_prefix: "axis"
86+
camera_info_url: ""
87+
use_encrypted_password : False
88+
camera : 1
89+
ir: True
90+
defog: True
91+
wiper: True
92+
ptz: True
93+
min_pan: -3.141592653589793
94+
max_pan: 3.141592653589793
95+
min_tilt: 0.0
96+
max_tilt: 1.5707963267948966
97+
min_zoom: 1
98+
max_zoom: 24
99+
max_pan_speed: 2.61
100+
max_tilt_speed: 2.61
101+
ptz_teleop: True
102+
button_enable_pan_tilt : -1
103+
button_enable_zoom : -1
104+
axis_pan : 3
105+
axis_tilt : 4
106+
invert_tilt : False
107+
axis_zoom_in: 5
108+
axis_zoom_out: 2
109+
zoom_in_offset: -1.0
110+
zoom_out_offset: -1.0
111+
zoom_in_scale: -0.5
112+
zoom_out_scale: 0.5
113+
scale_pan : 2.61
114+
scale_tilt : 2.61
115+
scale_zoom : 100.0
116+
gps:
117+
- model: swiftnav_duro
118+
urdf_enabled: true
119+
launch_enabled: true
120+
parent: backpack_right_antenna_mount
121+
ros_parameters:
122+
duro_node:
123+
gps_receiver_frame_id: gps_0_link
124+
ip_address: 192.168.131.31
125+
ip_port: 55555
126+
imu_frame_id: gps_0_link
127+
- model: swiftnav_duro
128+
urdf_enabled: true
129+
launch_enabled: true
130+
parent: backpack_left_antenna_mount
131+
ros_parameters:
132+
duro_node:
133+
gps_receiver_frame_id: gps_1_link
134+
ip_address: 192.168.131.32
135+
ip_port: 55555
136+
imu_frame_id: gps_1_link
137+
imu:
138+
- model: microstrain_imu
139+
urdf_enabled: true
140+
launch_enabled: true
141+
parent: backpack_imu_mount
142+
ros_parameters:
143+
microstrain_inertial_driver:
144+
imu_frame_id: imu_0_link
145+
port: /dev/microstrain_main
146+
use_enu_frame: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Bash setup generated at 2025-11-07 19:27:15.827087+00:00
2+
# Core ROS setup
3+
source /opt/ros/jazzy/setup.bash
4+
# ROS configuration
5+
export ROS_DOMAIN_ID="0"
6+
export RMW_IMPLEMENTATION="rmw_fastrtps_cpp"
7+
unset ROS_DISCOVERY_SERVER
8+
export ROS_AUTOMATIC_DISCOVERY_RANGE="SUBNET"
9+
unset ROS_STATIC_PEERS
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo "No vcan bridge required.If this was launched as a service then the service will now end."
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source /opt/ros/jazzy/setup.bash
2+
echo "RMW Implementation is not Zenoh. If this was launched as a service then the service will now end."
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source /opt/ros/jazzy/setup.bash
2+
echo "Discovery server not enabled. If this was launched as a service then the service will now end."

0 commit comments

Comments
 (0)