Skip to content

Commit 024dc22

Browse files
committed
merged with dev/eskf_fuse_depth
2 parents 91ec174 + d00ffd1 commit 024dc22

File tree

86 files changed

+4913
-1576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+4913
-1576
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ repos:
5959
"--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D401",
6060
"--fix",
6161
]
62-
stages: [pre-commit]
62+
stages: [commit]
6363
pass_filenames: true
6464
- id: ruff
6565
name: ruff-check
@@ -68,7 +68,7 @@ repos:
6868
"--ignore=T201,N812,B006,S101,S311,S607,S603",
6969
"--fix"
7070
]
71-
stages: [pre-commit]
71+
stages: [commit]
7272
pass_filenames: true
7373
# C++ hooks
7474
- repo: https://github.com/pre-commit/mirrors-clang-format

auv_setup/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ cmake_minimum_required(VERSION 3.8)
22
project(auv_setup)
33

44
find_package(ament_cmake REQUIRED)
5+
find_package(ament_cmake_python REQUIRED)
6+
7+
ament_python_install_package(${PROJECT_NAME})
58

69
install(DIRECTORY
710
config
811
launch
12+
description
913
DESTINATION share/${PROJECT_NAME}/
1014
)
1115

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/auv_setup/__init__.py

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from launch.actions import DeclareLaunchArgument
2+
from launch.substitutions import LaunchConfiguration
3+
4+
5+
def declare_drone_and_namespace_args(default_drone="orca"):
6+
return [
7+
DeclareLaunchArgument(
8+
"drone",
9+
default_value=default_drone,
10+
description="Drone model / config name",
11+
),
12+
DeclareLaunchArgument(
13+
"namespace",
14+
default_value="",
15+
description="ROS namespace. If empty, uses drone name.",
16+
),
17+
]
18+
19+
20+
def resolve_drone_and_namespace(context):
21+
drone = LaunchConfiguration("drone").perform(context)
22+
namespace = LaunchConfiguration("namespace").perform(context)
23+
if namespace == "":
24+
namespace = drone
25+
return drone, namespace

auv_setup/config/robots/moby.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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: "imu/data_raw"
111+
sonar_info: "fls/sonar_info"
112+
pressure_sensor: "pressure_sensor"
113+
114+
115+
action_servers:
116+
reference_filter: "reference_filter"
117+
los: "los_guidance"
118+
119+
services:
120+
set_operation_mode: "set_operation_mode"
121+
set_killswitch: "set_killswitch"
122+
toggle_killswitch: "toggle_killswitch"
123+
get_operation_mode: "get_operation_mode"

auv_setup/config/robots/orca.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,35 @@
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"
128+
landmarks: "landmarks"
127129
waypoint: "waypoint"
128-
waypoint_list: "waypoint_list"
129130
guidance:
130131
los: "guidance/los"
131132
dp: "guidance/dp"
132133
fsm:
133134
active_controller: "fsm/active_controller"
135+
dvl_twist: "dvl/twist"
136+
dvl_altitude: "dvl/altitude"
137+
imu: "imu/data_raw"
138+
pressure_sensor: "pressure_sensor"
134139

135140
action_servers:
136141
reference_filter: "reference_filter"
137142
los: "los_guidance"
143+
landmark_polling: "landmark_polling"
144+
landmark_convergence: "landmark_convergence"
145+
waypoint_manager: "waypoint_manager"
138146

139147
services:
140148
set_operation_mode: "set_operation_mode"
141149
set_killswitch: "set_killswitch"
142150
toggle_killswitch: "toggle_killswitch"
143151
get_operation_mode: "get_operation_mode"
152+
waypoint_addition: "waypoint_addition"
144153

145154
fsm:
146155
docking:
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>

0 commit comments

Comments
 (0)