Skip to content

Commit

Permalink
Merge branch 'master' into 133_pr_rebase_again
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Feb 17, 2024
2 parents 79f8249 + edb011a commit afe4a2d
Show file tree
Hide file tree
Showing 39 changed files with 1,959 additions and 179 deletions.
33 changes: 0 additions & 33 deletions .github/reviewer-lottery.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
python-version: '3.10'
- name: Install system hooks
run: sudo apt install -qq clang-format-14 cppcheck
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --hook-stage manual
1 change: 1 addition & 0 deletions .github/workflows/ci-ros-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
ros2_control_demo_example_8
ros2_control_demo_example_9
ros2_control_demo_example_10
ros2_control_demo_example_11
ros2_control_demo_example_12
ros2_control_demo_example_13
ros2_control_demo_example_14
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/humble-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ on:

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
ROS_REPO: [main, testing]
with:
ros_distro: humble
upstream_workspace: ros2_control_demos-not-released.humble.repos
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: humble
12 changes: 9 additions & 3 deletions .github/workflows/humble-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ on:

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
ROS_REPO: [main, testing]
with:
ros_distro: humble
upstream_workspace: ros2_control_demos.humble.repos
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: humble
14 changes: 10 additions & 4 deletions .github/workflows/iron-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ on:

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [iron]
ROS_REPO: [main, testing]
with:
ros_distro: iron
upstream_workspace: ros2_control_demos-not-released.iron.repos
ref_for_scheduled_build: master
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: iron
14 changes: 10 additions & 4 deletions .github/workflows/iron-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ on:

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [iron]
ROS_REPO: [main, testing]
with:
ros_distro: iron
upstream_workspace: ros2_control_demos.iron.repos
ref_for_scheduled_build: master
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: iron
106 changes: 0 additions & 106 deletions .github/workflows/reusable-industrial-ci-with-cache.yml

This file was deleted.

12 changes: 4 additions & 8 deletions .github/workflows/reviewer_lottery.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: Reviewer lottery
# pull_request_target takes the same events as pull_request,
# but it runs on the base branch instead of the head branch.
on:
pull_request_target:
types: [opened, ready_for_review, reopened]

jobs:
reviewer-lottery:
runs-on: ubuntu-latest
if: ${{ ! contains(fromJSON('["dependabot[bot]", "mergify[bot]"]'), github.actor) }}
steps:
- uses: actions/checkout@v4
- uses: uesteibar/reviewer-lottery@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assign_reviewers:
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-reviewer-lottery.yml@master
12 changes: 9 additions & 3 deletions .github/workflows/rolling-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ on:

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling]
ROS_REPO: [main, testing]
with:
ros_distro: rolling
upstream_workspace: ros2_control_demos-not-released.rolling.repos
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: master
12 changes: 9 additions & 3 deletions .github/workflows/rolling-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ on:

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling]
ROS_REPO: [main, testing]
with:
ros_distro: rolling
upstream_workspace: ros2_control_demos.rolling.repos
ros_distro: ${{ matrix.ROS_DISTRO }}
ros_repo: ${{ matrix.ROS_REPO }}
upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos
ref_for_scheduled_build: master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The following examples are part of this demo repository:

*RRBot* with GPIO interfaces.

* Example 11: "Car-like robot using steering controller library (tba.)"
* Example 11: ["Car-like robot using steering controller library"](example_11)

* Example 12: ["Controller chaining"](example_12)

Expand Down
4 changes: 3 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ Example 9: "Gazebo Classic"
Example 10: "GPIO interfaces"
Industrial robot with GPIO interfaces

Example 11: "Car-like robot using steering controller library (tba.)"
Example 11: "CarlikeBot"
*CarlikeBot* with a bicycle steering controller

Example 12: "Controller chaining"
The example shows a simple chainable controller and its integration to form a controller chain to control the joints of *RRBot*.
Expand Down Expand Up @@ -271,6 +272,7 @@ Examples
Example 8: Using transmissions <../example_8/doc/userdoc.rst>
Example 9: Gazebo classic <../example_9/doc/userdoc.rst>
Example 10: Industrial robot with GPIO interfaces <../example_10/doc/userdoc.rst>
Example 11: CarlikeBot <../example_11/doc/userdoc.rst>
Example 12: Controller chaining <../example_12/doc/userdoc.rst>
Example 13: Multiple robots <../example_13/doc/userdoc.rst>
Example 14: Modular robots with actuators not providing states <../example_14/doc/userdoc.rst>
76 changes: 76 additions & 0 deletions example_11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
cmake_minimum_required(VERSION 3.16)
project(ros2_control_demo_example_11 LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra)
endif()

# find dependencies
set(THIS_PACKAGE_INCLUDE_DEPENDS
hardware_interface
pluginlib
rclcpp
rclcpp_lifecycle
)

# find dependencies
find_package(ament_cmake REQUIRED)
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()


## COMPILE
add_library(
ros2_control_demo_example_11
SHARED
hardware/carlikebot_system.cpp
)
target_compile_features(ros2_control_demo_example_11 PUBLIC cxx_std_17)
target_include_directories(ros2_control_demo_example_11 PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/hardware/include>
$<INSTALL_INTERFACE:include/ros2_control_demo_example_11>
)
ament_target_dependencies(
ros2_control_demo_example_11 PUBLIC
${THIS_PACKAGE_INCLUDE_DEPENDS}
)

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(${PROJECT_NAME} PRIVATE "ROS2_CONTROL_DEMO_EXAMPLE_11_BUILDING_DLL")

# Export hardware plugins
pluginlib_export_plugin_description_file(hardware_interface ros2_control_demo_example_11.xml)

# INSTALL
install(
DIRECTORY hardware/include/
DESTINATION include/ros2_control_demo_example_11
)
install(
DIRECTORY description/launch description/ros2_control description/urdf
DESTINATION share/ros2_control_demo_example_11
)
install(
DIRECTORY bringup/launch bringup/config
DESTINATION share/ros2_control_demo_example_11
)
install(TARGETS ros2_control_demo_example_11
EXPORT export_ros2_control_demo_example_11
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

if(BUILD_TESTING)
find_package(ament_cmake_pytest REQUIRED)

ament_add_pytest_test(example_11_urdf_xacro test/test_urdf_xacro.py)
ament_add_pytest_test(view_example_11_launch test/test_view_robot_launch.py)
endif()

## EXPORTS
ament_export_targets(export_ros2_control_demo_example_11 HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()
6 changes: 6 additions & 0 deletions example_11/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ros2_control_demo_example_11

*CarlikeBot*, or ''Carlike Mobile Robot'', is a simple mobile base with bicycle drive.
The robot has two wheels in the front that steer the robot and two wheels in the back that power the robot forward and backwards. However, since each pair of wheels (steering and traction) are controlled by one interface, a bicycle steering model is used.

Find the documentation in [doc/userdoc.rst](doc/userdoc.rst) or on [control.ros.org](https://control.ros.org/master/doc/ros2_control_demos/example_11/doc/userdoc.html).
Loading

0 comments on commit afe4a2d

Please sign in to comment.