Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocean Current Plugin #18

Open
wants to merge 64 commits into
base: ros2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
48b556f
Added ocean_Current_Plugin at dave_ros_gz_plugins
GauravKumar9920 Jul 9, 2024
9a80242
added the world, model and general plugin for water_current along wit…
GauravKumar9920 Jul 19, 2024
286a21d
updated the ocean current model plugin
GauravKumar9920 Jul 20, 2024
8bf2963
updated and adjusted the head node
GauravKumar9920 Jul 21, 2024
81f4d94
addidng service and msg, updated cmake
GauravKumar9920 Jul 25, 2024
9a2d810
updated include file directory
GauravKumar9920 Jul 25, 2024
425bb68
updated a few things and resolved bugs for dave_interfaces
GauravKumar9920 Jul 25, 2024
e33faf4
updates in code after fixing bugs
GauravKumar9920 Jul 25, 2024
2df7a8a
minor updates to the ocean current world plugin
GauravKumar9920 Jul 28, 2024
1b7a606
added proto files for oc_world
GauravKumar9920 Jul 28, 2024
44bc507
minor fixes
GauravKumar9920 Jul 29, 2024
5f88f0b
minor updates
GauravKumar9920 Aug 1, 2024
e601dc1
added service support on ocean_current plugin
GauravKumar9920 Aug 1, 2024
fd37ffd
updates
GauravKumar9920 Aug 2, 2024
206963f
updated code fixed bugs
GauravKumar9920 Aug 3, 2024
596458b
ocean_current CSV Update/support added
GauravKumar9920 Aug 5, 2024
11eb6b6
fixes
GauravKumar9920 Aug 10, 2024
a241227
minor code fixes
GauravKumar9920 Aug 12, 2024
ea74a89
minor changes
GauravKumar9920 Aug 12, 2024
2e48a9c
Changes to CMakeLists.txt
rakeshv24 Aug 14, 2024
6085c31
minor change
rakeshv24 Aug 14, 2024
42927b6
minor changes
rakeshv24 Aug 14, 2024
11e08e0
sucessfully building model and world plugins :)
GauravKumar9920 Aug 15, 2024
20dae53
Building Sucessfully git status
GauravKumar9920 Aug 16, 2024
a209450
pre final code
GauravKumar9920 Aug 17, 2024
dea4ff9
gazebo source install script
woensug-choi Aug 7, 2024
ce11003
specify gz-phyics version
woensug-choi Aug 7, 2024
9ee8fe1
Update README.md
woensug-choi Aug 8, 2024
35b2f05
source install test
woensug-choi Aug 7, 2024
b8423a4
amd
woensug-choi Aug 7, 2024
fe611e1
clean up
woensug-choi Aug 7, 2024
b3640cf
add entry and pythonpath
woensug-choi Aug 7, 2024
5273020
minor fix
woensug-choi Aug 7, 2024
f16e9d7
finalize
woensug-choi Aug 7, 2024
35eb686
specify gz-physics version
woensug-choi Aug 7, 2024
61266fb
testing self-hosted runner
woensug-choi Aug 7, 2024
5885978
arm build takes longer than 6 hours
woensug-choi Aug 8, 2024
413782c
added sub_sea_pressure_sensor_plugin
GauravKumar9920 Jul 24, 2024
65286f1
added support for proto
GauravKumar9920 Jul 24, 2024
41fbeae
updated cmake for review
GauravKumar9920 Jul 25, 2024
f8da1a6
fix include issue
hmoyen Jul 25, 2024
04fbb43
removed duplicates
GauravKumar9920 Jul 26, 2024
339dae0
Successfully compiling code
GauravKumar9920 Jul 27, 2024
f58fa12
Pre-Final fixes
GauravKumar9920 Aug 4, 2024
e6615d1
fix material issues
hmoyen Jul 25, 2024
8e30757
Final code for Sea_Pressure_sensor_plugin
GauravKumar9920 Aug 6, 2024
922e494
minor Update
GauravKumar9920 Aug 6, 2024
c3e4d33
updated code with reccomended changes
GauravKumar9920 Aug 8, 2024
f49f229
Minor changes
GauravKumar9920 Aug 8, 2024
428b382
Removed Proto
GauravKumar9920 Aug 9, 2024
9b1a7b2
remove empty file
woensug-choi Aug 9, 2024
e731f5c
add lints and build checks for PR too
woensug-choi Aug 9, 2024
408e8a3
minor changes and modification of sdf
GauravKumar9920 Sep 3, 2024
085b4eb
testing
GauravKumar9920 Sep 19, 2024
42f989d
working ocean current model plugin
GauravKumar9920 Oct 6, 2024
cb27f22
major restructuring and refreshed code
GauravKumar9920 Oct 6, 2024
df383b3
fixed issues with OCWP
GauravKumar9920 Oct 9, 2024
c449d63
proto is linked
woensug-choi Oct 23, 2024
c812c51
few fixes
GauravKumar9920 Nov 16, 2024
5143826
few fixes2
GauravKumar9920 Nov 16, 2024
f04faad
update
GauravKumar9920 Nov 27, 2024
a996b01
loacl changes
GauravKumar9920 Dec 23, 2024
31d77f3
fixed pointer memory allocation issue
GauravKumar9920 Dec 28, 2024
1d30cb3
code check
GauravKumar9920 Dec 28, 2024
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
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.proto
17 changes: 13 additions & 4 deletions .docker/jazzy.amd64.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ RUN adduser --shell /bin/bash --disabled-password --gecos '' $USER \

# Install ROS-Gazebo framework
ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
extras/ros-jazzy-gz-harmonic-install.sh install.sh
extras/ros-jazzy-binary-gz-harmonic-source-install.sh install.sh
RUN bash install.sh

# Set up Dave workspace
ENV DAVE_WS /root/ws_dave
ENV DAVE_WS=/opt/ws_dave
WORKDIR $DAVE_WS/src

ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
Expand All @@ -62,8 +62,17 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" && \

# source entrypoint setup
RUN touch /ros_entrypoint.sh && sed --in-place --expression \
'$i source "$DAVE_WS/install/setup.bash"' /ros_entrypoint.sh
'$i source "/opt/ws_dave/install/setup.bash"' /ros_entrypoint.sh

# Source ROS and Gazebo
RUN sed --in-place --expression \
'$i source "/opt/ros/jazzy/setup.bash"' /ros_entrypoint.sh && \
sed --in-place --expression \
'$i source "/opt/gazebo/install/setup.bash"' /ros_entrypoint.sh && \
sed --in-place --expression \
'$i export PYTHONPATH=$PYTHONPATH:/opt/gazebo/install/lib/python' /ros_entrypoint.sh

# Set User as user
USER $USER
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \
echo "source /opt/gazebo/install/setup.bash" >> ~/.bashrc
8 changes: 5 additions & 3 deletions .docker/jazzy.arm64v8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

# Using the pre-built image for above commented out dockerfile code lines
# hadolint ignore=DL3007
FROM woensugchoi/ubuntu-arm-rdp-base:latest
FROM --platform=linux/arm64 woensugchoi/ubuntu-arm-rdp-base:latest
ARG USER=docker

# ROS-Gazebo arg
Expand All @@ -87,11 +87,11 @@ ARG ROS_DISTRO="jazzy"

# Install ROS-Gazebo framework
ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
extras/ros-jazzy-gz-harmonic-install.sh install.sh
extras/ros-jazzy-binary-gz-harmonic-source-install.sh install.sh
RUN bash install.sh

# Set up Dave workspace
ENV ROS_UNDERLAY /home/$USER/dave_ws/install
ENV ROS_UNDERLAY=/home/$USER/dave_ws/install
WORKDIR $ROS_UNDERLAY/../src

ADD https://raw.githubusercontent.com/IOES-Lab/dave/$BRANCH/\
Expand Down Expand Up @@ -129,6 +129,8 @@ RUN touch /ros_entrypoint.sh && sed --in-place --expression \
# Set User as user
USER docker
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \
echo "source /opt/gazebo/install/setup.bash" >> ~/.bashrc && \
echo "export PYTHONPATH=$PYTHONPATH:/opt/gazebo/install/lib/python" >> ~/.bashrc && \
echo "if [ -d ~/HOST ]; then chown docker:docker ~/HOST; fi" \
>> ~/.bashrc

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docker-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
tags: ["*"]
branches:
- ros2
- dockertest

env:
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -15,7 +16,8 @@ env:

jobs:
build-and-push-to-docker-hub:
runs-on: ubuntu-latest
# runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
contents: read
packages: write
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docker-arm64v8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
tags: ["*"]
branches:
- ros2
- dockertest

env:
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -15,7 +16,9 @@ env:

jobs:
build-and-push-to-docker-hub:
runs-on: ubuntu-latest
# runs-on: ubuntu-latest
runs-on: self-hosted
timeout-minutes: 1440
permissions:
contents: read
packages: write
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/jazzy-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ on:
- "**/package.xml"
- "**/CMakeLists.txt"
- "dave.jazzy.repos"
pull_request:
types: [opened, reopened]
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: "03 3 * * *"
# Run every week to detect flakiness and broken dependencies
- cron: "03 3 * * 1"

env:
ros_distro: jazzy
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
tags: ["*"]
branches:
- ros2
pull_request:
types: [opened, reopened]

jobs:
# ament_lint:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# DAVE

[![Publish a Docker image (AMD64; Common X86_64 Linux Machine)](https://github.com/IOES-Lab/dave/actions/workflows/docker-amd64.yml/badge.svg)](https://github.com/IOES-Lab/dave/actions/workflows/docker-amd64.yml)
[![Publish a Docker image (ARM64; Apple Silicon)](https://github.com/IOES-Lab/dave/actions/workflows/docker-arm64v8.yml/badge.svg?branch=ros2)](https://github.com/IOES-Lab/dave/actions/workflows/docker-arm64v8.yml)

For contribution, do `pip3 install pre-commit && pre-commit install && pre-commit run --all-files` before commit.
12 changes: 11 additions & 1 deletion dave_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(gz-cmake3 REQUIRED)
find_package(gz-msgs10 REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/UsblCommand.msg"
"msg/UsblResponse.msg"
"msg/Location.msg"
"msg/StratifiedCurrentVelocity.msg"
"msg/StratifiedCurrentDatabase.msg"
"srv/SetOriginSphericalCoord.srv"
"srv/GetOriginSphericalCoord.srv"
"srv/TransformToSphericalCoord.srv"
"srv/TransformFromSphericalCoord.srv"
"srv/GetCurrentModel.srv"
"srv/SetCurrentModel.srv"
"srv/SetCurrentDirection.srv"
"srv/SetCurrentVelocity.srv"
"srv/SetStratifiedCurrentVelocity.srv"
"srv/SetStratifiedCurrentDirection.srv"
DEPENDENCIES geometry_msgs
)

Expand All @@ -33,4 +43,4 @@ ament_export_dependencies(rosidl_default_runtime)
# Install CMake package configuration
ament_export_include_directories(include)

ament_package()
ament_package()
42 changes: 42 additions & 0 deletions dave_interfaces/msg/StratifiedCurrentDatabase.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Publishes depths and velocities read from the csv database

# Depths
float32[] depths

# Velocities
geometry_msgs/Vector3[] velocities

# Tide time (GMT)
int16[] time_gmt_year
int16[] time_gmt_month
int16[] time_gmt_day
int16[] time_gmt_hour
int16[] time_gmt_minute

# Tide velocities
float32[] tidevelocities

# Tide constituents
bool tideconstituents
float32 m2_amp
float32 m2_phase
float32 m2_speed
float32 s2_amp
float32 s2_phase
float32 s2_speed
float32 n2_amp
float32 n2_phase
float32 n2_speed

# Tide direction
float32 ebb_direction
float32 flood_direction

# World start time (GMT)
int16 world_start_time_year
int16 world_start_time_month
int16 world_start_time_day
int16 world_start_time_hour
int16 world_start_time_minute

# Everything is written in lowercase according to ROS 2 conventions old(v)
10 changes: 10 additions & 0 deletions dave_interfaces/msg/StratifiedCurrentVelocity.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Publishes depths and velocities based on the database contents

std_msgs/Header header

# Depths
float32[] depths

# Velocities
geometry_msgs/Vector3[] velocities

21 changes: 21 additions & 0 deletions dave_interfaces/srv/GetCurrentModel.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

---
float64 mean
float64 min
float64 max
float64 noise
float64 mu
18 changes: 18 additions & 0 deletions dave_interfaces/srv/SetCurrentDirection.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

float64 angle
---
bool success
22 changes: 22 additions & 0 deletions dave_interfaces/srv/SetCurrentModel.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

float64 mean
float64 min
float64 max
float64 noise
float64 mu
---
bool success
20 changes: 20 additions & 0 deletions dave_interfaces/srv/SetCurrentVelocity.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

float64 velocity
float64 horizontal_angle
float64 vertical_angle
---
bool success
19 changes: 19 additions & 0 deletions dave_interfaces/srv/SetStratifiedCurrentDirection.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

uint16 layer
float64 angle
---
bool success
21 changes: 21 additions & 0 deletions dave_interfaces/srv/SetStratifiedCurrentVelocity.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2024 The dave Simulator Authors.
# All rights reserved.
#
# 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.

uint16 layer
float64 velocity
float64 horizontal_angle
float64 vertical_angle
---
bool success
3 changes: 2 additions & 1 deletion examples/dave_robot_launch/launch/robot_in_world.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def launch_setup(context, *args, **kwargs):
gz_args.append(" -r")
if debug.perform(context) == "true":
gz_args.append(" -v ")
gz_args.append(verbose.perform(context))
if verbose.perform(context) == "true":
gz_args.append(" -v ")

# Include the first launch file
gz_sim_launch = IncludeLaunchDescription(
Expand Down
Loading