Skip to content

Commit

Permalink
Ex10: use gpio_command_controller (#627) (#713)
Browse files Browse the repository at this point in the history
* Remove controller and use upstream one

* Fix error messages

* Fix last demo section

* Use fork for ros2_controllers

* Fix CMakeLists and deps

* Use upstream ros2_controllers

* Update docs with latest changes of controller

* Update with new message type

* Switch to master branch of ros2_control

* Remove old controller from pluginlib xml

* Use released ros2_controllers

Co-authored-by: Christoph Fröhlich <[email protected]>
  • Loading branch information
mergify[bot] and christophfroehlich authored Feb 1, 2025
1 parent ab5a910 commit 7a5b290
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 283 deletions.
9 changes: 0 additions & 9 deletions example_10/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS
pluginlib
rclcpp
rclcpp_lifecycle
controller_interface
)

# find dependencies
Expand All @@ -31,12 +30,10 @@ add_library(
ros2_control_demo_example_10
SHARED
hardware/rrbot.cpp
controllers/gpio_controller.cpp
)
target_compile_features(ros2_control_demo_example_10 PUBLIC cxx_std_17)
target_include_directories(ros2_control_demo_example_10 PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/hardware/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/controllers/include>
$<INSTALL_INTERFACE:include/ros2_control_demo_example_10>
)
ament_target_dependencies(
Expand All @@ -46,18 +43,12 @@ ament_target_dependencies(

# Export hardware plugins
pluginlib_export_plugin_description_file(hardware_interface ros2_control_demo_example_10.xml)
# Export controllers
pluginlib_export_plugin_description_file(controller_interface ros2_control_demo_example_10.xml)

# INSTALL
install(
DIRECTORY hardware/include/
DESTINATION include/ros2_control_demo_example_10
)
install(
DIRECTORY controllers/include/
DESTINATION include/ros2_control_demo_example_10
)
install(
DIRECTORY description/launch description/ros2_control description/urdf
DESTINATION share/ros2_control_demo_example_10
Expand Down
20 changes: 11 additions & 9 deletions example_10/bringup/config/rrbot_controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ controller_manager:
type: forward_command_controller/ForwardCommandController

gpio_controller:
type: ros2_control_demo_example_10/GPIOController
type: gpio_controllers/GpioCommandController


forward_position_controller:
Expand All @@ -21,11 +21,13 @@ forward_position_controller:

gpio_controller:
ros__parameters:
inputs:
- flange_analog_IOs/analog_output1
- flange_analog_IOs/analog_input1
- flange_analog_IOs/analog_input2
- flange_vacuum/vacuum
outputs:
- flange_analog_IOs/analog_output1
- flange_vacuum/vacuum
gpios:
- flange_analog_IOs
- flange_vacuum
command_interfaces:
flange_analog_IOs:
- interfaces:
- analog_output1
flange_vacuum:
- interfaces:
- vacuum
151 changes: 0 additions & 151 deletions example_10/controllers/gpio_controller.cpp

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7a5b290

Please sign in to comment.