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

fix build error, and adapt readme #8

Merged
merged 2 commits into from
Apr 19, 2024
Merged
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
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions adaptive_snowsampler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion adaptive_snowsampler/launch/sitl_run.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<arg name="fcu_url" default="udp://:[email protected]:14557"/>
<arg name="gcs_url" default="" />
<arg name="visualization" default="false"/>
<arg name="location" default="prodkamm_1m_crop"/>
<arg name="location" default="braemabuel"/>
<arg name="gui" default="false"/>
<arg name="verbose" default="false"/>

Expand Down
1 change: 1 addition & 0 deletions snowsampler_rviz/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin_simple</buildtool_depend>
<build_depend>grid_map_geo_msgs</build_depend>

<depend>mav_msgs</depend>
<depend>roscpp</depend>
Expand Down
Loading