-
Notifications
You must be signed in to change notification settings - Fork 239
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
turtlebot3_ros2 – dxl packet processing causing problems? #330
Comments
Hi @lmendyk Currently I'm also working on turtlebot3_manipulation package. I've gone through with open_cr firmware code. As per my understanding When you run "ros2 launch turtlebot3_manipulation_bringup hardware.launch.py" it reads value and address of control_table of open cr firmware, and then it will bringup the arm. I've successfully tested it on moveit2 ros2 humble , and it is running perfectly. I have also performed pick and place of arm by using Moveit2 C++ API. But currently I can only use Forward kinematics for arm. I'm struggling with inverse kinematics. |
I’m not very experienced but I’m desperate to get the turtlebot3_manipulation working see one of the reported issues:
ROBOTIS-GIT/turtlebot3_manipulation#55.
Being desperate I decided to dig into the source code and I think I might have found the reason. But as I'm not very experience in microcontrollers programming please advise if my conclusions are correct.
From code it looks that in the OpenCR main loop when dxl_slave processes packets
OpenCR/arduino/opencr_arduino/opencr/libraries/turtlebot3_ros2/src/turtlebot3/turtlebot3.cpp
Line 612 in 68ec75d
because the setWriteCallbackFunc is registered
OpenCR/arduino/opencr_arduino/opencr/libraries/turtlebot3_ros2/src/turtlebot3/turtlebot3.cpp
Line 528 in 68ec75d
If I correctly understand this means that during packet processing (before the TX returns status is sent back to the client-ROS2 Controller) the systems is actually updating the hardware for all ContorlItems and there are a lot of them defined. For example for manipulation joints ControlItem it means remote communication via dynamixel protocol OpenCR->OpenManipulator Harwared.
OpenCR/arduino/opencr_arduino/opencr/libraries/turtlebot3_ros2/src/turtlebot3/turtlebot3.cpp
Line 835 in 68ec75d
which happens during packet processing. This may cause that Packet processing takes much time so ROS2 controller gets time-outs errors ([ros2_control_node-2] [ERROR] [DynamixelSDKWrapper] [TxRxResult] There is no status packet!.
To my understanding the harwared updates according to the ControllItems should NOT be done during the packet processing to avoid the time-outs. In other words Packet processing should just update the local (in memory of OpenCR) ControllItems and report back the TX status to the client (ROS2 Controller). The update of the harwared should happen outside the packet processing just afte the Packet processing in the main loop
As I'm not very experienced I would appreciate any comments if my conclusions based on just code analyzes is correct.
Could some one point me to instruction how to build the binaries based on the source code so I could prepare by myself what is currently released
https://github.com/ROBOTIS-GIT/OpenCR-Binaries/tree/master/turtlebot3/ROS2/latest
so I could test it with my turtlebot3 hardware.
The text was updated successfully, but these errors were encountered: