Skip to content
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

Open
lmendyk opened this issue Aug 11, 2023 · 1 comment
Open

turtlebot3_ros2 – dxl packet processing causing problems? #330

lmendyk opened this issue Aug 11, 2023 · 1 comment

Comments

@lmendyk
Copy link

lmendyk commented Aug 11, 2023

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


because the setWriteCallbackFunc is registered
dxl_slave.setWriteCallbackFunc(dxl_slave_write_callback_func);

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.

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.

@mayank0621
Copy link

mayank0621 commented Aug 20, 2023

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.
You can also try with ROS2 humble, moveit is more stable in ROS2 humble, and if error persist then I will defenetly try to help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants