ROBOTIS-GIT / OpenCR

Software for ROS Embedded board (a.k.a. OpenCR). OpenCR means Open-source Control Module for ROS.
Apache License 2.0
382 stars 239 forks source link

USB to DXL + Sensor Values ?! #266

Closed Vinz1911 closed 2 years ago

Vinz1911 commented 3 years ago

Hi Guys,

I want to control my Turtlebot Dynamixel Servos by Using the DynamixelSDK. So I uploaded the usb_to_dxl Library to the OpenCR and this is working very well. But is there a way to also read out the Sensor Values from the MPU9250 over USB ?

The usb_to_dxl needs the UART USB and its not possible to open a serial Port Twice. Is there a way to control my Dynamixels and also read out the sensor values from the board over the usb cable ?!

ROBOTIS-Will commented 3 years ago

Hi @Vinz1911 A less painful way to do this is using the Indirect Data of DYNAMIXEL. When Indirect Address for the Indirect Data is not specified, the Indirect Data address can be used to store 1 byte value. So I think implementing IMU update function in the loop() of usb_to_dxl sketch, and reading the Indirect Data addresses with DYNAMIXEL SDK will allow you to get the IMU value.