File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 matrix :
1515 test_script :
1616 - " tests/ros_node_tests/dp_node_test.sh"
17+ - " tests/ros_node_tests/eskf_node_test.sh"
1718 uses : vortexntnu/vortex-ci/.github/workflows/reusable-ros2-simulator-test.yml@main
1819 with :
1920 vcs_repos_file : " tests/dependencies.repos"
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ find_package(tf2 REQUIRED)
1818find_package (vortex_msgs REQUIRED )
1919find_package (spdlog REQUIRED )
2020find_package (fmt REQUIRED )
21- find_package (stonefish_ros2 REQUIRED )
2221
2322if (NOT DEFINED EIGEN3_INCLUDE_DIR)
2423 set (EIGEN3_INCLUDE_DIR ${EIGEN3_INCLUDE_DIRS} )
@@ -43,7 +42,6 @@ ament_target_dependencies(eskf_node
4342 vortex_msgs
4443 spdlog
4544 fmt
46- stonefish_ros2
4745)
4846
4947target_link_libraries (eskf_node
Original file line number Diff line number Diff line change 1111#include < std_msgs/msg/float64.hpp>
1212#include < std_msgs/msg/float64_multi_array.hpp>
1313#include < std_msgs/msg/string.hpp>
14- #include < stonefish_ros2/msg/dvl.hpp>
1514#include " eskf/eskf.hpp"
1615#include " eskf/typedefs.hpp"
1716#include " spdlog/spdlog.h"
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ def generate_launch_description():
1414 package = "eskf" ,
1515 executable = "eskf_node" ,
1616 name = "eskf_node" ,
17+ namespace = "orca" ,
1718 parameters = [
1819 eskf_params ,
1920 ],
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+ set -o pipefail
4+
5+ echo " Testing that the ESKF node is able to start up and publish odom"
6+
7+ # Load ROS 2 environment
8+ echo " Setting up ROS 2 environment..."
9+ . /opt/ros/humble/setup.sh
10+ . " ${WORKSPACE:- $HOME / ros2_ws} /install/setup.bash"
11+
12+ # Function to terminate processes safely on error
13+ cleanup () {
14+ echo " Error detected. Cleaning up..."
15+ kill -TERM -" $ESKF_PID " || true
16+ exit 1
17+ }
18+ trap cleanup ERR
19+
20+ # Launch eskf node
21+ setsid ros2 launch eskf eskf.launch.py &
22+ ESKF_PID=$!
23+ echo " Launched eskf with PID: $ESKF_PID "
24+
25+ # Check for ROS errors before continuing
26+ if journalctl -u ros2 | grep -i " error" ; then
27+ echo " Error detected in ROS logs. Exiting..."
28+ exit 1
29+ fi
30+
31+ # Check if eskf correctly publishes odom
32+ echo " Waiting for odom data..."
33+ timeout 10s ros2 topic echo /orca/odom --once
34+ echo " Got odom data"
35+
36+ # Terminate processes
37+ kill -TERM -" $ESKF_PID "
38+
39+ echo " Test completed successfully."
You can’t perform that action at this time.
0 commit comments