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

Updated code from the summer #194

Open
wants to merge 69 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
0f9feb3
Added LQR and PID DP
Mokaz Apr 28, 2024
cff5d3c
Fixed topic names and initial tuning
Andeshog Apr 29, 2024
4a1110f
Made LQR and PID ready for testing
Andeshog Apr 29, 2024
539d025
Added QoS profile to seapath/odom subscription
Andeshog Apr 29, 2024
f9cc001
Added QoS profile
Andeshog Jun 23, 2024
e611e5c
Added yaw publisher
Andeshog Jul 5, 2024
7050c3b
.
Andeshog Jul 9, 2024
1cd14f8
Added way to reinitialize waypoints through service call
Andeshog Jul 11, 2024
09110fa
Enabled controller tuning of LQR and PID during runtime.
Andeshog Jul 13, 2024
19a7ff0
sitaw merge
jorgenfj Jul 13, 2024
18024e5
Committing clang-format changes
Jul 13, 2024
c204914
Working system after physical testing
Andeshog Jul 15, 2024
4f63bb1
Wall update
jorgenfj Jul 20, 2024
447125b
Committing clang-format changes
Jul 20, 2024
08afdba
qos fix
jorgenfj Jul 23, 2024
cfc4853
Committing clang-format changes
Jul 23, 2024
0131dcb
Add sim launch for freya
chrstrom Jul 25, 2024
3e3b7de
docking task
jorgenfj Jul 26, 2024
64b5b88
Committing clang-format changes
Jul 26, 2024
168772e
Add controller to sim launch
chrstrom Jul 26, 2024
d9c848c
dynamic buoy prediction
jorgenfj Jul 26, 2024
f406191
Committing clang-format changes
Jul 26, 2024
07cfa31
njord task structure
jorgenfj Jul 29, 2024
fa84fd0
Committing clang-format changes
Jul 29, 2024
5ff9ec4
auction algorithm fix
jorgenfj Jul 29, 2024
f5248f4
Committing clang-format changes
Jul 29, 2024
364d056
utility functions for task base
jorgenfj Jul 30, 2024
e7a71da
Committing clang-format changes
Jul 30, 2024
a09d4e5
navigation task test ready
jorgenfj Jul 30, 2024
d05125e
Committing clang-format changes
Jul 30, 2024
4de17fa
Concurrency setup change
jorgenfj Jul 31, 2024
1d5d522
Committing clang-format changes
Jul 31, 2024
06dec3e
bugfix in navigation, finished maneuvering
jorgenfj Jul 31, 2024
8407037
Committing clang-format changes
Jul 31, 2024
a6a61ac
Map manager sim setup
jorgenfj Aug 1, 2024
e974929
Committing clang-format changes
Aug 1, 2024
638f998
Controller wont publish forces if the killswitch is on or system not …
Andeshog Aug 5, 2024
591919a
Added comminication with joystick and ability to set desired yaw angl…
Andeshog Aug 5, 2024
7dd07c7
Removed spam, initialized y-button
Andeshog Aug 5, 2024
bced81a
Raised max and min thrust
Andeshog Aug 5, 2024
cfa6963
Minor adjustments to heading tuning
Andeshog Aug 5, 2024
783168d
improved logging and behaviour for stationkeeping
Andeshog Aug 5, 2024
6f6d8fc
Added ability to set stationkeeping pose by pressing Y
Andeshog Aug 5, 2024
b461023
visualization fix
jorgenfj Aug 5, 2024
b9f431c
Committing clang-format changes
Aug 5, 2024
b98b385
Set mu to zero such that the vessel can keep constant velocity more e…
Andeshog Aug 7, 2024
adf847a
Added new list to waypoint node collection. 40 meters straight east
Andeshog Aug 7, 2024
628fa19
Merge branch 'test/29.04' of https://github.com/vortexntnu/vortex-asv…
Andeshog Aug 7, 2024
70b32a1
colav task
jorgenfj Aug 8, 2024
5fb44bc
Committing clang-format changes
Aug 8, 2024
0310cd8
thrust force and mapping
vortexuser Aug 7, 2024
266ae94
fill landmark polygons
jorgenfj Aug 9, 2024
47ba8ab
Committing clang-format changes
Aug 9, 2024
d59023f
dock edge localization test
jorgenfj Aug 9, 2024
8a6aab5
Committing clang-format changes
Aug 9, 2024
fffa973
Update docstrings
Andeshog Aug 17, 2024
b423d55
Cleanup
Andeshog Aug 17, 2024
535df5b
Remove unused packages and files
Andeshog Aug 17, 2024
4a3e8b9
Remove unused files from install
Andeshog Aug 17, 2024
3d0e8b9
Updated waypoint service call example
Andeshog Aug 17, 2024
57ff9e6
Boolean value for when the built in heading reference for the path sh…
Andeshog Aug 17, 2024
cd33ea5
Removed commented code
Andeshog Aug 17, 2024
bcef888
Removed unncecessary if else
Andeshog Aug 17, 2024
883f88d
moved map-odom-tf to map_manager and added optional grid usage in lan…
jorgenfj Aug 17, 2024
b65b35a
Committing clang-format changes
Aug 17, 2024
04c0bcc
Add coriolis
Andeshog Aug 17, 2024
4229552
Remove old force mapping
Andeshog Aug 17, 2024
f8ee295
Merge branch 'test/29.04' of https://github.com/vortexntnu/vortex-asv…
Andeshog Aug 17, 2024
b7f6fab
build fix
jorgenfj Aug 18, 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
4 changes: 2 additions & 2 deletions asv_setup/config/robots/freya.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
yaw: true
thrusters:
num: 4
min: -200
max: 200
min: -1000
max: 1000
configuration_matrix: #NED
[0.70711, 0.70711, 0.70711, 0.70711,
-0.70711, 0.70711, -0.70711, 0.70711,
Expand Down
8 changes: 8 additions & 0 deletions asv_setup/config/sitaw/land_polygon_grillstad.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sitaw folder should be restructured, add polygons in their own folder, params somewhere else

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
63.437946025438066 10.507175268806458
63.43787563495969 10.507121157686353
63.4378360402396 10.50719002638467
63.43763366637102 10.50697358190425
63.43760726967404 10.507101480915406
63.43713432473124 10.506752218231092
63.437239913116464 10.505876601923934
63.438056010214204 10.506461985859616
16 changes: 16 additions & 0 deletions asv_setup/config/sitaw/land_polygon_office.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
63.41489120183045 10.39705552070149
63.41497265487507 10.39783732516908
63.41538547016246 10.397651181248118
63.415431749532054 10.398250978326427
63.415048554100395 10.398449531842004
63.41512075073269 10.399185834462275
63.41495229164123 10.399305793877936
63.41486158248972 10.398540535536645
63.41453021396673 10.398747362115373
63.4145246602717 10.398631539231284
63.414280296625655 10.39877218130482
63.41424142039905 10.398197203415958
63.4144598670836 10.398110336252891
63.41444505719146 10.397990376837232
63.41478938520484 10.397841461700548
63.41472089017681 10.397167207053899
4 changes: 4 additions & 0 deletions asv_setup/config/sitaw/land_polygon_sim_maneuvering.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-33.722464875303054 150.6733186790048
-33.720864277234156 150.673353826611
-33.72115033638088 150.67502276015122
-33.72271743627459 150.67461276680072
5 changes: 5 additions & 0 deletions asv_setup/config/sitaw/land_polygon_sim_navigation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-33.722576743831986 150.67377683501326
-33.72213785615945 150.6737273159938
-33.722119332734295 150.6744244880215
-33.72265441348879 150.6743192836287

5 changes: 5 additions & 0 deletions asv_setup/config/sitaw/landmark_server_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
landmark_server_node:
ros__parameters:
fixed_frame: map
target_frame: base_link
wall_width: 0.1
25 changes: 25 additions & 0 deletions asv_setup/config/sitaw/map_manager_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
map_manager_node:
ros__parameters:
use_predef_landmask: true
landmask_file: "src/vortex-asv/asv_setup/config/sitaw/land_polygon_sim_maneuvering.yaml"
# landmask_file: "src/vortex-asv/asv_setup/config/sitaw/land_polygon_office.yaml"
map_resolution: 0.2
map_width: 1000
map_height: 1000
frame_id: "map"
# Map origin for office rosbag
# map_origin_lat: 63.414660884931976
# map_origin_lon: 10.398554661537544
# use_predef_map_origin: true
# Map origin for sim_navigation
# map_origin_lat: -33.72242824301795
# map_origin_lon: 150.6740063854522
# use_predef_map_origin: true
# Map origin for sim_maneuvering
# map_origin_lat: -33.72213985487166
# map_origin_lon: 150.67413507552098
# use_predef_map_origin: true
#colav
map_origin_lat: -33.72213988382845
map_origin_lon: 150.67413500672993
use_predef_map_origin: true
7 changes: 7 additions & 0 deletions asv_setup/config/sitaw/seapath_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
seapath_ros_driver_node:
ros__parameters:
UDP_IP: "10.0.1.10" # Source IP of the host sender
UDP_PORT: 31421 # Port at which to receive UDP semgents
use_predef_map_origin: false
map_origin_lat: 0.0
map_origin_lon: 0.0
69 changes: 69 additions & 0 deletions asv_setup/launch/sim_freya.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
from os import path
from launch_ros.actions import Node
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
from launch.actions import SetEnvironmentVariable, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
# Set environment variable
set_env_var = SetEnvironmentVariable(
name='ROSCONSOLE_FORMAT',
value='[${severity}] [${time}] [${node}]: ${message}'
)


# Thruster Allocator launch
thruster_allocator_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
path.join(get_package_share_directory('thruster_allocator'), 'launch', 'thruster_allocator.launch.py')
)
)

# Joystick node
joy_node = Node(
package='joy',
executable='joy_node',
name='joystick_driver',
output='screen',
parameters=[
{'deadzone': 0.15},
{'autorepeat_rate': 100.0},
],
remappings=[
('/joy', '/joystick/joy'),
],
)

# Joystick interface launch
joystick_interface_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
path.join(get_package_share_directory('joystick_interface'), 'launch', 'joystick_interface.launch.py')
)
)

# Vortex Sim Interface launch
vortex_sim_interface_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
path.join(get_package_share_directory('vortex_sim_interface'), 'launch', 'vortex_sim_interface.launch.py')
)
)

# Controller
controller_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
path.join(get_package_share_directory('asv_setup'), 'launch', 'hybridpath.launch.py')
)
)

# Return launch description
return LaunchDescription([
set_env_var,
thruster_allocator_launch,
joy_node,
joystick_interface_launch,
controller_launch,
vortex_sim_interface_launch,
])
60 changes: 60 additions & 0 deletions asv_setup/launch/sitaw.launch.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the ASV is to be worked on further, please split it into a better repo structure.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
from launch_ros.actions import Node
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.conditions import IfCondition
from launch.substitutions import LaunchConfiguration


def generate_launch_description():
enable_tf = LaunchConfiguration('enable_tf')
enable_tf_arg = DeclareLaunchArgument(
'enable_tf',
default_value='True',
description='enable tf launch file',
)
enable_seapath = LaunchConfiguration('enable_seapath')
enable_seapath_arg = DeclareLaunchArgument(
'enable_seapath',
default_value='True',
description='enable seapath launch file',
)

seapath_ros_driver_node = Node(
package='seapath_ros_driver',
executable='seapath_ros_driver_node',
name='seapath_ros_driver_node',
parameters=[os.path.join(get_package_share_directory('asv_setup'),'config','sitaw','seapath_params.yaml')],
output='screen',
condition=IfCondition(enable_seapath),

)
map_manager_node = Node(
package='map_manager',
executable='map_manager_node',
name='map_manager_node',
parameters=[os.path.join(get_package_share_directory('asv_setup'),'config','sitaw','map_manager_params.yaml')],
output='screen',
)
landmark_server_node = Node(
package='landmark_server',
executable='landmark_server_node',
name='landmark_server_node',
parameters=[os.path.join(get_package_share_directory('asv_setup'),'config','sitaw','landmark_server_params.yaml')],
# arguments=['--ros-args', '--log-level', 'DEBUG'],
output='screen',
)
tf_launch = IncludeLaunchDescription(
launch_description_source=PythonLaunchDescriptionSource(os.path.join(get_package_share_directory('asv_setup'), 'launch', 'tf.launch.py')),
condition=IfCondition(enable_tf),
)
return LaunchDescription([
enable_tf_arg,
tf_launch,
enable_seapath_arg,
seapath_ros_driver_node,
map_manager_node,
landmark_server_node
])
21 changes: 18 additions & 3 deletions asv_setup/launch/tf.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def generate_launch_description():
)

# base_link (NED) to seapath_frame (NED) tf.
tf_base_link_to_seapath = Node(
tf_seapath_to_base_link = Node(
package='tf2_ros',
name='base_link_ned_to_seapath_frame',
name='seapath_to_base_link',
executable='static_transform_publisher',
arguments=['--x' , '0',
'--y' , '0',
Expand All @@ -50,8 +50,23 @@ def generate_launch_description():
'--child-frame-id' , 'base_link'],
)

os_sensor_to_os_lidar = Node(
package='tf2_ros',
name='os_sensor_to_os_lidar',
executable='static_transform_publisher',
arguments=['--x' , '0',
'--y' , '0',
'--z' , '0.036180000000000004',
'--roll' , '0',
'--pitch' , '0',
'--yaw' , str(math.pi),
'--frame-id' , 'os_sensor',
'--child-frame-id' , 'os_lidar'],
)

return LaunchDescription([
tf_base_link_to_lidar,
tf_base_link_to_zed_camera_link,
tf_base_link_to_seapath,
tf_seapath_to_base_link,
os_sensor_to_os_lidar,
])
1 change: 1 addition & 0 deletions guidance/hybridpath_guidance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ find_package(ament_cmake_python REQUIRED)
find_package(rclpy REQUIRED)
find_package(vortex_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(std_srvs REQUIRED)

ament_python_install_package(${PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion guidance/hybridpath_guidance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Or alternatively, run it together with the hybridpath controller using the launc

To run with custom waypoints (replace example waypoints with actual waypoints, and add as many prefered):

`ros2 service call waypoint_list vortex_msgs/srv/Waypoint "waypoint: [{x: 0.0, y: 0.0, z: 0.0}, {x: 5.0, y: 5.0, z: 0.0}]"`
`ros2 service call waypoint_list vortex_msgs/srv/Waypoint "waypoint: [{x: 5.0, y: 5.0, z: 0.0}]"`

## Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
lambda_val: 0.15 # Curvature constant
path_generator_order: 1 # Differentiability order
dt: 0.1 # Time step
mu: 0.03 # Tuning parameter
mu: 0.25 # Tuning parameter, changes how much the path will wait for the vessel if it lags behind
Loading
Loading