Kinematics control plugin for WHOI hybrid gliders
- If not using docker environment, use bathymetry_plugin_whoi branch of the dave repo
# at dave repo
git cehckout bathymetry_plugin_whoi
- The IMU/GPS sensor included in this repo requires hector libraries. You may install with following command
sudo apt-get install ros-noetic-hector-gazebo-plugins
- The initial position setter requires python version of gdal
sudo apt-get install python3-gdal
- The kinematics/dynamics plugin uses UwGliderStatus/UwGliderCommand msg to interact with the vehicle
git clone https://github.com/Field-Robotics-Lab/frl_msgs
- nps_uw_sensors_gazebo repository is required
git clone git@github.com:Field-Robotics-Lab/nps_uw_sensors_gazebo.git
- First check to make sure you meet the System Requirements.
- Then choose from one of the following two installation options:
- Directly on Host
- Install environment and dependent repositories : Instructions to install ROS Noetic, Gazebo 11, UUV Simulator and DAVE directly on your host machine.
- Clone this repository in
~/uuv/src
folder and compile withcatkin_make
at~/uuv_ws
directory.
- Using Docker
- Make sure you have Docker v19.03 or higher (installation instructions) and nvidia-container-toolkit (installation instructions)
- Run the
build.bash
script located in thedocker
folder of this repository./build.bash
- Run the container with
run.bash
script./run.bash source ~/glider_hybrid_whoi/install/setup.bash
- Opening additional terminals
./join.bash source /opt/ros/noetic/setup.bash source ~/glider_hybrid_whoi/install/setup.bash
- Using docker-compose
- Run the
build.bash
script located in thedocker
folder of this repository./build.bash
- Run the container
docker-compose up
- Send mission commands from another terminal
docker-compose exec glider_extctl_sim /ros_entrypoint.sh rosrun slocum_glider_extctl_sim slocum_glider_sim_console # Ctrl+C to land on mission command terminal run initbuzz.mi run backse01.mi
- Access log CSV file
./join.bash tail -f /tmp/Kinematics KinematicsLog.csv
- Run the
- Directly on Host
- Running the simulator (Run each commands in separate terminal window)
- Spawn underwater world with gazebo
roslaunch glider_hybrid_whoi_gazebo start_demo_kinematics_stratified_current.launch # or roslaunch glider_hybrid_whoi_gazebo BuzzBay_stratified_current.launch # Bathymetry for Buzzbay is included in this repo # The range is (lat,lon) = (41.50, -70.70) to (41.56, -70.65)
- Control glider with ROS
rosrun kinematics_ros_plugins test_directKinematics.py
- Glider status
rostopic echo /glider_hybrid_whoi/kinematics/UwGliderStatus
- Spawn underwater world with gazebo
For view/edit : Google Drawing Raw file link
The slocum_glider_sim_driver
and slocum_glider_sim_console
nodes are
provided by https://gitlab.com/sentinel-aug/ros/slocum_glider
- Buzzbay bathymetry is included
- Roughly 1500x1500 m tiles with 50 m overlap regions are included (almost 780 MB)
- Click the
play
button on the Gazebo window and wait for the first bathymetry to be spawned. Next bathymetry tile will be spawned and the previous tile will be removed automatically according to the glider position.
roslaunch glider_hybrid_whoi_gazebo BuzzBay_stratified_current.launch # if in docker environment roslaunch glider_hybrid_whoi_gazebo BuzzBay_stratified_current_docker.launch
- If the glider reach the surface, the pitch value is set to zero and the position is kept on surface unless it's heading back down.
- #31
- Demo case :
roslaunch glider_hybrid_whoi_gazebo start_demo_kinematics_stratified_current_two_gliders.launch
- Live feeding to Fledermaus's Vessel Manager to visualize its location is now available using UDP connection with NMEA strings.
- Assumes you are running on WSL2 at Windows machine
- Uses custom NMEA msg format that can include not only lat/lon/depth but also roll/pitch/heading.
- Networking with WSL is tricky since the Windows and the Ubuntu in WSL recognize
localhost
differently. This is hacked by using the host window machine's public ip. Maybe you have to add this to C:\Users/User/.wslconfigand restart the WSL by[wsl2] localhostForwarding=true
wsl --shutdown
at cmd.
- Parametes for pitch control, buoyancy induced velocity with the flight model, and thruster power is defined at glider_hybrid_whoi_base_kinematics.xacro
Battery position | Target once | Target servo |
---|---|---|
✔️ | ✔️ | ✖️ |
- Change of pitch is defined with first-order function with two coefficients (mx + b) for battery position command values
- coefficient name :
f_pitch_battpos_cal_m
,f_pitch_battpos_cal_b
Voltage | Power |
---|---|
✔️ | ✔️ |
- Thruster power is defined with 2nd-order fucntion with three coefficients (ax^2 + bx + c) for both voltage/power command values
- coefficient name :
f_thruster_voltage_v1
,f_thruster_voltage_v2
,f_thruster_voltage_v3
,f_thruster_power_w1
,f_thruster_power_w2
,f_thruster_power_w3
- Final thrust to the glider is calculated with
sqrt(motorpower/(fluidDensity*Area*C_D)
- Propeller rotation is visualized using the command value as rotation speed.
Heading | Angle (Center, Port, Stbd) | Angle (Direct) |
---|---|---|
✔️ | ✔️ | ✔️ |
- The size of the port and starboard angle is set to PI/6.
Flight model |
---|
✔️ |
- Simple flight model is adopted to change the angle of attach with pumped volume to produce buoyancy induced velocity
- +/- 3 degrees depending on the sign of the pitch
- Calculated with Equations 24 and 28 from Eichhorn et al. paper.
Lat/Lon | Roll-Pitch-Yaw | Heading | Depth | Altitude | Power | Rudder angle | Battery position | Pumped Volume | nav_sat_fix |
---|---|---|---|---|---|---|---|---|---|
✔️* | ✔️ | ✔️ | ✔️ | ✔️* | ✖️ | ✔️ | ✔️ | ✔️ | ✔️ |
- Lat/Lon is acquired from the GPS sensor and Altitude from the DVL sensor. Which is also sent through nav_sat_fix