Skip to content

Commit 13bca45

Browse files
committed
minor changes
1 parent 6221975 commit 13bca45

4 files changed

Lines changed: 64 additions & 40 deletions

File tree

.docker/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ ENV DEBIAN_FRONTEND=noninteractive
7070

7171
# Install specific versions of scipy and numpy
7272
WORKDIR /home/$USERNAME
73-
RUN pip install numpy==1.19.5 \
74-
scipy==1.10.1
73+
RUN pip3 install -U pandas numpy scipy
7574

7675
# Install MAVROS dependencies
7776
WORKDIR /home/$USERNAME

docking_control/config/mpc_bluerov2_heavy.yaml

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ full_body: True
66
control_axes: 6
77

88
cbf:
9-
enabled: True
10-
penalty: 10000.0
11-
settling_time: 0.1
12-
type: frustum # Options: sphere, tube, frustum
13-
specs:
14-
start_radius: 0.5
15-
end_radius: 0.1
9+
enabled: False
10+
penalty: 10000.0
11+
settling_time: 0.1
12+
type: tube # Options: sphere, tube, frustum
13+
specs:
14+
start_radius: 0.5
15+
end_radius: 0.1
16+
radius: 0.25
1617

1718
noises:
1819
# Process noise (how much we trust the physics model)
@@ -44,35 +45,50 @@ penalty:
4445
# 100, 100, 100]
4546
# P: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
4647
P: [
47-
# Position (x, y, z)
48-
100.0, 200.0, 100.0,
49-
50-
# Orientation (roll, pitch, yaw)
51-
500.0, 500.0, 200.0,
52-
53-
# Linear Velocity (u, v, w)
54-
250.0, 250.0, 250.0,
55-
56-
# Angular Velocity (p, q, r)
57-
500.0, 500.0, 500.0
58-
]
59-
48+
# Position (x, y, z)
49+
200.0,
50+
51+
250.0,
52+
200.0,
53+
# Orientation (roll, pitch, yaw)
54+
500.0,
55+
56+
500.0,
57+
250.0,
58+
# Linear Velocity (u, v, w)
59+
50.0,
60+
61+
50.0,
62+
50.0,
63+
# Angular Velocity (p, q, r)
64+
200.0,
65+
200.0,
66+
100.0,
67+
]
6068

6169
# Q: [0., 0., 0., 0., 0., 0.]
6270
# Q: [1, 1, 1, 1, 1, 1]
6371
Q: [
64-
# Position (x, y, z)
65-
100.0, 200.0, 100.0,
66-
67-
# Orientation (roll, pitch, yaw)
68-
500.0, 500.0, 200.0,
69-
70-
# Linear Velocity (u, v, w)
71-
250.0, 250.0, 250.0,
72-
73-
# Angular Velocity (p, q, r)
74-
500.0, 500.0, 500.0
75-
]
72+
# Position (x, y, z)
73+
200.0,
74+
75+
250.0,
76+
200.0,
77+
# Orientation (roll, pitch, yaw)
78+
500.0,
79+
80+
500.0,
81+
250.0,
82+
# Linear Velocity (u, v, w)
83+
25.0,
84+
85+
25.0,
86+
25.0,
87+
# Angular Velocity (p, q, r)
88+
100.0,
89+
100.0,
90+
50.0,
91+
]
7692

7793
# R: [100, 100, 100, 100, 100, 100]
7894
# R: [10, 10, 10, 10, 10, 10]
@@ -81,12 +97,16 @@ penalty:
8197
# R: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
8298
# R: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
8399
R: [
84-
# Force (Fx, Fy, Fz)
85-
0.05, 0.5, 0.05,
86-
87-
# Torque (Tx, Ty, Tz)
88-
100.0, 100.0, 0.5
89-
]
100+
# Force (Fx, Fy, Fz)
101+
0.05,
102+
103+
0.5,
104+
0.005,
105+
# Torque (Tx, Ty, Tz)
106+
100.0,
107+
100.0,
108+
0.5,
109+
]
90110

91111
R_pwm: 1e-4
92112

docking_control/src/mission_control.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ def auto_control(self, joy):
545545
Args:
546546
joy: Joy message
547547
"""
548+
self.mpc.mpc.initialize_cbf()
549+
548550
# Switch out of autonomous mode if thumbstick input is detected
549551
# Grab the values of the control sticks
550552
axes = joy.axes
@@ -554,6 +556,7 @@ def auto_control(self, joy):
554556
if sum(control_sticks) > 0:
555557
# Set mode to manual
556558
self.mode_flag = "manual"
559+
self.mpc.mpc.cbf_flag = False
557560
return
558561

559562
if self.rov_odom is None:

docking_control/src/odl_controller.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ def run_mpc(self, x0, xr, residual):
303303
print("----------------------------------------------")
304304
print(f"Axes Forces: {np.round(wrench, 2).T}")
305305
print("----------------------------------------------")
306+
print(f"GP Residual: {np.round(residual, 3).T}")
307+
print("----------------------------------------------")
306308
print(f"Initial Vehicle Pose: {np.round(x0[0:6], 3).T}")
307309
print(f"Initial Vehicle Velocity: {np.round(x0[6:12], 3).T}")
308310
# print("----------------------------------------------")

0 commit comments

Comments
 (0)