Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
types_or: [c++, c]

- repo: https://github.com/BlankSpruce/gersemi
rev: 0.13.5
rev: 0.21.0
hooks:
- id: gersemi

Expand Down
3 changes: 3 additions & 0 deletions libreach/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog for package libreach

## 0.0.1 (2025-07-22)
26 changes: 13 additions & 13 deletions libreach/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ target_sources(
src/udp_driver.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/device_id.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/mode.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/packet_id.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/packet.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/serial_client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/serial_driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/udp_client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/udp_driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/version.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/device_id.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/mode.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/packet_id.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/packet.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/serial_client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/serial_driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/udp_client.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/udp_driver.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/libreach/version.hpp
)

target_compile_features(libreach PUBLIC cxx_std_23)
Expand Down
3 changes: 3 additions & 0 deletions reach_bringup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog for package reach_bringup

## 0.0.1 (2025-07-22)
7 changes: 7 additions & 0 deletions reach_bringup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ each of the Reach Robotics devices.
## Reach Alpha 5 Launch

* alpha_5.launch.yaml
* alpha_5_minimal.launch.yaml

### Examples

Expand All @@ -21,6 +22,12 @@ each of the Reach Robotics devices.
ros2 launch reach_bringup alpha_5.launch.yaml use_sim:=true
```

* For minimal installations without Gazebo or RViz, launch the system with

```bash
ros2 launch reach_bringup alpha_5_minimal.launch.yaml
```

## Micro IP Camera Launch

* micro_ip.launch.py
Expand Down
57 changes: 57 additions & 0 deletions reach_bringup/launch/alpha_5_minimal.launch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
launch:
- arg:
name: prefix
default: ""
description: "The prefix used in the robot description. This should be provided in the form `<prefix>/`."

- arg:
name: serial_port
default: /dev/ttyUSB0
description: "The serial port used to communicate with the robot, e.g., `/dev/ttyUSB0`."

- arg:
name: use_mock_hardware
default: "true"
description: "Use the mock hardware interface."

- arg:
name: parent_link
default: world
description: "The parent link of the robot. This is useful for affixing the Alpha 5 to another robot."

- arg:
name: description_file
default: $(find-pkg-share reach_description)/description/alpha_5/standard_jaws/alpha_5.config.xacro
description: "The robot description file."

- arg:
name: controllers_file
default: $(find-pkg-share reach_description)/config/alpha_5/controllers.yaml
description: "The ros2_control controllers configuration file."

- arg:
name: robot_description
default: $(command 'xacro $(var description_file) serial_port:=$(var serial_port) use_sim:=false prefix:=$(var prefix) use_mock_hardware:=$(var use_mock_hardware) parent:=$(var parent_link) controllers_file:=$(var controllers_file)')
description: "The robot description."

- arg:
name: robot_controller
default: forward_position_controller
description: "The robot controller to use."

- arg:
name: tcp_controller
default: tcp_position_controller
description: "The TCP controller to use."

- include:
file: $(find-pkg-share reach_bringup)/launch/minimal.launch.py
arg:
- name: controllers_file
value: $(var controllers_file)
- name: robot_controller
value: $(var robot_controller)
- name: tcp_controller
value: $(var tcp_controller)
- name: robot_description
value: $(var robot_description)
88 changes: 88 additions & 0 deletions reach_bringup/launch/minimal.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
from launch import LaunchDescription
from launch.actions import (
DeclareLaunchArgument,
RegisterEventHandler,
)
from launch.event_handlers import OnProcessExit, OnProcessStart
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node


def generate_launch_description() -> LaunchDescription:
args = [
DeclareLaunchArgument("controllers_file"),
DeclareLaunchArgument("robot_controller"),
DeclareLaunchArgument("tcp_controller"),
DeclareLaunchArgument("robot_description"),
]

robot_state_publisher = Node(
package="robot_state_publisher",
executable="robot_state_publisher",
output="both",
parameters=[{"robot_description": LaunchConfiguration("robot_description")}],
)

# ros2_control launch
controller_manager = Node(
package="controller_manager",
executable="ros2_control_node",
output="both",
parameters=[LaunchConfiguration("controllers_file")],
remappings=[
("/controller_manager/robot_description", "/robot_description"),
],
)

joint_state_broadcaster_spawner = Node(
package="controller_manager",
executable="spawner",
arguments=["joint_state_broadcaster"],
)

robot_controller_spawner = Node(
package="controller_manager",
executable="spawner",
arguments=[LaunchConfiguration("robot_controller")],
)

tcp_controller_spawner = Node(
package="controller_manager",
executable="spawner",
arguments=[LaunchConfiguration("tcp_controller")],
)

# Delay joint_state_broadcaster after controller_manager
# This will not work if the controller_manager is not started (i.e., in simulation)
delay_jsb_spawner_after_controller_manager = RegisterEventHandler(
event_handler=OnProcessStart(
target_action=controller_manager,
on_start=[joint_state_broadcaster_spawner],
),
)

# Delay start of robot_controller after `joint_state_broadcaster`
delay_robot_controller_spawners_after_jsb_spawner = RegisterEventHandler(
event_handler=OnProcessExit(
target_action=joint_state_broadcaster_spawner,
on_exit=[robot_controller_spawner],
),
)

# Delay start of tcp_controller after `joint_state_broadcaster`
delay_tcp_controller_spawners_after_jsb_spawner = RegisterEventHandler(
event_handler=OnProcessExit(
target_action=joint_state_broadcaster_spawner,
on_exit=[tcp_controller_spawner],
),
)

nodes = [
controller_manager,
robot_state_publisher,
delay_jsb_spawner_after_controller_manager,
delay_robot_controller_spawners_after_jsb_spawner,
delay_tcp_controller_spawners_after_jsb_spawner,
]

return LaunchDescription(args + nodes)
6 changes: 6 additions & 0 deletions reach_controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog for package reach_controllers

## 0.0.1 (2025-07-22)

- Replaces deprecated `unlockAndPublish` and `trylock` with `try_publish`
- Replaces deprecated `ament_target_dependencies` with `target_link_libraries`
47 changes: 29 additions & 18 deletions reach_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ endif()

include(GNUInstallDirs)

set(THIS_PACKAGE_INCLUDE_DEPENDS
controller_interface
hardware_interface
pluginlib
generate_parameter_library
realtime_tools
reach_msgs
)

find_package(controller_interface REQUIRED)
find_package(hardware_interface REQUIRED)
find_package(pluginlib REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(realtime_tools REQUIRED)
find_package(reach_msgs REQUIRED)
find_package(ament_cmake REQUIRED)
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()

generate_parameter_library(impedance_controller_parameters
src/impedance_controller_parameters.yaml
Expand All @@ -31,13 +25,23 @@ target_sources(
PRIVATE src/impedance_controller.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/reach_controllers/impedance_controller.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/reach_controllers/impedance_controller.hpp
)
target_compile_features(reach_controllers PUBLIC cxx_std_20)
target_link_libraries(reach_controllers PUBLIC impedance_controller_parameters)
ament_target_dependencies(reach_controllers PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_link_libraries(
reach_controllers
PUBLIC
impedance_controller_parameters
controller_interface::controller_interface
hardware_interface::hardware_interface
hardware_interface::mock_components
pluginlib::pluginlib
realtime_tools::realtime_tools
realtime_tools::thread_priority
${reach_msgs_TARGETS}
)

pluginlib_export_plugin_description_file(controller_interface reach_controllers.xml)

Expand All @@ -51,6 +55,13 @@ install(
)

ament_export_targets(export_reach_controllers HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_export_dependencies(
"controller_interface"
"hardware_interface"
"pluginlib"
"generate_parameter_library"
"realtime_tools"
"reach_msgs"
)

ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ class ImpedanceController : public controller_interface::ChainableControllerInte
realtime_tools::RealtimeBuffer<reach_msgs::msg::MultiDOFImpedanceCommand> reference_;
std::shared_ptr<rclcpp::Subscription<reach_msgs::msg::MultiDOFImpedanceCommand>> reference_sub_;

std::shared_ptr<rclcpp::Publisher<reach_msgs::msg::MultiDOFImpedanceStateStamped>> controller_state_pub_;
std::unique_ptr<realtime_tools::RealtimePublisher<reach_msgs::msg::MultiDOFImpedanceStateStamped>>
rt_controller_state_pub_;
using ControllerState = reach_msgs::msg::MultiDOFImpedanceStateStamped;
std::shared_ptr<rclcpp::Publisher<ControllerState>> controller_state_pub_;
std::unique_ptr<realtime_tools::RealtimePublisher<ControllerState>> rt_controller_state_pub_;
ControllerState controller_state_;

std::shared_ptr<impedance_controller::ParamListener> param_listener_;
impedance_controller::Params params_;
Expand Down
Loading