diff --git a/README.md b/README.md index 2c9a032..4942aa9 100644 --- a/README.md +++ b/README.md @@ -1 +1,128 @@ -# ardupilot_gz \ No newline at end of file +# ardupilot_gz + +Adapted from the [`ros_gz_project_template`](https://github.com/gazebosim/ros_gz_project_template) project integrating ROS 2 and Gazebo. + +## Included packages + +* `ardupilot_gz_description` - Contains the sdf description of the simulated + system and any other assets. + +* `ardupilot_gz_gazebo` - Contains Gazebo specific code and configurations such + as system plugins. + +* `ardupilot_gz_application` - Contains ROS 2 specific code and configuration. + +* `ardupilot_gz_bringup` - Contains launch files and high level utilities. + + +## Install + +### Dependencies + +1. Install [ROS 2 Humble](https://docs.ros.org/en/humble/index.html) + +1. Install [Gazebo Garden](https://gazebosim.org/docs/garden) + +1. Install necessary tools + + `sudo apt install python3-vcstool python3-colcon-common-extensions git wget` + +### Usage + +1. Create a workspace, for example: + + ``` + mkdir -p ~/ros2_ws/src + cd ~/ros2_ws/src + ``` + +1. Clone the project: + + ``` + TBC + ``` + +1. Set the Gazebo version to Garden: + + ``` + export GZ_VERSION=garden + ``` + +1. Install ROS dependencies + + ``` + sudo rosdep init + rosdep update + rosdep install --from-paths src --ignore-src -r -y -i + ``` + +1. Build and install + + ``` + cd ~/ros2_ws + colcon build --cmake-args -DBUILD_TESTING=ON + ``` + +### Run + +1. Source the workspace + + `. ~/ros2_ws/install/setup.sh` + +1. Launch the simulation + + `ros2 launch ardupilot_gz_bringup bringup_iris.launch.py` + +1. Launch the a GCS + + `mavproxy.py --console --map` + +1. Inspect topics + + ```bash + $ ros2 topic list + /ROS2_BatteryState0 + /ROS2_NavSatFix0 + /ROS2_Time + /clicked_point + /clock + /goal_pose + /initialpose + /iris/odometry + /joint_states + /parameter_events + /robot_description + /rosout + /tf + /tf_static + ``` + + +## Notes + +1. Additional dependency + + `ros_gz` has a dependency on `gps_msgs` included in + + ```bash + git clone https://github.com/swri-robotics/gps_umd.git -b ros2-devel + ``` + + Add `COLCON_IGNORE` to `gpsd_client` as this package is not required and + will not build on macOS. + +1. sdformat_urdf + + On macOS the `robot_state_publisher` node cannot load the + `sdformat_urdf_plugin` plugin unless the + suffix is changed: + + ```bash + cd ./install/sdformat_urdf/lib + ln -s libsdformat_urdf_plugin.so libsdformat_urdf_plugin.dylib + ``` + +1. Model URIs + + The `` element must use the `package` prefix for resource to be located + by RViz. diff --git a/ardupilot_gz/README.md b/ardupilot_gz/README.md deleted file mode 100644 index 4942aa9..0000000 --- a/ardupilot_gz/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# ardupilot_gz - -Adapted from the [`ros_gz_project_template`](https://github.com/gazebosim/ros_gz_project_template) project integrating ROS 2 and Gazebo. - -## Included packages - -* `ardupilot_gz_description` - Contains the sdf description of the simulated - system and any other assets. - -* `ardupilot_gz_gazebo` - Contains Gazebo specific code and configurations such - as system plugins. - -* `ardupilot_gz_application` - Contains ROS 2 specific code and configuration. - -* `ardupilot_gz_bringup` - Contains launch files and high level utilities. - - -## Install - -### Dependencies - -1. Install [ROS 2 Humble](https://docs.ros.org/en/humble/index.html) - -1. Install [Gazebo Garden](https://gazebosim.org/docs/garden) - -1. Install necessary tools - - `sudo apt install python3-vcstool python3-colcon-common-extensions git wget` - -### Usage - -1. Create a workspace, for example: - - ``` - mkdir -p ~/ros2_ws/src - cd ~/ros2_ws/src - ``` - -1. Clone the project: - - ``` - TBC - ``` - -1. Set the Gazebo version to Garden: - - ``` - export GZ_VERSION=garden - ``` - -1. Install ROS dependencies - - ``` - sudo rosdep init - rosdep update - rosdep install --from-paths src --ignore-src -r -y -i - ``` - -1. Build and install - - ``` - cd ~/ros2_ws - colcon build --cmake-args -DBUILD_TESTING=ON - ``` - -### Run - -1. Source the workspace - - `. ~/ros2_ws/install/setup.sh` - -1. Launch the simulation - - `ros2 launch ardupilot_gz_bringup bringup_iris.launch.py` - -1. Launch the a GCS - - `mavproxy.py --console --map` - -1. Inspect topics - - ```bash - $ ros2 topic list - /ROS2_BatteryState0 - /ROS2_NavSatFix0 - /ROS2_Time - /clicked_point - /clock - /goal_pose - /initialpose - /iris/odometry - /joint_states - /parameter_events - /robot_description - /rosout - /tf - /tf_static - ``` - - -## Notes - -1. Additional dependency - - `ros_gz` has a dependency on `gps_msgs` included in - - ```bash - git clone https://github.com/swri-robotics/gps_umd.git -b ros2-devel - ``` - - Add `COLCON_IGNORE` to `gpsd_client` as this package is not required and - will not build on macOS. - -1. sdformat_urdf - - On macOS the `robot_state_publisher` node cannot load the - `sdformat_urdf_plugin` plugin unless the - suffix is changed: - - ```bash - cd ./install/sdformat_urdf/lib - ln -s libsdformat_urdf_plugin.so libsdformat_urdf_plugin.dylib - ``` - -1. Model URIs - - The `` element must use the `package` prefix for resource to be located - by RViz. diff --git a/ardupilot_gz/ardupilot_gz_application/.flake8 b/ardupilot_gz_application/.flake8 similarity index 100% rename from ardupilot_gz/ardupilot_gz_application/.flake8 rename to ardupilot_gz_application/.flake8 diff --git a/ardupilot_gz/ardupilot_gz_application/CMakeLists.txt b/ardupilot_gz_application/CMakeLists.txt similarity index 100% rename from ardupilot_gz/ardupilot_gz_application/CMakeLists.txt rename to ardupilot_gz_application/CMakeLists.txt diff --git a/ardupilot_gz/ardupilot_gz_application/package.xml b/ardupilot_gz_application/package.xml similarity index 100% rename from ardupilot_gz/ardupilot_gz_application/package.xml rename to ardupilot_gz_application/package.xml diff --git a/ardupilot_gz/ardupilot_gz_bringup/.flake8 b/ardupilot_gz_bringup/.flake8 similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/.flake8 rename to ardupilot_gz_bringup/.flake8 diff --git a/ardupilot_gz/ardupilot_gz_bringup/CMakeLists.txt b/ardupilot_gz_bringup/CMakeLists.txt similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/CMakeLists.txt rename to ardupilot_gz_bringup/CMakeLists.txt diff --git a/ardupilot_gz/ardupilot_gz_bringup/config/diff_drive.rviz b/ardupilot_gz_bringup/config/diff_drive.rviz similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/config/diff_drive.rviz rename to ardupilot_gz_bringup/config/diff_drive.rviz diff --git a/ardupilot_gz/ardupilot_gz_bringup/config/diff_drive_bridge.yaml b/ardupilot_gz_bringup/config/diff_drive_bridge.yaml similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/config/diff_drive_bridge.yaml rename to ardupilot_gz_bringup/config/diff_drive_bridge.yaml diff --git a/ardupilot_gz/ardupilot_gz_bringup/config/iris.rviz b/ardupilot_gz_bringup/config/iris.rviz similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/config/iris.rviz rename to ardupilot_gz_bringup/config/iris.rviz diff --git a/ardupilot_gz/ardupilot_gz_bringup/config/iris_bridge.yaml b/ardupilot_gz_bringup/config/iris_bridge.yaml similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/config/iris_bridge.yaml rename to ardupilot_gz_bringup/config/iris_bridge.yaml diff --git a/ardupilot_gz/ardupilot_gz_bringup/launch/bringup_iris.launch.py b/ardupilot_gz_bringup/launch/bringup_iris.launch.py similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/launch/bringup_iris.launch.py rename to ardupilot_gz_bringup/launch/bringup_iris.launch.py diff --git a/ardupilot_gz/ardupilot_gz_bringup/launch/diff_drive.launch.py b/ardupilot_gz_bringup/launch/diff_drive.launch.py similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/launch/diff_drive.launch.py rename to ardupilot_gz_bringup/launch/diff_drive.launch.py diff --git a/ardupilot_gz/ardupilot_gz_bringup/launch/iris.launch.py b/ardupilot_gz_bringup/launch/iris.launch.py similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/launch/iris.launch.py rename to ardupilot_gz_bringup/launch/iris.launch.py diff --git a/ardupilot_gz/ardupilot_gz_bringup/package.xml b/ardupilot_gz_bringup/package.xml similarity index 100% rename from ardupilot_gz/ardupilot_gz_bringup/package.xml rename to ardupilot_gz_bringup/package.xml diff --git a/ardupilot_gz/ardupilot_gz_description/.flake8 b/ardupilot_gz_description/.flake8 similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/.flake8 rename to ardupilot_gz_description/.flake8 diff --git a/ardupilot_gz/ardupilot_gz_description/CMakeLists.txt b/ardupilot_gz_description/CMakeLists.txt similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/CMakeLists.txt rename to ardupilot_gz_description/CMakeLists.txt diff --git a/ardupilot_gz/ardupilot_gz_description/hooks/ardupilot_gz_description.dsv.in b/ardupilot_gz_description/hooks/ardupilot_gz_description.dsv.in similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/hooks/ardupilot_gz_description.dsv.in rename to ardupilot_gz_description/hooks/ardupilot_gz_description.dsv.in diff --git a/ardupilot_gz/ardupilot_gz_description/hooks/ardupilot_gz_description.sh.in b/ardupilot_gz_description/hooks/ardupilot_gz_description.sh.in similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/hooks/ardupilot_gz_description.sh.in rename to ardupilot_gz_description/hooks/ardupilot_gz_description.sh.in diff --git a/ardupilot_gz/ardupilot_gz_description/models/diff_drive/model.config b/ardupilot_gz_description/models/diff_drive/model.config similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/models/diff_drive/model.config rename to ardupilot_gz_description/models/diff_drive/model.config diff --git a/ardupilot_gz/ardupilot_gz_description/models/diff_drive/model.sdf b/ardupilot_gz_description/models/diff_drive/model.sdf similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/models/diff_drive/model.sdf rename to ardupilot_gz_description/models/diff_drive/model.sdf diff --git a/ardupilot_gz/ardupilot_gz_description/package.xml b/ardupilot_gz_description/package.xml similarity index 100% rename from ardupilot_gz/ardupilot_gz_description/package.xml rename to ardupilot_gz_description/package.xml diff --git a/ardupilot_gz/ardupilot_gz_gazebo/.flake8 b/ardupilot_gz_gazebo/.flake8 similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/.flake8 rename to ardupilot_gz_gazebo/.flake8 diff --git a/ardupilot_gz/ardupilot_gz_gazebo/CMakeLists.txt b/ardupilot_gz_gazebo/CMakeLists.txt similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/CMakeLists.txt rename to ardupilot_gz_gazebo/CMakeLists.txt diff --git a/ardupilot_gz/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.dsv.in b/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.dsv.in similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.dsv.in rename to ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.dsv.in diff --git a/ardupilot_gz/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.sh.in b/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.sh.in similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.sh.in rename to ardupilot_gz_gazebo/hooks/ardupilot_gz_gazebo.sh.in diff --git a/ardupilot_gz/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/BasicSystem.hh b/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/BasicSystem.hh similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/BasicSystem.hh rename to ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/BasicSystem.hh diff --git a/ardupilot_gz/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/FullSystem.hh b/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/FullSystem.hh similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/FullSystem.hh rename to ardupilot_gz_gazebo/include/ardupilot_gz_gazebo/FullSystem.hh diff --git a/ardupilot_gz/ardupilot_gz_gazebo/package.xml b/ardupilot_gz_gazebo/package.xml similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/package.xml rename to ardupilot_gz_gazebo/package.xml diff --git a/ardupilot_gz/ardupilot_gz_gazebo/src/BasicSystem.cc b/ardupilot_gz_gazebo/src/BasicSystem.cc similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/src/BasicSystem.cc rename to ardupilot_gz_gazebo/src/BasicSystem.cc diff --git a/ardupilot_gz/ardupilot_gz_gazebo/src/FullSystem.cc b/ardupilot_gz_gazebo/src/FullSystem.cc similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/src/FullSystem.cc rename to ardupilot_gz_gazebo/src/FullSystem.cc diff --git a/ardupilot_gz/ardupilot_gz_gazebo/worlds/diff_drive.sdf b/ardupilot_gz_gazebo/worlds/diff_drive.sdf similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/worlds/diff_drive.sdf rename to ardupilot_gz_gazebo/worlds/diff_drive.sdf diff --git a/ardupilot_gz/ardupilot_gz_gazebo/worlds/iris.sdf b/ardupilot_gz_gazebo/worlds/iris.sdf similarity index 100% rename from ardupilot_gz/ardupilot_gz_gazebo/worlds/iris.sdf rename to ardupilot_gz_gazebo/worlds/iris.sdf