diff --git a/.devcontainer/nvidia/devcontainer.json b/.devcontainer/nvidia/devcontainer.json index 2b26ed4..a3a1b13 100644 --- a/.devcontainer/nvidia/devcontainer.json +++ b/.devcontainer/nvidia/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "px4_roscon_25_wsl", + "name": "px4_roscon_25_nvidia", "image": "dronecode/roscon-25-workshop:latest", "forwardPorts": [8765], "containerEnv": { diff --git a/docs/assets/foxglove_teleop.png b/docs/assets/foxglove_teleop.png new file mode 100644 index 0000000..9990bf7 Binary files /dev/null and b/docs/assets/foxglove_teleop.png differ diff --git a/docs/assets/qgc_param.png b/docs/assets/qgc_param.png new file mode 100644 index 0000000..72aee45 Binary files /dev/null and b/docs/assets/qgc_param.png differ diff --git a/docs/setup.md b/docs/setup.md index 6a8487a..45d9d3c 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -250,7 +250,7 @@ INFO [commander] Ready for takeoff! This is all you need to do to start the GZ + PX4 simulation, you can now takeoff! -## Next step (otional) - Link the simulation to ROS 2 +## Next step (optional) - Link the simulation to ROS 2 With the simulation up an running, it is time to bridge ROS 2 with Gazebo and PX4. diff --git a/px4_roscon_25/precision_land_executor/CustomMode_v2.cpp b/px4_roscon_25/precision_land_executor/CustomMode_v2.cpp index 2cda2ad..2a40d40 100644 --- a/px4_roscon_25/precision_land_executor/CustomMode_v2.cpp +++ b/px4_roscon_25/precision_land_executor/CustomMode_v2.cpp @@ -27,13 +27,11 @@ void CustomWaypoints::loadParameters() { void CustomWaypoints::onActivate() { // Initialize waypoints - _trajectory_waypoints.push_back(Eigen::Vector3f(5.0f, 0.0f, -2.0f)); // Initial waypoint at home position - _trajectory_waypoints.push_back(Eigen::Vector3f(5.0f, 5.0f, -2.0f)); // Second waypoint - _trajectory_waypoints.push_back(Eigen::Vector3f(-5.0f, 5.0f, -2.0f)); // Third waypoint - _trajectory_waypoints.push_back(Eigen::Vector3f(-5.0f, -5.0f, -2.0f)); // Fourth waypoint - _trajectory_waypoints.push_back(Eigen::Vector3f(_local_position->positionNed().x(), - _local_position->positionNed().y(), - _local_position->positionNed().z())); // Final waypoint at current position + _trajectory_waypoints.push_back(Eigen::Vector3f(1.0f, 2.5f, -3.0f)); + _trajectory_waypoints.push_back(Eigen::Vector3f(14.0f, 2.5f, -3.0f)); + _trajectory_waypoints.push_back(Eigen::Vector3f(14.0f, 8.0f, -3.0f)); + _trajectory_waypoints.push_back(Eigen::Vector3f(-4.0f, 8.0f, -3.0f)); + _current_waypoint_index = 0; // Start at the first waypoint RCLCPP_INFO(_node.get_logger(), "CustomWaypoints mode activated"); // Set initial trajectory setpoint diff --git a/px4_roscon_25/precision_land_executor/README.md b/px4_roscon_25/precision_land_executor/README.md index 110f994..e166265 100644 --- a/px4_roscon_25/precision_land_executor/README.md +++ b/px4_roscon_25/precision_land_executor/README.md @@ -50,6 +50,10 @@ The system: ## Usage +The current waypoints require a velocity limit, you can set it in QGC. + +![QGC param](../../docs//assets/qgc_param.png) + 1. Launch the common launchfile ```sh diff --git a/px4_roscon_25/teleop/README.md b/px4_roscon_25/teleop/README.md index cd6d06b..e59a734 100644 --- a/px4_roscon_25/teleop/README.md +++ b/px4_roscon_25/teleop/README.md @@ -46,6 +46,10 @@ ros2 run teleop_twist_rpyt_keyboard teleop_twist_rpyt_keyboard Just like in the Custom Mode demo, the teleop one requires you to manually activate it and arm the drone! Make sure you launch the maze in Foxglove, more details see [Foxglove Instructions](../px4_roscon_25/README.md) +Your output should look like this: +![foxglove example](../../docs/assets/foxglove_teleop.png) + + ## Exercise Navigate the drone to the target in Foxglove using teleoperation.