Skip to content

Commit dddd334

Browse files
authored
Transform tree (#678)
* transform tree urdf * gripper, configurable dynamic shoulder, drone prefix * moby yaml + additional orca topics * urdf for orca + moby * made launch files drone agnostic * use drone, namespace helper in description launch
1 parent 09694fc commit dddd334

11 files changed

Lines changed: 601 additions & 51 deletions

auv_setup/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ament_python_install_package(${PROJECT_NAME})
99
install(DIRECTORY
1010
config
1111
launch
12+
description
1213
DESTINATION share/${PROJECT_NAME}/
1314
)
1415

auv_setup/README.md

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,5 @@ The config folder contains physical parameters related to the AUV and the enviro
1313
This package contains a launchfile for each specific AUV. Additionally the topside.launch file is to
1414
be used on the topside computer that the joystick is connected to, for ROV operations.
1515

16-
For the AUV launchfiles, the following parameters can be used:
17-
18-
| Parameter | Options | Default |
19-
| ----------|-----------------|-----------|
20-
| type | real, simulator | simulator |
21-
22-
#### ROV mode topside launch
23-
We make no distinction for launching in AUV or ROV mode for the system running on the physical drone.
24-
You will however need to run the pc.launch file on the topside computer in order to operate the drone
25-
with a joystick. The topside computer needs to be connected to the same network as the drone. In our configuration, the drone
26-
is the master node, while the topside computer is the slave. For the slave to know how to connect to the master node,
27-
you will need to configure the topside computer:
28-
29-
1. Find the IP of the master. When running the Xavier on the drone, this should be `10.42.0.1`.
30-
2. On the topside computer, execute
31-
```
32-
echo "export ROS_MASTER_URI=http://X.X.X.X:11311" >> ~/.bashrc
33-
```
34-
where X.X.X.X is the IP of the Xavier.
35-
36-
3. Source the newly edited file.
37-
```
38-
source ~/.bashrc
39-
```
40-
41-
### Sensors
42-
Currently, the AUV launchfiles also contain the sensor driver launches, including the remapping of them:
43-
44-
#### Manta sensor mapping
45-
| Sensor | x | y | z | u | v | w |
46-
| ---------|-------|--------|--------|---------|---------|---|
47-
| IMU | 0 | 0 | 0 | 3.12159 | 0 | 0 |
48-
| DVL |-0.035 |-0.017 |-0.211 | 3.14159 | 3.14159 | 0 |
49-
| Pressure | 0 | 0 | 0 | 0 | 0 | 0 |
50-
51-
#### Gladlaks sensor mapping
52-
| Sensor | x | y | z | u | v | w |
53-
| ---------|-------|--------|--------|---------|---------|------|
54-
| IMU | 0 | 0 | 0 | TODO | TODO | TODO |
55-
| DVL |TODO |TODO |TODO | TODO | TODO | 0 |
56-
| Pressure | 0 | 0 | 0 | 0 | 0 | 0 |
16+
### Description
17+
The description folder contains the URDF and xacro files for the AUVs. The main description launch file is drone_description.launch.py, which makes all static transforms available to the ros graph.

auv_setup/config/robots/moby.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# This file defines parameters specific to Moby.
2+
# When looking at the AUV from above, the thruster placement is:
3+
#
4+
# front
5+
# |======|
6+
# |=7↗=| |=0↖=|
7+
# | | | |
8+
# | 6• | | 1• |
9+
# | | | |
10+
# | | | |
11+
# | 5• | | 2• |
12+
# | | | |
13+
# |=4↘=|==||==|=3↙=|
14+
#
15+
16+
/**:
17+
ros__parameters:
18+
physical:
19+
center_of_mass: [0.0, 0.0, 0.0] # CO is aligned with CM Position (x,y,z) in meters (M)
20+
mass_matrix: [53.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 53.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 53.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 11.0628, 1.086, -3.17502, 0.0, 0.0, 0.0, 1.086, 23.1128, 0.1025, 0.0, 0.0, 0.0, -3.17502, 0.1025, 26.23998]
21+
# 6x6 mass_inertia_matrix
22+
propulsion:
23+
dofs:
24+
num: 6
25+
dimensions:
26+
num: 3
27+
thrusters:
28+
num: 8
29+
min: -100
30+
max: 100
31+
thruster_force_direction: [ # Direction of forces X,Y,Z, same logic as thruster_position thruster0 produces thrust in (X0,Y0,Z0) and ||(X0,Y0,Z0)|| = 1
32+
0.70711,
33+
0.00000,
34+
0.00000,
35+
-0.70711,
36+
-0.70711,
37+
0.00000,
38+
0.00000,
39+
0.70711, # Surge
40+
-0.70711,
41+
0.00000,
42+
0.00000,
43+
-0.70711,
44+
0.70711,
45+
0.00000,
46+
0.00000,
47+
0.70711, # Sway
48+
0.00000,
49+
1.00000,
50+
1.00000,
51+
0.00000,
52+
0.00000,
53+
1.00000,
54+
1.00000,
55+
0.00000, # Heave
56+
]
57+
thruster_position: [ # Position (x0,x1 ... x7,y1,y2, ...,y7,z1,z2, ... ,z7) in meters (M). i.e thruster0 has position (x0,y0,z0)
58+
0.413892,
59+
0.140095,
60+
-0.163904,
61+
-0.413892,
62+
-0.413892,
63+
-0.163904,
64+
0.140095,
65+
0.413892, # x-positions of the thrusters
66+
-0.313022,
67+
-0.313022,
68+
-0.313022,
69+
-0.313022,
70+
0.313022,
71+
0.313022,
72+
0.313022,
73+
0.313022, # y-positions of the thrusters
74+
0.021736,
75+
0.021736,
76+
0.021736,
77+
0.021736,
78+
0.021736,
79+
0.021736,
80+
0.021736,
81+
0.021736, # z-positions of the thrusters
82+
]
83+
rate_of_change:
84+
max: 1 # Maximum rate of change in newton per second for a thruster
85+
86+
thrust_update_rate: 100.0 # [Hz]
87+
watchdog_timeout: 1.0 # [s]
88+
89+
topics:
90+
wrench_input: "wrench_input"
91+
thruster_forces: "thruster_forces"
92+
pwm_output: "pwm"
93+
current: "power_sense_module/current"
94+
voltage: "power_sense_module/voltage"
95+
pressure: "pressure"
96+
temperature: "temperature"
97+
joy: "joy"
98+
pose: "pose"
99+
odom: "odom"
100+
twist: "twist"
101+
operation_mode: "operation_mode"
102+
killswitch: "killswitch"
103+
reference_pose: "reference_pose"
104+
guidance:
105+
los: "guidance/los"
106+
dp: "guidance/dp"
107+
waypoint: "waypoint"
108+
dvl_twist: "dvl/twist"
109+
dvl_altitude: "dvl/altitude"
110+
imu: "mru/imu"
111+
sonar_info: "fls/sonar_info"
112+
113+
action_servers:
114+
reference_filter: "reference_filter"
115+
los: "los_guidance"
116+
117+
services:
118+
set_operation_mode: "set_operation_mode"
119+
set_killswitch: "set_killswitch"
120+
toggle_killswitch: "toggle_killswitch"
121+
get_operation_mode: "get_operation_mode"

auv_setup/config/robots/orca.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,12 @@
121121
joy: "joy"
122122
pose: "pose"
123123
twist: "twist"
124+
odom: "odom"
124125
operation_mode: "operation_mode"
125126
killswitch: "killswitch"
126127
reference_pose: "reference_pose"
127128
landmarks: "landmarks"
128-
odom: "odom"
129129
waypoint: "waypoint"
130-
waypoint_list: "waypoint_list"
131130
guidance:
132131
los: "guidance/los"
133132
dp: "guidance/dp"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="flir_blackfly_s">
3+
4+
<!--
5+
Minimal helper xacro that only defines the link frames and fixed joints
6+
for the FLIR Blackfly S camera. This intentionally omits visuals,
7+
collisions, inertial and Gazebo sensor/plugin blocks so it can be
8+
included in robot descriptions when only TF frames are required.
9+
10+
The caller is responsible for declaring ${frame} as a <link> and
11+
connecting it to the parent with a <joint> (+ the desired origin).
12+
This macro only adds the sensor sub-frames below ${frame}.
13+
14+
Usage:
15+
<xacro:include filename="flir_blackfly_s.urdf.xacro"/>
16+
17+
<link name="downwards_camera_link"/>
18+
<joint name="base_to_downwards_camera" type="fixed">
19+
<parent link="base_link"/>
20+
<child link="downwards_camera_link"/>
21+
<origin xyz="0.28 -0.08 0.09" rpy="0 0 1.5708"/>
22+
</joint>
23+
24+
<xacro:flir_blackfly_s frame="downwards_camera_link" name="flir_blackfly"/>
25+
-->
26+
27+
<xacro:macro name="flir_blackfly_s" params="frame base name:=camera lens_h:=0.04">
28+
29+
<!-- 'base' must be provided by the caller and should be the desired
30+
prefix for generated sub-frame names (e.g. 'downwards_camera'). -->
31+
32+
<!-- Lens and optical links (minimal) -->
33+
<link name="${base}_lens"/>
34+
<link name="${base}_optical"/>
35+
36+
<!-- Fixed joint from body to lens (keeps original relative origin) -->
37+
<joint name="${base}_lens_joint" type="fixed">
38+
<!-- origin taken from flir_blackfly_s xacro: 0.02685 0 0.01425 -->
39+
<origin xyz="0.02685 0 0.01425" rpy="0 0 0"/>
40+
<parent link="${frame}"/>
41+
<child link="${base}_lens"/>
42+
</joint>
43+
44+
<!-- Fixed joint from lens to optical frame. Lens length is parameterized. -->
45+
<joint name="${base}_optical_joint" type="fixed">
46+
<origin xyz="${lens_h} 0 0" rpy="-1.570796 0 -1.570796"/>
47+
<parent link="${base}_lens"/>
48+
<child link="${base}_optical"/>
49+
</joint>
50+
51+
</xacro:macro>
52+
53+
</robot>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="gripper">
3+
4+
<!--
5+
Gripper macro.
6+
7+
The caller declares a static mount link (e.g. 'gripper_link') and
8+
connects it to the robot. This macro creates all gripper sub-frames
9+
below that mount link.
10+
11+
Parameters:
12+
frame - caller-declared mount link name (e.g. 'gripper_link')
13+
static_shoulder - if true the shoulder joint is fixed; if false it is
14+
a revolute joint that can pitch (default: true)
15+
16+
Usage:
17+
<link name="gripper_link"/>
18+
<joint name="base_to_gripper" type="fixed">
19+
<parent link="base_link"/>
20+
<child link="gripper_link"/>
21+
<origin xyz="0.26 0.095 0.08" rpy="0 0 0"/>
22+
</joint>
23+
<xacro:gripper frame="gripper_link" static_shoulder:=true/>
24+
-->
25+
26+
<xacro:macro name="gripper"
27+
params="frame static_shoulder:=true shoulder_length:=0.1 wrist_length:=0.1 grip_max_extension:=0.05">
28+
29+
<!-- Shoulder link (owned by the gripper macro, not the caller) -->
30+
<link name="gripper_shoulder_link">
31+
<visual>
32+
<geometry>
33+
<box size="${shoulder_length} 0.05 0.05"/>
34+
</geometry>
35+
<origin xyz="0 0 0" rpy="0 0 0"/>
36+
<material name="grey">
37+
<color rgba="0.6 0.6 0.6 1"/>
38+
</material>
39+
</visual>
40+
</link>
41+
42+
<!-- Shoulder joint: fixed or revolute depending on static_shoulder -->
43+
<xacro:if value="${static_shoulder}">
44+
<joint name="gripper_shoulder_joint" type="fixed">
45+
<parent link="${frame}"/>
46+
<child link="gripper_shoulder_link"/>
47+
<origin xyz="0 0 0" rpy="0 0 0"/>
48+
</joint>
49+
</xacro:if>
50+
<xacro:unless value="${static_shoulder}">
51+
<joint name="gripper_shoulder_joint" type="revolute">
52+
<parent link="${frame}"/>
53+
<child link="gripper_shoulder_link"/>
54+
<origin xyz="0 0 0" rpy="0 0 0"/>
55+
<axis xyz="0 1 0"/>
56+
<limit lower="-1.57" upper="1.57" effort="10" velocity="1.0"/>
57+
</joint>
58+
</xacro:unless>
59+
60+
<!-- Wrist link -->
61+
<link name="gripper_wrist_link">
62+
<visual>
63+
<geometry>
64+
<cylinder radius="0.02" length="${wrist_length}"/>
65+
</geometry>
66+
<origin xyz="0 0 0" rpy="0 0 0"/>
67+
<material name="silver">
68+
<color rgba="0.8 0.8 0.8 1"/>
69+
</material>
70+
</visual>
71+
</link>
72+
73+
<!-- Grip link -->
74+
<link name="gripper_grip_link">
75+
<visual>
76+
<geometry>
77+
<box size="0.05 0.01 0.03"/>
78+
</geometry>
79+
<origin xyz="0 0 0" rpy="0 0 0"/>
80+
<material name="black">
81+
<color rgba="0 0 0 1"/>
82+
</material>
83+
</visual>
84+
</link>
85+
86+
<!-- Wrist joint -->
87+
<joint name="gripper_wrist_joint" type="revolute">
88+
<parent link="gripper_shoulder_link"/>
89+
<child link="gripper_wrist_link"/>
90+
<origin xyz="${shoulder_length} 0 0" rpy="0 0 0"/>
91+
<axis xyz="1 0 0"/>
92+
<limit lower="-1.57" upper="1.57" effort="10" velocity="1.0"/>
93+
</joint>
94+
95+
<!-- Grip joint -->
96+
<joint name="gripper_grip_joint" type="prismatic">
97+
<parent link="gripper_wrist_link"/>
98+
<child link="gripper_grip_link"/>
99+
<origin xyz="${wrist_length} 0 0" rpy="0 0 0"/>
100+
<axis xyz="0 1 0"/>
101+
<limit lower="0.0" upper="${grip_max_extension}" effort="10" velocity="0.1"/>
102+
</joint>
103+
104+
</xacro:macro>
105+
106+
</robot>

0 commit comments

Comments
 (0)