Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
281 changes: 192 additions & 89 deletions README.md

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#------------------------------------------------------------------#
# Dependency versions
ARG version_dave=9a7dd78aaa1bac60c63e321926e6c36539128866
ARG version_dave=076856502d2a71d2ecd07d080dff9968fd94da8d
ARG version_uuv_simulator=4936e739d48807527fdcd3ba3d19c147277003ce
ARG version_uuv_manipulators=d324a6a6ac9f3b6c86427d7ed9795c09c14e659c
ARG version_uw_sensors_gazebo=eda6787830bd2c7f31eacfe9f2aab961b879ab3e
Expand Down Expand Up @@ -122,7 +122,7 @@ ARG version_dave
ENV VERSION_DAVE=$version_dave
ARG version_uw_sensors_gazebo
ENV VERSION_UW_SENSORS_GAZEBO=$version_uw_sensors_gazebo
RUN curl -fsSL https://github.com/Field-Robotics-Lab/dave/archive/$VERSION_DAVE.tar.gz | tar xz \
RUN curl -fsSL https://github.com/woensug-choi/dave/archive/$VERSION_DAVE.tar.gz | tar xz \
&& curl -fsSL https://github.com/Field-Robotics-Lab/nps_uw_sensors_gazebo/archive/$VERSION_UW_SENSORS_GAZEBO.tar.gz | tar xz

ARG version_uuv_simulator
Expand Down Expand Up @@ -344,6 +344,9 @@ RUN apt-get update \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir pynmea2 folium PyQtWebEngine pyqt5-tools

# Carry forward the dependency versions
ARG version_dave
ENV VERSION_DAVE=$version_dave
Expand Down
7 changes: 7 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ RUN apt-get update \
python3-rosinstall \
python3-rosinstall-generator \
python3-vcstool \
python3-gdal \
ros-noetic-gazebo-plugins \
ros-noetic-gazebo-ros \
ros-noetic-gazebo-ros-control \
Expand Down Expand Up @@ -241,6 +242,9 @@ RUN apt-get update \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir pynmea2 folium PyQtWebEngine pyqt5-tools

#------------------------------------------------------------------#
# source-deps-builder stage
#------------------------------------------------------------------#
Expand Down Expand Up @@ -332,6 +336,9 @@ RUN apt-get update \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir pynmea2 folium PyQtWebEngine pyqt5-tools

# Carry forward the dependency versions
ARG version_dave
ENV VERSION_DAVE=$version_dave
Expand Down
87 changes: 87 additions & 0 deletions docker/run-local.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env bash

#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

# Runs a docker container with the image created by build.bash
# Requires:
# docker 19.03 or higher
# an X server
# Recommended:
# A joystick mounted to /dev/input/js0 or /dev/input/js1

# Determine if we have the nvidia runtime enabled. If so, default to exposing
# all gpus.
if docker info -f '{{ range $key, $value := .Runtimes }}{{ $key }}{{ end }}' | grep nvidia > /dev/null 2>&1; then
GPUS="--gpus all"
fi

IMG="glider_hybrid_whoi:latest"
RUN_ARGS=""

while [[ $# -gt 0 ]]
do
key="$1"

case $key in
-i)
IMG="$2"
shift 2
;;
--without-nvidia)
GPUS=""
shift
;;
--nvidia)
GPUS="--gpus all"
shift
;;
--run-args)
RUN_ARGS="$RUN_ARGS $2"
shift 2
;;
--name)
RUN_ARGS="$RUN_ARGS --name $2"
shift 2
;;
--)
shift
break
;;
*) # unknown option
echo "Unknown option" >&2
exit 1
;;
esac
done

USERID=$(id -u)
GROUPID=$(id -g)

docker run -it \
-e DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-v "/tmp/.X11-unix:/tmp/.X11-unix" \
-v "/etc/localtime:/etc/localtime:ro" \
-v "$(pwd)/../:/home/ros/local_glider_files" \
--privileged \
--rm \
--security-opt seccomp=unconfined \
-u "$USERID:$GROUPID" \
$RUN_ARGS \
$GPUS \
"$IMG" \
"$@"
2 changes: 1 addition & 1 deletion glider_hybrid_whoi_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ find_package(catkin REQUIRED)

catkin_package()

install(DIRECTORY launch
install(DIRECTORY launch rviz
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
PATTERN "*~" EXCLUDE)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<arg name="use_geodetic" default="true"/>
<arg name="initial_latitude" default="41.5522"/>
<arg name="initial_longitude" default="-70.6803"/>
<arg name="initial_depth" default="-1"/>
<arg name="initial_depth" default="-10"/>

<!-- Fledermaus Vessel Manager connection -->
<arg name="host_ip" default="128.128.62.4"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,14 @@

<transient_current>
<topic_stratified_database>stratified_current_velocity_database</topic_stratified_database>
<!-- Database tag can accept full path or filename for .csv within the uuv_dave/worlds folder -->
<databasefilePath>transientOceanCurrentDatabase.csv</databasefilePath>
<!-- Absolute path in local machine -->
<!-- <databasefilePath>/home/woensug/uuv_ws/src/glider_hybrid_whoi/glider_hybrid_whoi_gazebo/worlds/transientOceanCurrentDatabase_zero.csv</databasefilePath> -->
<!-- Absolute path in docker environment -->
<!-- <databasefilePath>/home/ros/glider_hybrid_whoi/install/share/glider_hybrid_whoi_gazebo/worlds/transientOceanCurrentDatabase.csv</databasefilePath> -->
</transient_current>

<!-- transient current database CSV file (North direction value) is used as a depth variation -->
<!-- Handle to on/off tidal_oscillation is at <tide_oscillation> of glider_hybrid_whoi_base_kinematics.xacro -->
<tidal_oscillation>
<!-- Method 1: databse file https://tidesandcurrents.noaa.gov/noaacurrents/Annual?id=ACT1951_1 -->
<!-- Database tag can accept full path or filename for .csv within the uuv_dave/worlds folder -->
<databasefilePath>ACT1951_1_Annual_2021.csv</databasefilePath>
<!-- Absolute path in local machine -->
<!-- <databasefilePath>/home/glider-sim/uuv_ws/src/glider_hybrid_whoi/glider_hybrid_whoi_gazebo/worlds/ACT1951_1_Annual_2021.csv</databasefilePath> -->
<!-- Absolute path in docker environment -->
<!-- <databasefilePath>/home/ros/glider_hybrid_whoi/install/share/glider_hybrid_whoi_gazebo/worlds/ACT1951_1_Annual_2021.csv</databasefilePath> -->

<!-- Method 2: harmonic constituents from -->
<!-- https://tidesandcurrents.noaa.gov/harcon.html?unit=0&timezone=0&id=8447685&name=Chappaquoit+Point&state=MA -->
Expand Down Expand Up @@ -177,6 +168,3 @@

</world>
</sdf>



8 changes: 0 additions & 8 deletions glider_launch_world_example/bear/simulation/initialLatLon.env

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions kinematics_ros_plugins/scripts/test_directKinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def command(startTime):
command.rudder_control_mode = 1
command.target_heading = math.pi/2.0
command.motor_cmd_type = 1
command.target_motor_cmd = 100.0
command.target_motor_cmd = 10.0
rospy.loginfo(command)
pub.publish(command)
time.sleep(8)
Expand Down Expand Up @@ -55,7 +55,7 @@ def command(startTime):
command.rudder_control_mode = 1
command.target_heading = math.pi/2
command.motor_cmd_type = 1
command.target_motor_cmd = 50.0
command.target_motor_cmd = 10.0
rospy.loginfo(command)
pub.publish(command)
time.sleep(5)
Expand Down
4 changes: 3 additions & 1 deletion kinematics_ros_plugins/src/KinematicsROSPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,10 @@ void KinematicsROSPlugin::ConveyCommands(
{
// Convey commands to functions
this->ConveyKinematicsCommands(_msg);

this->controlMsgDetected = true;

// Eliminate Gazebo physics
this->model->ResetPhysicsStates();
}

/////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<param name="use_sim_time" value="true"/>
<param name="gui" value="true"/>

<node name="gazebo" pkg="gazebo_ros" type="gazebo" args="/local_glider_files/simulation/PuertoRico_stratified_current_docker.world --verbose -u -e ode -s libdsros_sensors.so" respawn="false" output="screen">
<env name="GAZEBO_MODEL_PATH" value="$(optenv GAZEBO_MODEL_PATH):/local_glider_files/simulation/models/PuertoRico/"/>
<node name="gazebo" pkg="gazebo_ros" type="gazebo" args="$(dirname)/BuzzBay.world --verbose -u -e ode -s libdsros_sensors.so" respawn="false" output="screen">
<env name="GAZEBO_MODEL_PATH" value="$(optenv GAZEBO_MODEL_PATH):$(find glider_hybrid_whoi_gazebo)/models/BuzzBay/"/>
<env name="GAZEBO_RESOURCE_PATH" value="$(optenv GAZEBO_RESOURCE_PATH):$(dirname)"/>
</node>

<arg name="set_timeout" default="false"/>
Expand All @@ -22,7 +23,6 @@

<!-- Vehicle's initial position -->
<arg name="robot_name" default="glider_hybrid_whoi"/>
<arg name="use_geodetic" default="true"/>
<arg name="initial_latitude" default="41.5522"/>
<arg name="initial_longitude" default="-70.6803"/>
<arg name="initial_depth" default="-1"/>
Expand All @@ -31,8 +31,8 @@
<arg name="host_ip" default="128.128.62.4"/>
<arg name="port" default="30362"/>

<include file="$(find glider_hybrid_whoi_description)/launch/upload_glider_hybrid_whoi_kinematics.launch">
<arg name="use_geodetic" value="$(arg use_geodetic)"/>
<!-- Spawn vehicle into the world -->
<include file="$(dirname)/glider_hybrid_whoi_description/launch/upload_glider_hybrid_whoi_kinematics.launch">
<arg name="robot_name" value="$(arg robot_name)"/>
</include>

Expand Down
Loading