-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refreshed the examples for the new system
- Loading branch information
Showing
98 changed files
with
4,527 additions
and
589 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: ros_build_test | ||
|
||
on: | ||
|
||
push: | ||
branches: [ master ] | ||
|
||
paths-ignore: | ||
- '**/README.md' | ||
|
||
pull_request: | ||
branches: [ master ] | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build: | ||
uses: ctu-mrs/ci_scripts/.github/workflows/ros_build_test.yml@master | ||
secrets: | ||
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
.gitman | ||
|
||
*.swp | ||
*.swo |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
# Example packages | ||
# MRS Core Examples | ||
|
||
| Build status | [![Build Status](https://github.com/ctu-mrs/example_ros_packages/workflows/Melodic/badge.svg)](https://github.com/ctu-mrs/example_ros_packages/actions) | [![Build Status](https://github.com/ctu-mrs/example_ros_packages/workflows/Noetic/badge.svg)](https://github.com/ctu-mrs/example_ros_packages/actions) | | ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
|
||
This repository includes other ROS packages, demonstrating some basic functionality to get you started. | ||
You can test these in simulation (see our [simulation tutorial](https://ctu-mrs.github.io/docs/simulation/howto.html)). | ||
Follow our **[How to manager ROS workspaces](https://ctu-mrs.github.io/docs/system/managing_ros_workspaces.html)** guide to learn **how to set up** a custom workspace. | ||
This repository includes Core ROS examples for the [MRS UAV System](https://github.com/ctu-mrs/mrs_uav_system). | ||
|
||
## Packages | ||
|
||
* [example_ros_uav_simple](https://github.com/ctu-mrs/example_ros_uav_simple) - Example of a simple nodelet | ||
* [example_ros_uav](https://github.com/ctu-mrs/example_ros_uav) - Example of UAV control | ||
* [example_ros_vision](https://github.com/ctu-mrs/example_ros_vision) - Example of UAV computer vision | ||
* [example_ros_pluginlib](https://github.com/ctu-mrs/example_ros_pluginlib) - Example of ROS Pluginlib, similar to how it is used in the [ControlManager](https://github.com/ctu-mrs/mrs_uav_managers) | ||
* [waypoint_flier_simple](./waypoint_flier_simple) - Minimalistic C++ Nodelet with "_vanilla_" ROS features | ||
* [waypoint_flier](./waypoint_flier) - Full C++ Nodelet with "_MRS_" libraries and wrappers | ||
* [controller_plugin](./controller_plugin) - Example of Controller plugin for the [ControlManager](https://github.com/ctu-mrs/mrs_uav_managers) | ||
* [tracker_plugin](./tracker_plugin) - Example of Tracker plugin for the [ControlManager](https://github.com/ctu-mrs/mrs_uav_managers) | ||
* [pluginlib_example](./pluginlib_example) - Example of ROS Pluginlib, similar to how it is used in the [ControlManager](https://github.com/ctu-mrs/mrs_uav_managers) | ||
|
||
# Disclaimer | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
cmake_minimum_required(VERSION 3.1.2) | ||
project(example_controller_plugin) | ||
|
||
set(CATKIN_DEPENDENCIES | ||
cmake_modules | ||
roscpp | ||
rospy | ||
pluginlib | ||
geometry_msgs | ||
dynamic_reconfigure | ||
mrs_uav_managers | ||
mrs_msgs | ||
mrs_lib | ||
) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
${CATKIN_DEPENDENCIES} | ||
) | ||
|
||
generate_dynamic_reconfigure_options( | ||
cfg/example_controller.cfg | ||
) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") | ||
|
||
find_package(Eigen3 REQUIRED) | ||
set(Eigen_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) | ||
set(Eigen_LIBRARIES ${Eigen_LIBRARIES}) | ||
|
||
set(LIBRARIES | ||
ExampleController | ||
) | ||
|
||
catkin_package( | ||
INCLUDE_DIRS include | ||
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES} | ||
LIBRARIES ${LIBRARIES} | ||
DEPENDS Eigen | ||
) | ||
|
||
include_directories( | ||
include | ||
${catkin_INCLUDE_DIRS} | ||
${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake | ||
) | ||
|
||
# Example Controller | ||
|
||
add_library(ExampleController | ||
src/example_controller.cpp | ||
) | ||
|
||
add_dependencies(ExampleController | ||
${${PROJECT_NAME}_EXPORTED_TARGETS} | ||
${catkin_EXPORTED_TARGETS} | ||
${PROJECT_NAME}_gencfg | ||
) | ||
|
||
target_link_libraries(ExampleController | ||
${catkin_LIBRARIES} | ||
) | ||
|
||
## -------------------------------------------------------------- | ||
## | Install | | ||
## -------------------------------------------------------------- | ||
|
||
install(TARGETS ${LIBRARIES} | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} | ||
) | ||
|
||
install(DIRECTORY config | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
) | ||
|
||
install(FILES plugins.xml | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# example_controller_plugin | ||
|
||
Example controller plugin for the MRS Control Manager. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
PACKAGE = "example_controller_plugin" | ||
|
||
import roslib; | ||
roslib.load_manifest(PACKAGE) | ||
|
||
from dynamic_reconfigure.parameter_generator_catkin import * | ||
|
||
gen = ParameterGenerator() | ||
|
||
orientation = gen.add_group("Desired orientation"); | ||
|
||
orientation.add("roll", double_t, 0, "Desired roll", 0.0, -3.14, 3.14) | ||
orientation.add("pitch", double_t, 0, "Desired pitch", 0.0, -3.14, 3.14) | ||
orientation.add("yaw", double_t, 0, "Desired pitch", 0.0, -3.14, 3.14) | ||
|
||
force = gen.add_group("Desired force relative to hover"); | ||
|
||
force.add("force", double_t, 0, "Desired force", 0.0, -10.0, 10.0) | ||
|
||
exit(gen.generate(PACKAGE, "ExampleController", "example_controller")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
desired_roll: 0.03 # [rad] | ||
desired_pitch: 0.02 # [rad] | ||
desired_yaw: 0.1 # [rad] | ||
desired_thrust_force: 0.2 # [N], additional to gravity compensation |
Oops, something went wrong.