-
Notifications
You must be signed in to change notification settings - Fork 0
New pkg for IMU example, include rmw_zenoh for Dockerfile #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6b28652
e08bd91
e9e6d25
6e96975
1c155b6
a1229b7
8ff7207
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| <buildtool_depend>ament_cmake</buildtool_depend> | ||
| <exec_depend>dynamixel_hardware_interface_example</exec_depend> | ||
| <exec_depend>dynamixel_hardware_interface_example_1</exec_depend> | ||
| <exec_depend>dynamixel_hardware_interface_example_2</exec_depend> | ||
|
||
| <export> | ||
| <build_type>ament_cmake</build_type> | ||
| </export> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| repositories: | ||
| utils/dynamixel_hardware_interface: | ||
| type: git | ||
| url: https://github.com/ROBOTIS-GIT/dynamixel_hardware_interface.git | ||
| version: main |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |||||
|
|
||||||
| setup( | ||||||
| name=package_name, | ||||||
| version='0.0.3', | ||||||
| version='0.0.4', | ||||||
|
||||||
| version='0.0.4', | |
| version='0.0.3', |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |||||
|
|
||||||
| setup( | ||||||
| name=package_name, | ||||||
| version='0.0.3', | ||||||
| version='0.0.4', | ||||||
|
||||||
| version='0.0.4', | |
| version='0.0.3', |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Changelog for package dynamixel_hardware_interface_example_2 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| 0.0.4 (2025-12-15) | ||
| ------------------ | ||
| * Added example package for using the dynamixel_hardware_interface with imu sensor | ||
| * Contributors: Woojin Wie |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Dynamixel Hardware Interface Example 2 (IMU ros2_control) | ||
|
|
||
| This example shows a single `ros2_control` system that uses `dynamixel_hardware_interface` to read an IMU (ID 1) and publish its data through an `imu_sensor_broadcaster`. The robot description is built from `config/dynamixel_system.urdf.xacro`, which wraps the ros2_control configuration defined in `config/dynamixel_system.ros2_control.xacro`. | ||
|
|
||
| ## Usage | ||
|
|
||
| Build and source your workspace, then launch: | ||
|
|
||
| ```bash | ||
| ros2 launch dynamixel_hardware_interface_example_2 hardware.launch.py \ | ||
| port_name:=/dev/ttyUSB0 \ | ||
| baud_rate:=4000000 | ||
| ``` | ||
|
|
||
| ### Launch arguments | ||
| - `port_name` (default `/dev/ttyUSB0`): Serial port connected to the Dynamixel IMU. | ||
| - `baud_rate` (default `4000000`): Baud rate for the port. | ||
| - `description_file` (default `dynamixel_system.urdf.xacro`): Xacro to generate the robot description. | ||
| - `prefix` (default empty): Optional prefix for joint/frame names. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| <?xml version="1.0"?> | ||
| <robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
| <xacro:macro name="dynamixel_system_ros2_control" params="name port_name baud_rate"> | ||
| <ros2_control name="${name}" type="system"> | ||
| <hardware> | ||
| <plugin>dynamixel_hardware_interface/DynamixelHardware</plugin> | ||
| <param name="port_name">${port_name}</param> | ||
| <param name="baud_rate">${baud_rate}</param> | ||
| <param name="dynamixel_model_folder">/param/dxl_model</param> | ||
| <param name="number_of_joints">0</param> | ||
| <param name="number_of_transmissions">0</param> | ||
| <param name="disable_torque_at_init">true</param> | ||
| <param name="error_timeout_ms">1000</param> | ||
| <param name="dynamixel_state_pub_msg_name">dynamixel_hardware_interface/dxl_state</param> | ||
| <param name="get_dynamixel_data_srv_name">dynamixel_hardware_interface/get_dxl_data</param> | ||
| <param name="set_dynamixel_data_srv_name">dynamixel_hardware_interface/set_dxl_data</param> | ||
| <param name="reboot_dxl_srv_name">dynamixel_hardware_interface/reboot_dxl</param> | ||
| <param name="set_dxl_torque_srv_name">dynamixel_hardware_interface/set_dxl_torque</param> | ||
| </hardware> | ||
|
|
||
| <sensor name="imu"> | ||
| <state_interface name="linear_acceleration.x"/> | ||
| <state_interface name="linear_acceleration.y"/> | ||
| <state_interface name="linear_acceleration.z"/> | ||
| <state_interface name="angular_velocity.x"/> | ||
| <state_interface name="angular_velocity.y"/> | ||
| <state_interface name="angular_velocity.z"/> | ||
| <state_interface name="orientation.w"/> | ||
| <state_interface name="orientation.x"/> | ||
| <state_interface name="orientation.y"/> | ||
| <state_interface name="orientation.z"/> | ||
| </sensor> | ||
|
|
||
| <gpio name="imu"> | ||
| <param name="type">sensor</param> | ||
| <param name="ID">1</param> | ||
| <state_interface name="linear_acceleration.x"/> | ||
| <state_interface name="linear_acceleration.y"/> | ||
| <state_interface name="linear_acceleration.z"/> | ||
| <state_interface name="angular_velocity.x"/> | ||
| <state_interface name="angular_velocity.y"/> | ||
| <state_interface name="angular_velocity.z"/> | ||
| <state_interface name="orientation.w"/> | ||
| <state_interface name="orientation.x"/> | ||
| <state_interface name="orientation.y"/> | ||
| <state_interface name="orientation.z"/> | ||
| <param name="Return Delay Time">0</param> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parameter name |
||
| </gpio> | ||
| </ros2_control> | ||
| </xacro:macro> | ||
| </robot> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0"?> | ||
| <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="dynamixel_system"> | ||
| <xacro:arg name="prefix" default="" /> | ||
| <xacro:arg name="baud_rate" default="4000000" /> | ||
| <xacro:arg name="port_name" default="/dev/ttyUSB0" /> | ||
| <xacro:include filename="dynamixel_system.ros2_control.xacro" /> | ||
|
|
||
| <xacro:dynamixel_system_ros2_control name="dynamixel_system" port_name="$(arg port_name)" baud_rate="$(arg baud_rate)"/> | ||
|
|
||
| <link name="$(arg prefix)base_link"/> | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To resolve the missing |
||
| </robot> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /**: | ||
| controller_manager: | ||
| ros__parameters: | ||
| update_rate: 500 # Hz | ||
|
|
||
| joint_state_broadcaster: | ||
| type: joint_state_broadcaster/JointStateBroadcaster | ||
|
|
||
| imu_sensor_broadcaster: | ||
| type: imu_sensor_broadcaster/IMUSensorBroadcaster | ||
|
|
||
| /**: | ||
| imu_sensor_broadcaster: | ||
| ros__parameters: | ||
| sensor_name: "imu" | ||
| frame_id: imu_link | ||
|
Comment on lines
+1
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This YAML file is invalid because the controller_manager:
ros__parameters:
update_rate: 500 # Hz
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
imu_sensor_broadcaster:
type: imu_sensor_broadcaster/IMUSensorBroadcaster
imu_sensor_broadcaster:
ros__parameters:
sensor_name: "imu"
frame_id: imu_linkThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented-out RMW_IMPLEMENTATION environment variable lacks documentation explaining when or why a user should uncomment it. Consider adding a comment above this line explaining the purpose and usage of rmw_zenoh.