dynamixel-community / dynamixel_hardware Goto Github PK
View Code? Open in Web Editor NEWros2_control packages for ROBOTIS Dynamixel
License: Apache License 2.0
ros2_control packages for ROBOTIS Dynamixel
License: Apache License 2.0
The existing code checks to see if there are any non-zero velocity commands, and if so, sets the Dynamixels to Velocity control mode. If the velocity commands are all zero, it then changes the Dynamixels to Position control mode.
This introduces some unwanted side effects:
A PR has been raised with code to address these issues by:
Hello,
I'm using dynamixel_hardware for integration arm manipulator based on ROS2 Rolling, MoveIt2 and Dynamixel XL-330 servos.
In general, my code works and is stable. Unfortunately, with option use_dummy=off (enabled control of connected servos) the arm doesn't exactly reach the target position. It's as if it loses the last "frame" of the moveit. When I turn off the servo control (use_dummy=on) the arm will reach the target precisely. Servos are controlled in velocity mode.
Below are my Rviz visualization videos.
The problem of reaching the target position (use_dummy=off):
video with precision problem
The arm precisely reaches the set position (use_dummy=on):
video with correct precision
I would appreciate suggestions how to solve the problem.
Thanks,
Sebastian
I'm running open manipulator-x on ROS2 humble in simulation, can we replace "gazebo ros2 control" plugin with your plugin "dynamixel_hardware/DynamixelHardware" for actual hardware in rviz?
ijnek@ijnek-MS-7924:~/tmp_workspaces/dynamixel_control_ws$ rosdep install --from-paths src --ignore-src -r -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
pantilt_bot_description: Cannot locate rosdep definition for [realsense2_description]
Continuing to install resolvable dependencies...
#All required rosdeps installed successfully
Installation instructions' rosdep fails because the realsense2_description package isn't available in rolling. I've opened a ticket against IntelRealSense/realsense-ros to request for a release in rolling, which should solve this issue.
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
Failed <<< dynamixel_hardware [22.0s, exited with code 2]
`
Changes merged in #30 should be ported to rolling branch. Do you want me to open a PR, or do you have Mergify enabled?
Originally posted by @ijnek in #30 (comment)
I have eight motors (Dynamixel XH430-W210-T), 4 for steering and 4 for driving mobile robot. I would like to control steering motor with position controller and driving motor with velocity controller...is this possible? I tried using JointGroupPositionController and JointGroupVelocityController and when I send [0, 0, 0, 0]
to position controller, steering motors go to 0 position, but then I try to send [0.5, 0.5, 0.5, 0.5]
to velocity controller and driving motors start driving a bit and then return to 0...does anyone know why is that..am I missing something?
I am using ROS2 Humble with ros2_controll, and my .yaml file is bellow:
controller_manager:
ros__parameters:
update_rate: 100 # Hz
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
velocity_controller:
type: velocity_controllers/JointGroupVelocityController
position_controller:
type: position_controllers/JointGroupPositionController
velocity_controller:
ros__parameters:
joints:
- FL_wheel
- BL_wheel
- BR_wheel
- FR_wheel
position_controller:
ros__parameters:
joints:
- FL_steering
- BL_steering
- BR_steering
- FR_steering
Could you recommend me please , I want to read present_input_voltage form dynamixel but i don't know main file for ros node and code for read . i need some guide
Title says it all. Source code indicates this to be true.
return_type DynamixelHardware::write(const rclcpp::Time & /* time */, const rclcpp::Duration & /* period */)
{
if (use_dummy_) {
for (auto & joint : joints_) {
joint.prev_command.position = joint.command.position;
joint.state.position = joint.command.position;
}
return return_type::OK;
}
I tried to fix it myself with
if (use_dummy_) {
for (auto & joint : joints_) {
joint.prev_command.position = joint.command.position;
joint.state.position = joint.command.position;
joint.prev_command.velocity = joint.command.velocity;
joint.state.velocity = joint.command.velocity;
}
but no dice.
CI is failing in the linter steps - should resolve these.
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.
After running "ros2 launch open_manipulator_x_description open_manipulator_x.launch.py", In the Rviz, i see that the grippers are spawning outside their joint limits. Here, I found that there is some patch that you have written, I tried that but that didn't solve my problem.
I can move the arm, but the values of gripper is too high. I tried playing with "mechanical-reduction" and "off-set" that you have added, but I observed that when the two gripper on the real hardware is closer in the simulation I can see them closer in simulation. At that time when I try controlling gripper, I can control it but by very little.
I am using Humble 22.04. Can you tell me if you have found any solution for that or not. Thank you.
Hi,
I am using your code to test my Dynamixel openmanipulator arm. I am able to move the arm except for the gripper. I have checked all the settings including the ID numbers of the motor via Dynamixel Wizard. I can move the gripper motor via the Wizard tool so I can confirm that the motor is not an issue. Could you suggest what I can do to troubleshoot this issue.
Thanks,
Ajay
I'd really like to add the ability to enable and disable the torque at runtime as well as reboot a motor if a fault is detected. I was thinking a parameters would be a nice way to do the torque and a service/subscription for reboot but hardware_interface::SystemInterface does not allow this ability. Do you have any suggestions for how to implement this and still keep only one instance of DynamixelWorkbench?
Hi I get a sync read error and a groupsync error using AX12 servos with ros2 galactic on ubuntu 20.4
can support be added for the AX12 servos
This is more like a question than an issue. I wanted to know if it is possible to add extra (virtual) joints in the hardware plugin, OpenCR firmware and control the open manipulator.
Actually, I want to control the open manipulator hardware with moveit library and inverse kinematics, which needs 6 DoF. I was able to control it in gazebo by adding virtual joints. I wanted to replicate same with real hardware but I am having some difficulty. So I want to know if it is even possible or not.
Since jazzy release is in full throttle, now is a good time to get new changes released into rosdistro. I'm happy to make the releases some time next week. Here's a layout of things that will happen:
Iron release (0.4.0):
Jazzy release (0.5.0):
Rolling release (0.6.0):
Some things that should happen after those releases:
@youtalk Tell me if you have any issues with the above
Hi,
Thanks for the great software!
I have been stuck with not being able to connect the USB port to the Dynamixel actuators.
I am using ROS2 Humble on a Ubuntu system with a USB2Dynamixel interface.
It kept crashing at line 84 of /dynamixel_hardware/src/dynamixel_hardware.cpp
auto usb_port = info_.hardware_parameters.at("usb_port");
The issue was resolved when the name of the port is changed to "port_name".
The name of the variable for the port is set in the DynamixelSDK
DynamixelSDK/dynamixel_sdk/src/dynamixel_sdk/port_handler.cpp
PortHandler *PortHandler::getPortHandler(const char *port_name)
Line 84 in dynamixel_hardware.cpp needs to be changed to:
auto usb_port = info_.hardware_parameters.at("port_name");
You will also need to change the param name for the port in the examples to "port_name".
open_manipulator_x_description/urdf/open_manipulator_x.ros2_control.xacro
dynamixel_hardware/DynamixelHardware /dev/ttyUSB0 1000000After this minor change the software works without a problem.
I hope this helps.
Hi @youtalk , I'd like to create a new PR adding CI in. Do you have preferences for industrial_ci vs action-ros-ci, or another? My preference would be action-ros-ci, but would be happy to work with any tool you're comfortable with.
Hi @youtalk , thanks for developing and maintaining this package. I remember at ROSCon JP (I was there), you mentioned some things preventing you releasing this package.
I'd like to know what the roadblockers currently are, prevnting this package from being released into ROS 2? The obvious one I can think of is ROBOTIS-GIT/dynamixel-workbench missing releases for ROS2. Are there any others?
The pantilt_bot_description
and open_manipulator_x_description
example packages are great, but I think it would be better split them out into a separate repository for two reasons.
realsense2_description
is not available in rolling) and getting built. If the repositories were separate, I wouldn't have to do this.I don't know if I can get around to doing this, but want to hear your thoughts @youtalk.
thank you for this work, it really helps me through building my project, however, I'm having a hard time on launching this in gazebo. can please help?
commands:
ros2 launch pantilt_bot_description pantilt_bot_gazebo.launch.py robot_description:=pantilt_bot_gazebo.urdf.xacro
Expected Behavior:
gazebo will launch normally
rviz2 will launch with correct TF's
Actual behavior:
gazebo launches but no visual model is seen in GUI, I can see all collisions tho
complete log file:
[INFO] [gzserver-1]: process started with pid [16881]
[INFO] [gzclient -2]: process started with pid [16883]
[INFO] [robot_state_publisher-3]: process started with pid [16885]
[INFO] [spawn_entity.py-4]: process started with pid [16887]
[INFO] [rviz2-5]: process started with pid [16890]
[robot_state_publisher-3] Link joint1_link had 1 children
[robot_state_publisher-3] Link joint1_horn_link had 1 children
[robot_state_publisher-3] Link joint2_link had 1 children
[robot_state_publisher-3] Link joint2_horn_link had 1 children
[robot_state_publisher-3] Link camera_bottom_screw_frame had 1 children
[robot_state_publisher-3] Link camera_link had 4 children
[robot_state_publisher-3] Link camera_color_frame had 1 children
[robot_state_publisher-3] Link camera_color_optical_frame had 0 children
[robot_state_publisher-3] Link camera_depth_frame had 1 children
[robot_state_publisher-3] Link camera_depth_optical_frame had 0 children
[robot_state_publisher-3] Link camera_infra1_frame had 1 children
[robot_state_publisher-3] Link camera_infra1_optical_frame had 0 children
[robot_state_publisher-3] Link camera_infra2_frame had 1 children
[robot_state_publisher-3] Link camera_infra2_optical_frame had 0 children
[robot_state_publisher-3] [INFO] [1684981419.162594384] [robot_state_publisher]: got segment camera_bottom_screw_frame
[robot_state_publisher-3] [INFO] [1684981419.162668237] [robot_state_publisher]: got segment camera_color_frame
[robot_state_publisher-3] [INFO] [1684981419.162679161] [robot_state_publisher]: got segment camera_color_optical_frame
[robot_state_publisher-3] [INFO] [1684981419.162685702] [robot_state_publisher]: got segment camera_depth_frame
[robot_state_publisher-3] [INFO] [1684981419.162691398] [robot_state_publisher]: got segment camera_depth_optical_frame
[robot_state_publisher-3] [INFO] [1684981419.162696925] [robot_state_publisher]: got segment camera_infra1_frame
[robot_state_publisher-3] [INFO] [1684981419.162702660] [robot_state_publisher]: got segment camera_infra1_optical_frame
[robot_state_publisher-3] [INFO] [1684981419.162708286] [robot_state_publisher]: got segment camera_infra2_frame
[robot_state_publisher-3] [INFO] [1684981419.162713810] [robot_state_publisher]: got segment camera_infra2_optical_frame
[robot_state_publisher-3] [INFO] [1684981419.162719449] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-3] [INFO] [1684981419.162725016] [robot_state_publisher]: got segment joint1_horn_link
[robot_state_publisher-3] [INFO] [1684981419.162730520] [robot_state_publisher]: got segment joint1_link
[robot_state_publisher-3] [INFO] [1684981419.162736064] [robot_state_publisher]: got segment joint2_horn_link
[robot_state_publisher-3] [INFO] [1684981419.162741528] [robot_state_publisher]: got segment joint2_link
[robot_state_publisher-3] [INFO] [1684981419.162747015] [robot_state_publisher]: got segment world
[spawn_entity.py-4] [INFO] [1684981419.653458323] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1684981419.654001219] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-4] [INFO] [1684981419.656123990] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-4] [INFO] [1684981419.657832252] [spawn_entity]: Waiting for service /spawn_entity, timeout = 5
[spawn_entity.py-4] [INFO] [1684981419.658344335] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-4] [INFO] [1684981420.412148798] [spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-4] [INFO] [1684981420.582205041] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [pantilt_bot]
[spawn_entity.py-4] /opt/ros/galactic/lib/python3.8/site-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-4] warnings.warn(
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 16887]
[INFO] [ros2-6]: process started with pid [17040]
[ros2-6] Could not contact service /controller_manager/load_controller
[ERROR] [ros2-6]: process has died [pid 17040, exit code 1, cmd 'ros2 control load_controller --set-state start --spin-time 120 joint_state_broadcaster'].
[INFO] [ros2-7]: process started with pid [18082]
[ros2-7] Could not contact service /controller_manager/load_controller
[ERROR] [ros2-7]: process has died [pid 18082, exit code 1, cmd 'ros2 control load_controller --set-state start joint_trajectory_controller'].
[INFO] [ros2-8]: process started with pid [18231]
[ros2-8] Could not contact service /controller_manager/load_controller
[ERROR] [ros2-8]: process has died [pid 18231, exit code 1, cmd 'ros2 control load_controller --set-state configure velocity_controller'].
[gzserver-1] [INFO] [1684981578.032228314] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1684981578.035279589] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-1] [INFO] [1684981578.035438775] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1684981578.035471937] [gazebo_ros2_control]: Loading parameter file /home/user/ros2_ws/install/pantilt_bot_description/share/pantilt_bot_description/controllers/controllers.yaml
[gzserver-1]
[gzserver-1] [INFO] [1684981578.037964702] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1684981578.040547948] [gazebo_ros2_control]: Recieved urdf from param server, parsing...
[gzserver-1] [INFO] [1684981578.058106038] [gazebo_ros2_control]: Loading joint: joint1
[gzserver-1] [INFO] [1684981578.058162032] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1684981578.058174631] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1684981578.058203759] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1684981578.058215303] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1684981578.058223571] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1684981578.058247844] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1684981578.058258307] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1684981578.058276710] [gazebo_ros2_control]: Loading joint: joint2
[gzserver-1] [INFO] [1684981578.058286071] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1684981578.058293471] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1684981578.058301109] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1684981578.058308422] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1684981578.058315538] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1684981578.058322771] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1684981578.058330127] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1684981578.058672663] [gazebo_ros2_control]: Loading controller_manager
[gzserver-1] [WARN] [1684981578.080322538] [gazebo_ros2_control]: Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s).
[gzserver-1] [INFO] [1684981578.080506358] [gazebo_ros2_control]: Loaded gazebo_ros2_control.
I'm having trouble getting dynamixel_control to compile. Below is a dockerfile for reproducibility. The error I get is
#0 6.315 --- stderr: dynamixel_workbench_toolbox
#0 6.315 /ros2_ws/src/dynamixel-workbench-ros2/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp: In member function ‘bool DynamixelDriver::readRegister(uint8_t, uint16_t, uint16_t, uint32_t*, const char**)’:
#0 6.315 /ros2_ws/src/dynamixel-workbench-ros2/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp:776:11: warning: ISO C++ forbids variable length array ‘data_read’ [-Wvla]
#0 6.315 776 | uint8_t data_read[length];
#0 6.315 | ^~~~~~~~~
#0 6.315 /ros2_ws/src/dynamixel-workbench-ros2/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp: In member function ‘bool DynamixelDriver::syncWrite(uint8_t, uint8_t*, uint8_t, int32_t*, uint8_t, const char**)’:
#0 6.315 /ros2_ws/src/dynamixel-workbench-ros2/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp:1012:11: warning: ISO C++ forbids variable length array ‘multi_parameter’ [-Wvla]
#0 6.315 1012 | uint8_t multi_parameter[4*data_num_for_each_id];
#0 6.315 | ^~~~~~~~~~~~~~~
#0 6.315 ---
#0 6.316 Finished <<< dynamixel_workbench_toolbox [3.09s]
#0 6.321 Starting >>> dynamixel_hardware
#0 6.336 Starting >>> dynamixel_workbench
#0 7.692 Finished <<< dynamixel_sdk_custom_interfaces [6.74s]
#0 7.693 Starting >>> dynamixel_sdk_examples
#0 7.828 Finished <<< dynamixel_workbench [1.49s]
#0 13.12 --- stderr: dynamixel_hardware
#0 13.12 In file included from /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:15:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/include/dynamixel_hardware/dynamixel_hardware.hpp:66:3: error: ‘CallbackReturn’ does not name a type
#0 13.12 66 | CallbackReturn on_init(const hardware_interface::HardwareInfo & info) override;
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/include/dynamixel_hardware/dynamixel_hardware.hpp:75:3: error: ‘CallbackReturn’ does not name a type
#0 13.12 75 | CallbackReturn on_activate(const rclcpp_lifecycle::State & previous_state) override;
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/include/dynamixel_hardware/dynamixel_hardware.hpp:78:3: error: ‘CallbackReturn’ does not name a type
#0 13.12 78 | CallbackReturn on_deactivate(const rclcpp_lifecycle::State & previous_state) override;
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:51:1: error: ‘CallbackReturn’ does not name a type
#0 13.12 51 | CallbackReturn DynamixelHardware::on_init(const hardware_interface::HardwareInfo & info)
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: In member function ‘virtual std::vector<hardware_interface::StateInterface> dynamixel_hardware::DynamixelHardware::export_state_interfaces()’:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:193:24: error: ‘info_’ was not declared in this scope
#0 13.12 193 | for (uint i = 0; i < info_.joints.size(); i++) {
#0 13.12 | ^~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: In member function ‘virtual std::vector<hardware_interface::CommandInterface> dynamixel_hardware::DynamixelHardware::export_command_interfaces()’:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:209:24: error: ‘info_’ was not declared in this scope
#0 13.12 209 | for (uint i = 0; i < info_.joints.size(); i++) {
#0 13.12 | ^~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: At global scope:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:219:1: error: ‘CallbackReturn’ does not name a type
#0 13.12 219 | CallbackReturn DynamixelHardware::on_activate(const rclcpp_lifecycle::State & previous_state)
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:236:1: error: ‘CallbackReturn’ does not name a type
#0 13.12 236 | CallbackReturn DynamixelHardware::on_deactivate(const rclcpp_lifecycle::State & previous_state)
#0 13.12 | ^~~~~~~~~~~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: In member function ‘virtual hardware_interface::return_type dynamixel_hardware::DynamixelHardware::read()’:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:248:28: error: ‘info_’ was not declared in this scope
#0 13.12 248 | std::vector<uint8_t> ids(info_.joints.size(), 0);
#0 13.12 | ^~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: In member function ‘virtual hardware_interface::return_type dynamixel_hardware::DynamixelHardware::write()’:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:301:28: error: ‘info_’ was not declared in this scope
#0 13.12 301 | std::vector<uint8_t> ids(info_.joints.size(), 0);
#0 13.12 | ^~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp: In member function ‘hardware_interface::return_type dynamixel_hardware::DynamixelHardware::enable_torque(bool)’:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:346:26: error: ‘info_’ was not declared in this scope
#0 13.12 346 | for (uint i = 0; i < info_.joints.size(); ++i) {
#0 13.12 | ^~~~~
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:355:26: error: ‘info_’ was not declared in this scope
#0 13.12 355 | for (uint i = 0; i < info_.joints.size(); ++i) {
#0 13.12 | ^~~~~
#0 13.12 In file included from /opt/ros/foxy/include/class_loader/class_loader_core.hpp:57,
#0 13.12 from /opt/ros/foxy/include/class_loader/class_loader.hpp:55,
#0 13.12 from /opt/ros/foxy/include/pluginlib/class_list_macros.hpp:40,
#0 13.12 from /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:431:
#0 13.12 /opt/ros/foxy/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = dynamixel_hardware::DynamixelHardware; B = hardware_interface::SystemInterface]’:
#0 13.12 /opt/ros/foxy/include/class_loader/meta_object.hpp:216:7: required from here
#0 13.12 /opt/ros/foxy/include/class_loader/meta_object.hpp:218:12: error: invalid new-expression of abstract class type ‘dynamixel_hardware::DynamixelHardware’
#0 13.12 218 | return new C;
#0 13.12 | ^~~~~
#0 13.12 In file included from /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:15:
#0 13.12 /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/include/dynamixel_hardware/dynamixel_hardware.hpp:59:7: note: because the following virtual functions are pure within ‘dynamixel_hardware::DynamixelHardware’:
#0 13.12 59 | class DynamixelHardware
#0 13.12 | ^~~~~~~~~~~~~~~~~
#0 13.12 In file included from /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/include/dynamixel_hardware/dynamixel_hardware.hpp:22,
#0 13.12 from /ros2_ws/src/dynamixel_control-1a1e6ef0cec860e0d44d25e910d269af89ab41c4/dynamixel_hardware/src/dynamixel_hardware.cpp:15:
#0 13.12 /opt/ros/foxy/include/hardware_interface/system_interface.hpp:48:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::configure(const hardware_interface::HardwareInfo&)’
#0 13.12 48 | virtual return_type configure(const HardwareInfo & system_info) = 0;
#0 13.12 | ^~~~~~~~~
#0 13.12 /opt/ros/foxy/include/hardware_interface/system_interface.hpp:116:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::start()’
#0 13.12 116 | virtual return_type start() = 0;
#0 13.12 | ^~~~~
#0 13.12 /opt/ros/foxy/include/hardware_interface/system_interface.hpp:122:23: note: ‘virtual hardware_interface::return_type hardware_interface::SystemInterface::stop()’
#0 13.12 122 | virtual return_type stop() = 0;
#0 13.12 | ^~~~
#0 13.12 /opt/ros/foxy/include/hardware_interface/system_interface.hpp:128:23: note: ‘virtual std::string hardware_interface::SystemInterface::get_name() const’
#0 13.12 128 | virtual std::string get_name() const = 0;
#0 13.12 | ^~~~~~~~
#0 13.12 /opt/ros/foxy/include/hardware_interface/system_interface.hpp:134:18: note: ‘virtual hardware_interface::status hardware_interface::SystemInterface::get_status() const’
#0 13.12 134 | virtual status get_status() const = 0;
#0 13.12 | ^~~~~~~~~~
#0 13.12 make[2]: *** [CMakeFiles/dynamixel_hardware.dir/build.make:63: CMakeFiles/dynamixel_hardware.dir/src/dynamixel_hardware.cpp.o] Error 1
#0 13.12 make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/dynamixel_hardware.dir/all] Error 2
#0 13.12 make: *** [Makefile:141: all] Error 2
#0 13.12 ---
#0 13.12 Failed <<< dynamixel_hardware [6.80s, exited with code 2]
#0 18.16 Aborted <<< dynamixel_sdk_examples [10.5s]
#0 23.98 Aborted <<< dynamixel_workbench_msgs [23.0s]
#0 24.02
#0 24.02 Summary: 4 packages finished [23.3s]
#0 24.02 1 package failed: dynamixel_hardware
#0 24.02 2 packages aborted: dynamixel_sdk_examples dynamixel_workbench_msgs
#0 24.02 2 packages had stderr output: dynamixel_hardware dynamixel_workbench_toolbox
#0 24.02 2 packages not processed
------
failed to solve: executor failed running [/bin/bash -c source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install]: exit code: 2
dockerfile
FROM ros:foxy
# use bash instead of sh
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
# update system
RUN apt-get update && apt-get upgrade --yes
RUN apt-get install -y \
wget \
ros-foxy-ros2-control \
ros-foxy-ros2-controllers \
&& rm -rf /var/lib/apt/lists/*
# create workspace
RUN mkdir -p /ros2_ws/src
WORKDIR /ros2_ws
# download ROS packages
RUN wget -c https://github.com/ROBOTIS-GIT/DynamixelSDK/archive/refs/tags/3.7.60.tar.gz -O - | tar -xz -C /ros2_ws/src
RUN wget -c https://github.com/ROBOTIS-GIT/dynamixel-workbench/archive/ros2.tar.gz -O - | tar -xz -C /ros2_ws/src
RUN wget -c https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs/archive/ros2.tar.gz -O - | tar -xz -C /ros2_ws/src
RUN wget -c https://github.com/youtalk/dynamixel_control/archive/1a1e6ef0cec860e0d44d25e910d269af89ab41c4.tar.gz -O - | tar -xz -C /ros2_ws/src
RUN apt-get update \
&& rosdep install --from-paths src --ignore-src -r -y \
&& rm -rf /var/lib/apt/lists/*
# build ROS packages and allow non-compiled
# sources to be edited without rebuild
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install
# add packages to path
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
RUN echo "source /ros2_ws/install/setup.bash" >> ~/.bashrc
run using docker build .
humble
ros-humble-dynamixel-workbench*
ros-humble-dynamixel-sdk
I am encountering the following errors in my log
[INFO] [launch]: All log files can be found below /home/container_user/.ros/log/2024-05-11-14-00-18-474799-E14-7727
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_control_node-1]: process started with pid [7736]
[INFO] [robot_state_publisher-2]: process started with pid [7738]
[INFO] [spawner-3]: process started with pid [7740]
[ros2_control_node-1] [INFO] [1715416218.928573690] [robot.controller_manager]: Subscribing to '~/robot_description' topic for robot description file.
[ros2_control_node-1] [INFO] [1715416218.929964564] [robot.controller_manager]: update rate is 200 Hz
[ros2_control_node-1] [INFO] [1715416218.930277923] [robot.controller_manager]: RT kernel is recommended for better performance
[robot_state_publisher-2] [INFO] [1715416218.978141700] [robot.robot_state_publisher]: got segment wheel_link
[robot_state_publisher-2] [INFO] [1715416218.978346253] [robot.robot_state_publisher]: got segment world
[ros2_control_node-1] [INFO] [1715416219.144636252] [robot.controller_manager]: Received robot description file.
[ros2_control_node-1] [INFO] [1715416219.146690928] [resource_manager]: Loading hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.148623249] [resource_manager]: Initialize hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.149287259] [DynamixelHardware]: joint_id 0: 101
[ros2_control_node-1] [INFO] [1715416219.149321060] [DynamixelHardware]: usb_port: /dev/ttyUSB0
[ros2_control_node-1] [INFO] [1715416219.149333352] [DynamixelHardware]: baud_rate: 57600
[ros2_control_node-1] [INFO] [1715416219.213230954] [DynamixelHardware]: Position control
[ros2_control_node-1] [INFO] [1715416219.229221121] [DynamixelHardware]: Torque enabled
[ros2_control_node-1] [INFO] [1715416219.229490831] [resource_manager]: Successful initialization of hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.229742245] [resource_manager]: 'configure' hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.236202030] [resource_manager]: Successful 'configure' of hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.236272636] [resource_manager]: 'activate' hardware 'Wheel'
[ros2_control_node-1] [ERROR] [1715416219.240448750] [DynamixelHardware]: [TxRxResult] Port is in use!
[ros2_control_node-1] [ERROR] [1715416219.240558395] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240573689] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240585910] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240726423] [DynamixelHardware]: [TxRxResult] Port is in use!
[ros2_control_node-1] [ERROR] [1715416219.245845826] [DynamixelHardware]: groupSyncWrite addparam failed
I am however able to control the motor using Dynamixel Wizard 2.0
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?
Hi everyone,
I am trying to set up the transmission mechanism to work with my dynamixel-based manipulator. Of course I am using this plugin for the hardware. I am using humble on Ubuntu 22.04.
I have a 3 Dof manipulator with forward position controller and joint trajectory controller. Both using a position interface. I want to add a transmission element on the tibia joint (a SimpleTrasmission now for simplicity). The only modification that I have made is in the ros2_control tag in the urdf, in which I have added the following block:
<transmission name="tibia_transmission">
<plugin>transmission_interface/SimpleTransmission</plugin>
<actuator name="tibia_actuator" role="tibia_actuator">
</actuator>
<joint name="tibia_joint" role="tibia_joint">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<mechanicalReduction>40.0</mechanicalReduction>
</joint>
</transmission>
I have tried different modifications of this snippet ( instead of , hardware_interface instead of hardwareInterface, mechanical_reduction instead of mechanical_reduction, EffortJointInterface instead of PositionJointInterface). Everything loads smoothly, but the system is simply ignoring the mechanical reduction. My question is, should I modify the dynamixel_hardware plugin?
I am also reporting the yaml file of control.
controller_manager:
ros__parameters:
update_rate: 30
#use_sim_time: true
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
forward_position_controller:
type: forward_command_controller/ForwardCommandController
joint_trajectory_position_controller:
type: joint_trajectory_controller/JointTrajectoryController
forward_position_controller:
ros__parameters:
joints:
- coxa_joint
- femur_joint
- tibia_joint
interface_name: position
joint_trajectory_position_controller:
ros__parameters:
joints:
- coxa_joint
- femur_joint
- tibia_joint
command_interfaces:
- position
state_interfaces:
- position
#- velocity
#- effort
action_monitor_rate: 20.0 # Defaults to 20
allow_partial_joints_goal: false # Defaults to false
open_loop_control: true
allow_integration_in_goal_trajectories: true
constraints:
stopped_velocity_tolerance: 0.01 # Defaults to 0.01
goal_time: 0.0 # Defaults to 0.0 (start immediately)
How do I set the internal Dynamixel PID gains for position and velocity? I can see that there is a set of variables in dynamixel_hardware.cpp (kExtraJointParameters) that sets this from the urdf file. However, when I specify "Position_P_Gain" and "Position_D_Gain", in the INFO output for the controller I can only see that "Position_P_Gain" has been set.
Hi @ijnek and @ROBOTIS-Will
Thank you for discussing releasing dynamixel_hardware package on ROSCon 2022. It was so exciting.
dynamixel_hardware
and dyanamixel_hardware_examples
to resolve #36dynamixel_community
.dynamixel_hardware-release
and dyanamixel_hardware_examples-release
on the organization.dynamixel_hardware
package first!What do you think? I want to add you to the organization's co-owners.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.