ros2_control packages for ROBOTIS Dynamixel

Overview

dynamixel_control

The ros2_control implementation for any kind of ROBOTIS Dynamixel robots.

  • dynamixel_hardware: the SystemInterface implementation for the multiple ROBOTIS Dynamixel servos.
  • open_manipulator_x_robot: the reference implementation of the ros2_control robot using ROBOTIS OpenManipulator-X.

The dynamixel_hardware package is hopefully compatible any configuration of ROBOTIS Dynamixel servos thanks to the ros2_control's flexible architecture.

Set up

First install ROS 2 Foxy on Ubuntu 20.04. Then follow the instruction below.

$ source /opt/ros/foxy/setup.bash
$ mkdir -p ~/ros/foxy && cd ~/ros/foxy
$ git clone https://github.com/youtalk/dynamixel_control.git src
$ vcs import src < src/dynamixel_control.repos
$ rosdep install --from-paths src --ignore-src -r -y
$ colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
$ . install/setup.bash

Demo with real ROBOTIS OpenManipulator-X

Configure Dynamixel motor parameters

Update the usb_port, baud_rate, and joint_ids parameters on open_manipulator_x_robot/urdf/open_manipulator_x.ros2_control.xacro to correctly communicate with Dynamixel motors. The use_dummy parameter is required if you don't have a real OpenManipulator-X.

Note that joint_ids parameters must be splited by ,.

<hardware>
  <plugin>dynamixel_hardware/DynamixelHardware</plugin>
  <param name="usb_port">/dev/ttyUSB0</param>
  <param name="baud_rate">1000000</param>
  <param name="joint_ids">11,12,13,14,15</param>
  <!-- <param name="use_dummy">true</param> -->
</hardware>
  • Terminal 1

Launch the ros2_control manager for the OpenManipulator-X.

$ ros2 launch open_manipulator_x_robot open_manipulator_x_robot.launch.py
  • Terminal 2

Start the joint_trajectory_controller and send a /joint_trajectory_controller/follow_joint_trajectory goal to move the OpenManipulator-X.

$ ros2 control switch_controllers --start-controllers joint_trajectory_controller
$ ros2 control list_controllers
$ ros2 control list_hardware_interfaces
$ ros2 action send_goal /joint_trajectory_controller/follow_joint_trajectory control_msgs/action/FollowJointTrajectory -f "{
  trajectory: {
    joint_names: [joint1, joint2, joint3, joint4, gripper],
    points: [
      { positions: [0.1, 0.1, 0.1, 0.1, 0.01], time_from_start: { sec: 2 } },
      { positions: [-0.1, -0.1, -0.1, -0.1, -0.01], time_from_start: { sec: 4 } },
      { positions: [0, 0, 0, 0, 0], time_from_start: { sec: 6 } }
    ]
  }
}"

dynamixel_control: the ros2_control implementation for any kind of ROBOTIS Dynamixel robots

Demo with dummy ROBOTIS OpenManipulator-X

The use_dummy parameter is required if you use the dummy OpenManipulator-X.

diff --git a/open_manipulator_x_robot/urdf/open_manipulator_x.ros2_control.xacro b/open_manipulator_x_robot/urdf/open_manipulator_x.ros2_control.xacro
index c6cdb74..111846d 100644
--- a/open_manipulator_x_robot/urdf/open_manipulator_x.ros2_control.xacro
+++ b/open_manipulator_x_robot/urdf/open_manipulator_x.ros2_control.xacro
@@ -9,7 +9,7 @@
         <param name="usb_port">/dev/ttyUSB0</param>
         <param name="baud_rate">1000000</param>
         <param name="joint_ids">11,12,13,14,15</param>
-        <!-- <param name="use_dummy">true</param> -->
+        <param name="use_dummy">true</param>
       </hardware>
       <joint name="joint1">
         <command_interface name="position"/>

Then follow the same instruction of the real robot one.

Note that the dummy implementation has no interpolation so far. If you sent a joint message, the robot would move directly to the joints without interpolation.

Issues
  • support for ros2 galactic

    support for ros2 galactic

    Hallo on building with ros2-galatic i am getting this error:

    cmds: source /opt/ros/galactic/setup.bash mkdir -p ~/ros/galactic && cd ~/ros/galactic git clone https://github.com/youtalk/dynamixel_control.git src vcs import src < src/dynamixel_control.repos rosdep install --from-paths src --ignore-src -r -y colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . install/setup.bash

    error: ` fatal error: hardware_interface/base_interface.hpp: No such file or directory 20 | #include <hardware_interface/base_interface.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/dynamixel_hardware.dir/build.make:63: CMakeFiles/dynamixel_hardware.dir/src/dynamixel_hardware.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/dynamixel_hardware.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

    Failed <<< dynamixel_hardware [22.0s, exited with code 2] `

    opened by 3mrrrx 6
  • Can this hardware library be used with wheeled robot?

    Can this hardware library be used with wheeled robot?

    First of all, pretty awesome library. I tried to use this lib for a wheeled robot with foxy + ros2_control and standard diff_drive_controller but had some issues with it. Can this be used with wheeled robot in Velocity control mode or will it have to be modified to work with it? And what changes you would suggest. Thanks.

    opened by robofoundry 3
  • ported to galactic

    ported to galactic

    I ported the package to galactic as per instructions. Maybe it makes sense to create a seperate branch for foxy / garlactic / rolling like the core ros packages do...

    Thanks for making this btw :)

    Closes #15

    opened by Schnilz 1
  • pantilt_bot.launch.py error

    pantilt_bot.launch.py error

    Hallo,

    i am starting to work with the code and wanted to launch the pantilt_bot using the cmd:

    ros2 launch pantilt_bot_description pantilt_bot.launch.py

    sadly i am not getting any futhur as there still seams to be some errors:

    [ros2_control_node-1] [FATAL] [1636901750.857381442] [DynamixelHardware]: [TxRxResult] There is no status packet! [ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error' [ros2_control_node-1] what(): Failed to configure 'pantilt_bot_ros2_control' [ERROR] [ros2_control_node-1]: process has died [pid 11068, exit code -6, cmd '/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_3ksga6qn --params-file /home/ubuntu/foxy_test/install/pantilt_bot_description/share/pantilt_bot_description/controllers/controllers.yaml'].

    thank you for the help

    opened by 3mrrrx 1
  • use of RCLCPP_FATAL for communication errors

    use of RCLCPP_FATAL for communication errors

    First, thanks for publishing this and taking time to support it. I am very interested to see how this will evolve and I will do all my best to help if needed.

    I've noticed that communication errors are logged using RCLCPP_FATAL. Is there a reason not using RCLCPP_ERROR? Typically the FATAL errors should result in complete inability to continue work and thus shutting down the application. In this case it is an important problem, but not one that will require the main controller to shut down. For instance, in my experience using 10-12 Dynamixel servos on a bus and running SyncRead at 100-200Hz will almost invariably produce 0.2-0.4% error rates due to noise, main controller load, etc.

    Shouldn't be better to switch the logging to RCLCPP_ERROR?

    opened by sonelu 1
Owner
Yutaka Kondo
I'm always thinking about what people and robots can do together.
Yutaka Kondo
ODrive driver for ros2_control

odrive_ros2_control ENGLISH / 中文 Introduction ODrive driver for ros2_control Prerequisites ROS Foxy ODrive Firmware v0.5.3 Documentation Wiki Done Sup

null 91 Jun 26, 2022
This project contains the main ROS 2 packages of Xiaomi CyberDog®.

Xiaomi CyberDog ROS 2 文档包含简体中文和English 简介 - Introduction 本项目包含小米铁蛋®的ROS 2主要功能包. This project contains the main ROS 2 packages of Xiaomi CyberDog®. 基本信

null 333 Jun 27, 2022
ROS packages for Scout 2.0

ROS packages for Scout 2.0

ROAS 3 Jun 14, 2022
Packages for simulating the Tethys-class Long-Range AUV (LRAUV) from the Monterey Bay Aquarium Research Institute (MBARI).

LRAUV Simulation This repository contains packages for simulating the Tethys-class Long-Range AUV (LRAUV) from the Monterey Bay Aquarium Research Inst

Open Robotics 17 Jun 22, 2022
OpenWrt Packages

NueXini_Packages 1.如何使用NueXini_Packages? / How to use NueXini_Packages? cd lede sed -i '$a src-git NueXini_Packages https://github.com/NueXini/NueXini

null 104 Jun 29, 2022
Core ROS packages

Robot Operating System (ROS) =============================================================================== ROS is a meta-operating system for your

ROS core stacks 2k Jun 23, 2022
It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Packages

ARM_hook It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Package

Gabriel Correia 1 Feb 17, 2022
conversion from absolute encoder and incremental encoder, control two robotis dynamixel motors, testing qserialport library in qt

Q_dxl This example is created for testing: Serial connection Testing two dynamixel motors (eg. MX-28AT) Doing the conversion from absolute encoder (of

ibov 1 Oct 30, 2021
ODrive driver for ros2_control

odrive_ros2_control ENGLISH / 中文 Introduction ODrive driver for ros2_control Prerequisites ROS Foxy ODrive Firmware v0.5.3 Documentation Wiki Done Sup

null 91 Jun 26, 2022
A competitive programming helper tool, which packages included libraries into a single file, suitable for online judges.

cpack Cpack is a competitive programming helper tool, which packages the main source file along with included libraries into a single file, suitable f

PetarMihalj 11 Apr 22, 2022
ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages.

ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages. By zig contained I mean that ZT is intend

null 80 Jun 18, 2022
The goal of arrowvctrs is to wrap the Arrow Data C API and Arrow Stream C API to provide lightweight Arrow support for R packages

The goal of arrowvctrs is to wrap the Arrow Data C API and Arrow Stream C API to provide lightweight Arrow support for R packages to consume and produce streams of data in Arrow format. Right now it’s just a fun way for me to learn about Arrow!

Dewey Dunnington 28 Jun 15, 2022
This project contains the main ROS 2 packages of Xiaomi CyberDog®.

Xiaomi CyberDog ROS 2 文档包含简体中文和English 简介 - Introduction 本项目包含小米铁蛋®的ROS 2主要功能包. This project contains the main ROS 2 packages of Xiaomi CyberDog®. 基本信

null 333 Jun 27, 2022
ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

null 4 Jan 31, 2022
ROS2 packages based on NVIDIA libArgus library for hardware-accelerated CSI camera support.

Isaac ROS Argus Camera This repository provides monocular and stereo nodes that enable ROS developers to use cameras connected to Jetson platforms ove

NVIDIA Isaac ROS 26 Jul 1, 2022
Hardware-accelerated DNN model inference ROS2 packages using NVIDIA Triton/TensorRT for both Jetson and x86_64 with CUDA-capable GPU.

Isaac ROS DNN Inference Overview This repository provides two NVIDIA GPU-accelerated ROS2 nodes that perform deep learning inference using custom mode

NVIDIA Isaac ROS 36 Jun 20, 2022
ROS packages for Scout 2.0

ROS packages for Scout 2.0

ROAS 3 Jun 14, 2022
Isaac ROS common utilities and scripts for use in conjunction with the Isaac ROS suite of packages.

Isaac ROS Common Isaac ROS common utilities and scripts for use in conjunction with the Isaac ROS suite of packages. Docker Scripts run_dev.sh creates

NVIDIA Isaac ROS 41 Jul 1, 2022
Packages for simulating the Tethys-class Long-Range AUV (LRAUV) from the Monterey Bay Aquarium Research Institute (MBARI).

LRAUV Simulation This repository contains packages for simulating the Tethys-class Long-Range AUV (LRAUV) from the Monterey Bay Aquarium Research Inst

Open Robotics 17 Jun 22, 2022
The required packages to build the control GUI for Ohmnibot

ohmni-ros-gui The required packages to build the control GUI for Ohmnibot These packages alow us to perfrom certain tasks on OHmnibot: Prequisite sett

Phoenix Ly 1 Jan 2, 2022
A collection of packages for Ultimate++ framework.

upp-components This repository contains supplementary general-purpose packages for Ultimate++, a C++ cross-platform rapid application development fram

İsmail Yılmaz 34 Feb 8, 2022
OpenWrt Packages

NueXini_Packages 1.如何使用NueXini_Packages? / How to use NueXini_Packages? cd lede sed -i '$a src-git NueXini_Packages https://github.com/NueXini/NueXini

null 104 Jun 29, 2022
CMake module for building Windows Installer packages with WiX toolset

FindWiX CMake module for building Windows Installer packages with WiX toolset Introduction Requirements Usage find_package() wix_add_project() WiX com

Apriorit Inc. 10 Dec 20, 2021
Core ROS packages

Robot Operating System (ROS) =============================================================================== ROS is a meta-operating system for your

ROS core stacks 2k Jun 23, 2022
Languages for the Tree-sitter parser generator wrapped in Swift packages

TreeSitterLanguages Languages for the Tree-sitter parser generator wrapped in Swift packages. Motivation There are two reasons this package exists: As

Simon Støvring 14 Jun 30, 2022
It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Packages

ARM_hook It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Package

Gabriel Correia 1 Feb 17, 2022