From d544fd2e5d79e144892cfad6175e5d6240566931 Mon Sep 17 00:00:00 2001 From: Claudio Chies Date: Fri, 19 Apr 2024 09:14:44 +0200 Subject: [PATCH 1/2] build dependencies fix --- adaptive_snowsampler/CMakeLists.txt | 1 + snowsampler_rviz/package.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/adaptive_snowsampler/CMakeLists.txt b/adaptive_snowsampler/CMakeLists.txt index 874dfac..2c231a9 100644 --- a/adaptive_snowsampler/CMakeLists.txt +++ b/adaptive_snowsampler/CMakeLists.txt @@ -15,6 +15,7 @@ find_package(catkin REQUIRED COMPONENTS tf grid_map_geo grid_map_ros + grid_map_geo_msgs eigen_catkin interactive_markers planner_msgs diff --git a/snowsampler_rviz/package.xml b/snowsampler_rviz/package.xml index e6be230..2c55953 100644 --- a/snowsampler_rviz/package.xml +++ b/snowsampler_rviz/package.xml @@ -10,6 +10,7 @@ catkin catkin_simple + grid_map_geo_msgs mav_msgs roscpp From 9dca16859239d43cc77d6056130bc06ff4209038 Mon Sep 17 00:00:00 2001 From: Claudio Chies Date: Fri, 19 Apr 2024 09:56:59 +0200 Subject: [PATCH 2/2] update readme, and adapt for braemabuel --- README.md | 24 +++++++++++---------- adaptive_snowsampler/launch/sitl_run.launch | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3acdb2b..67a1bd0 100644 --- a/README.md +++ b/README.md @@ -48,31 +48,33 @@ ros2 launch adaptive_snowsampler launch.xml ## Testing with PX4 Software-In-The-Loop(SITL) simulation -Run the simulation instance +Set the Package Paths +``` +cd ~/PX4-Autopilot/ +DONT_RUN=1 make px4_sitl_default gazebo-classic +source ~/catkin_ws/devel/setup.bash # (optional) +source Tools/simulation/gazebo-classic/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default +export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd) +export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/simulation/gazebo-classic/sitl_gazebo-classic +``` +Set the takeoff location ``` export PX4_HOME_LAT=46.785479 export PX4_HOME_LON=9.846803 export PX4_HOME_ALT=2301.23 -make px4_sitl gz_x500 -``` -Run the micro-ros-agent -``` -micro-ros-agent udp4 --port 8888 ``` + Run the node ``` -ros2 launch adaptive_snowsampler launch.xml -``` +roslaunch adaptive_snowsampler sitl_run.launch -## Setting the leg angle manually: -``` -rosservice call /snowsampler/set_landing_leg_angle "35.0" ``` ## Running the ground station To control the vehicle from the ground, we need to connect to the ROS Master on the drone. +Whereby its important that the IP is correct and that the drone and ground station are in the same zerotier network. Run rviz with the following command. ``` ROS_MASTER_URI=http://172.30.132.111:11311 diff --git a/adaptive_snowsampler/launch/sitl_run.launch b/adaptive_snowsampler/launch/sitl_run.launch index 0c15250..cacd6cc 100644 --- a/adaptive_snowsampler/launch/sitl_run.launch +++ b/adaptive_snowsampler/launch/sitl_run.launch @@ -3,7 +3,7 @@ - +