Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from apl-ocean-engineering/dev/split_laptop_sim
Browse files Browse the repository at this point in the history
Split blue_on_laptop_nvidia to build_sim and blue_sim_nvidia
  • Loading branch information
amarburg authored Aug 22, 2024
2 parents a3f5642 + 83b516e commit b3968aa
Show file tree
Hide file tree
Showing 20 changed files with 820 additions and 59 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@
"**/build": true,
"**/install": true,
"**/log": true
}
},
"cmake.configureOnOpen": false
}
File renamed without changes.
2 changes: 2 additions & 0 deletions compose/blue_sim/apl_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export BLUE_GITHUB_REPO=apl-ocean-engineering/blue
export BLUE_ROS_DISTRO=rolling
34 changes: 34 additions & 0 deletions compose/blue_sim/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:
blue:
image: ghcr.io/${BLUE_GITHUB_REPO:?Github repo not set}:${BLUE_ROS_DISTRO:-rolling}-desktop
environment:
- DISPLAY=${DISPLAY}
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
- LIBGL_ALWAYS_SOFTWARE=1
- QT_X11_NO_MITSHM=1
- WAYLAND_DISPLAY=${WAYLAND_DISPLAY} # Can be commented out if not used
- PULSE_SERVER=${PULSE_SERVER} # Can be commented out if not used
network_mode: host
tty: true
stdin_open: true
privileged: true
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
- apparmor:unconfined
volumes:
- /dev:/dev
- /tmp/.X11-unix:/tmp/.X11-unix
- ../../../bluerov_deployment:/home/ubuntu/ws_blue/src/bluerov_deployment
- ../../../auv_controllers:/home/ubuntu/ws_blue/src/auv_controllers
- ../../../mobile_to_maritime:/home/ubuntu/ws_blue/src/mobile_to_maritime
- ../../../blue:/home/ubuntu/ws_blue/src/blue
# Launch sim directly
entrypoint: [ "/bin/bash", "-i", "-c" ]
command: [ "ros2 launch blue_demos bluerov2_demo.launch.yaml use_sim:=true" ]

foxglove-bridge:
image: ghcr.io/apl-ocean-engineering/blue-foxglove-bridge-docker:${BLUE_ROS_DISTRO}
ports:
- 8765:8765
2 changes: 2 additions & 0 deletions compose/blue_sim_nvidia/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BLUE_ROS_DISTRO=rolling
BLUE_GITHUB_REPO=robotic-decision-making-lab/blue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
blue:
image: ghcr.io/${BLUE_GITHUB_REPO:?Github repo not set}:${BLUE_ROS_DISTRO:?BLUE_ROS_DISTRO not set}-desktop
Expand Down Expand Up @@ -28,5 +27,6 @@ services:
volumes:
- /dev:/dev
- /tmp/.X11-unix:/tmp/.X11-unix
- /mnt/wslg:/mnt/wslg
- ../../../bluerov_deployment:/home/ubuntu/ws_blue/src/bluerov_deployment
- ../../../blue:/home/ubuntu/ws_blue/src/blue
command: tail -f /dev/null
18 changes: 18 additions & 0 deletions docking_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.8)
project(docking_demo)

find_package(ament_cmake REQUIRED)

install(
DIRECTORY control_integration/launch
control_integration/config
DESTINATION share/docking_demo/control_integration
)

install(
DIRECTORY teleoperation/launch
teleoperation/config
DESTINATION share/docking_demo/teleoperation
)

ament_package()
17 changes: 17 additions & 0 deletions docking_demo/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 3 additions & 0 deletions docking_demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# BlueROV Docking Demos

This package implements examples that demonstrate how to use Blue.
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
controller_manager:
ros__parameters:
update_rate: 100 # Hz

heading_pid_controller:
type: pid_controller/PidController

integral_sliding_mode_controller:
type: velocity_controllers/IntegralSlidingModeController

thruster_allocation_matrix_controller:
type: thruster_allocation_matrix_controller/ThrusterAllocationMatrixController

thruster1_controller:
type: thruster_controllers/PolynomialThrustCurveController

thruster2_controller:
type: thruster_controllers/PolynomialThrustCurveController

thruster3_controller:
type: thruster_controllers/PolynomialThrustCurveController

thruster4_controller:
type: thruster_controllers/PolynomialThrustCurveController

thruster5_controller:
type: thruster_controllers/PolynomialThrustCurveController

thruster6_controller:
type: thruster_controllers/PolynomialThrustCurveController

heading_pid_controller:
ros__parameters:
dof_names:
- integral_sliding_mode_controller/rz
command_interface: velocity

use_external_measured_states: true

reference_and_state_dof_names: ["rz"]
reference_and_state_interfaces: ["heading"]

gains:
"integral_sliding_mode_controller/rz": {p: 5.0, i: 0.0, d: 0.0, i_clamp_max: 5.0, i_clamp_min: -5.0, angle_wraparound: true }


integral_sliding_mode_controller:
ros__parameters:
use_external_measured_states: true
reference_controller: thruster_allocation_matrix_controller
gains:
rho: 15.0
lambda: 100.0
Kp: [5.0, 5.0, 5.0, 5.0, 5.0, 10.0]
tf:
base_frame: "base_link_fsd"
odom_frame: "map_ned"
hydrodynamics:
mass: 10.0
weight: 98.1
buoyancy: 100.06
moments_of_inertia: [0.16, 0.16, 0.16]
added_mass: [-5.50, -12.70, -14.60, -0.12, -0.12, -0.12]
center_of_buoyancy: [0.0, 0.0, 0.0]
center_of_gravity: [0.0, 0.0, 0.0]
linear_damping: [-4.03, -6.22, -5.18, -0.07, -0.07, -0.07]
quadratic_damping: [-18.18, -21.66, -36.99, -1.55, -1.55, -1.55]

thruster_allocation_matrix_controller:
ros__parameters:
thrusters:
- thruster1_joint
- thruster2_joint
- thruster3_joint
- thruster4_joint
- thruster5_joint
- thruster6_joint
reference_controllers:
- thruster1_controller
- thruster2_controller
- thruster3_controller
- thruster4_controller
- thruster5_controller
- thruster6_controller
tam:
x: [ -0.707, -0.707, 0.707, 0.707, 0.0, 0.0]
y: [ 0.707, -0.707, 0.707, -0.707, 0.0, 0.0]
z: [ 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]
rx: [ 0.0, 0.0, 0.0, 0.0, -0.21805, 0.21805]
ry: [ 0.0, 0.0, 0.0, 0.0, -0.12, -0.12]
rz: [0.1888, -0.1888, -0.1888, 0.1888, 0.0, 0.0]

thruster1_controller:
ros__parameters:
thruster: thruster1_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]

thruster2_controller:
ros__parameters:
thruster: thruster2_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]

thruster3_controller:
ros__parameters:
thruster: thruster3_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]

thruster4_controller:
ros__parameters:
thruster: thruster4_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]

thruster5_controller:
ros__parameters:
thruster: thruster5_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]

thruster6_controller:
ros__parameters:
thruster: thruster6_joint
min_thrust: -40.0
max_thrust: 60.0
min_deadband: 1470
max_deadband: 1530
neutral_pwm: 1500
thrust_curve_coefficients: [1498.0, 12.01, -0.04731, -0.002098, 0.00002251]
Loading

0 comments on commit b3968aa

Please sign in to comment.