...
POST No. 2407903
Dynamixel Pro not detected
2020-06-26 01:28:40 01binary

Hello,


I just connected my Dynamixel Pro (PH42-020-S300-R) for the first time and the find_dynamixel utility from the workbench can't find it. Here's the picture of the setup:



 

Here's the video of Dynamixel light blinking and U2D2 light blinking, if that sheds any light on the issue:


https://drive.google.com/file/d/1eOVF7iceOPtv5Mc0V2afaAceH3D8xeCo/view?usp=sharing 


It has the power and the data connected.


I see there are some Windows based utilities for flashing the dynamixel, but my primary computers are macs (and I will eventually run the dynamixel with raspberri pi). If you think it's middleware I will install the Windows tools and try to flash it.

2020-06-26 01:28:40
01binary
2020-07-03 13:32:50 Will Son

Hi,


The SDK source code is written based on the previous generation PRO series.

Since you have the new generation PH42 model, you should also modify the control table addresses in the source code.

For read_write.cpp example, I've modified below(line #41 - #44) so that the code works with PH42.

// Control table address
#define ADDR_PRO_TORQUE_ENABLE 512 // Control table address is different in Dynamixel model
#define ADDR_PRO_GOAL_POSITION 564
#define ADDR_PRO_PRESENT_POSITION 580


I also noticed that in my previous reply where adding account to dialout group, the last parameter was missing for some reason.

Please make sure to add your account to the dialout group as below.

$ sudo usermod -aG dialout linux_account
$ reboot

In my case where linux user name is "willson", I enter as below

$ sudo usermod -aG dialout willson
$ reboot


Then, I confirmed that the example was running well on my RPi.


 


In order to access more data field in the DYNAMIXEL, please refer to below control table.

https://emanual.robotis.com/docs/en/dxl/p/ph42-020-s300-r/#control-table-of-ram-area 


Thank you.

2020-07-03 13:32:50
willson
2020-06-26 16:04:22 Will Son

Hi,


You might need to add your account to dialout group to access the USB port.

$ sudo usermod -aG dialout 
$ reboot


If you have connected DYNAMIXEL for the first time, it is very unlikely to require Firmware recovery.

However, it is recommended to install DYNAMIXEL Wizard 2.0 which supports all 3 major OS(Windows 10, Linux, Mac OSX, but not on Raspbery Pi) based on x86 CPU.

https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_wizard2/ 


Please see if your DYNAMIXEL is detected from the Wizard 2.0 first.

If it doesn't, proceed the Firmware Recovery and try again.

This process will recover the DYNAMIXEL to factory default settings.


Thank you.

2020-06-26 16:04:22
willson
2020-06-27 03:53:18 Val

Dynamixel Wizard worked on the Mac (in Mac OS), so I confirmed the servo is just fine and hooked up properly. Unfortunately the Wizard isn't even starting in Ubuntu VM on same Mac, and on Raspberri Pi the dynamixel workbench won't build.


I will focus on getting it working on VM and Pi, although so far I'm clueless.

2020-06-27 03:53:18
01binary
2020-06-29 15:26:18 Will Son

Hi,


Unfortunately, DYNAMIXEL Workbench does not build on Raspberry Pi.

If you are going to use Raspberry Pi for DYNAMIXEL Controller, I'd recommend using DYNAMIXEL SDK.

You can download it in the current directory with the command below.

$ git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git 


Once downloaded, you can build under linux_sbc environment as described in the eManual below.

https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/library_setup/cpp_linux/#cpp-linux 


Thank you.

2020-06-29 15:26:18
willson
2020-07-02 11:54:23 Val

I got dynamixel_workbench built on Raspberri Pi by changing the makefile target to SBC from x64.


There are no build or run-time errors, but now I am back to the same problem of the servo not being found. The lights on U2D2 are blinking and USB port shows up & is writable. What are the next steps for troubleshooting the connection? The servo is working with a Mac, so I proved the connections are made correctly, and the servo is functional.


I also tried read_write example with DynamixelSDK as you suggested, and it says "no status packet!". Basically the same issue as with dynamixel_workbench, but you are saying the DynamixelSDK is supposed to work. How do I troubleshoot this further?

2020-07-02 11:54:23
01binary
2020-07-03 10:23:48 Val

Tested more today but getting the same results:


The ping example prints this if the dynamixel ID is set to 1:


Succeeded to open the port!

Succeeded to change the baudrate!

[RxPacketError] Hardware error occurred. Check the error at Control Table (Hardware Error Status)!


If dynamixel ID is set to 0, I see the following


Succeeded to open the port!

Succeeded to change the baudrate!

[TxRxResult] There is no status packet!


The code of ping looks like this. Default baud rate is 57600 and ID is 1 according to what the manual for this product says: http://www.robotis.us/dynamixel-ph42-020-s300-r/


#define DXL_ID                                            // Dynamixel ID: 1

#define BAUDRATE                        57600

#define DEVICENAME                      "/dev/ttyUSB0"      // Check which port is being used on your controller

2020-07-03 10:23:48
01binary
2020-07-03 15:41:11 Val

It was the control table! Thank you. The Dynamixel Wizard must be more up to date than the C++ SDK.

2020-07-03 15:41:11
01binary
2020-07-04 02:48:22 Val

One more question (willson) if you don't mind! find_dynamixel still can't find anything even though read_write works now after modifying the control table.


I am guessing dynamixel workbench is using the control table maps in dynamixel_item.cpp to ping dynamixels:


else if (num == PRO_M42_10_S260_R_A || num == PRO_M54_40_S250_R_A || num == PRO_M54_60_S250_R_A ||
num == PRO_H42_20_S300_R_A || num == PRO_H54_100_S500_R_A || num == PRO_H54_200_S500_R_A)
{
control_table = items_EXTPRO_A;
the_number_of_item = COUNT_EXTPRO_A_ITEMS;
}


Here's the table for "EXT PRO (A Firmware_Version)" that corresponds to my model number PH42-020-S300-R. It completely matches the e-Manual page with control table. It also matches the constants you provided in your reply with the solution.


If this is not the cause of find_dynamixel not finding this servo, do you know what might be the cause? Sorry I have to depend on the forum to answer these questions, but I'm pretty lost because I don't know the intricacies of this product and how it was developed. It seems really nice though, so I would like to figure it out.


//---------------------------------------------------------
// EXT PRO (A Firmware_Version)
//---------------------------------------------------------
static const ControlItem items_EXTPRO_A[]{
{s_Model_Number, 0, sizeof(s_Model_Number) - 1, 2},
{s_Firmware_Version, 6, sizeof(s_Firmware_Version) - 1, 1},
{s_ID, 7, sizeof(s_ID) - 1, 1},
{s_Baud_Rate, 8, sizeof(s_Baud_Rate) - 1, 1},
{s_Return_Delay_Time, 9, sizeof(s_Return_Delay_Time) - 1, 1},
{s_Operating_Mode, 11, sizeof(s_Operating_Mode) - 1, 1},
{s_Homing_Offset, 20, sizeof(s_Homing_Offset) - 1, 4},
{s_Moving_Threshold, 24, sizeof(s_Moving_Threshold) - 1, 4},
{s_Temperature_Limit, 31, sizeof(s_Temperature_Limit) - 1, 1},
{s_Max_Voltage_Limit, 32, sizeof(s_Max_Voltage_Limit) - 1, 2},
{s_Min_Voltage_Limit, 34, sizeof(s_Min_Voltage_Limit) - 1, 2},
{s_Current_Limit, 38, sizeof(s_Current_Limit) - 1, 2},
{s_Acceleration_Limit, 40, sizeof(s_Acceleration_Limit) - 1, 4},
{s_Velocity_Limit, 44, sizeof(s_Velocity_Limit) - 1, 4},
{s_Max_Position_Limit, 48, sizeof(s_Max_Position_Limit) - 1, 4},
{s_Min_Position_Limit, 52, sizeof(s_Min_Position_Limit) - 1, 4},
{s_External_Port_Mode_1, 56, sizeof(s_External_Port_Mode_1) - 1, 1},
{s_External_Port_Mode_2, 57, sizeof(s_External_Port_Mode_2) - 1, 1},
{s_External_Port_Mode_3, 58, sizeof(s_External_Port_Mode_3) - 1, 1},
{s_External_Port_Mode_4, 59, sizeof(s_External_Port_Mode_4) - 1, 1},
{s_Shutdown, 63, sizeof(s_Shutdown) - 1, 1},

{s_Torque_Enable, 512, sizeof(s_Torque_Enable) - 1, 1},
{s_LED_RED, 513, sizeof(s_LED_RED) - 1, 1},
{s_LED_GREEN, 514, sizeof(s_LED_GREEN) - 1, 1},
{s_LED_BLUE, 515, sizeof(s_LED_BLUE) - 1, 1},
{s_Velocity_I_Gain, 524, sizeof(s_Velocity_I_Gain) - 1, 2},
{s_Velocity_P_Gain, 526, sizeof(s_Velocity_P_Gain) - 1, 2},
{s_Position_D_Gain, 528, sizeof(s_Position_D_Gain) - 1, 2},
{s_Position_P_Gain, 532, sizeof(s_Position_P_Gain) - 1, 2},
{s_Position_I_Gain, 530, sizeof(s_Position_I_Gain) - 1, 2},
{s_Goal_Position, 564, sizeof(s_Goal_Position) - 1, 4},
{s_Goal_Velocity, 552, sizeof(s_Goal_Velocity) - 1, 4},
{s_Goal_Current, 604, sizeof(s_Goal_Current) - 1, 2},
{s_Profile_Acceleration, 556, sizeof(s_Profile_Acceleration) - 1, 4},
{s_Profile_Velocity, 560, sizeof(s_Profile_Velocity) - 1, 4},
{s_Moving, 570, sizeof(s_Moving) - 1, 1},
{s_Present_Position, 580, sizeof(s_Present_Position) - 1, 4},
{s_Present_Velocity, 576, sizeof(s_Present_Velocity) - 1, 4},
{s_Present_Current, 574, sizeof(s_Present_Current) - 1, 2},
{s_Present_Input_Voltage, 592, sizeof(s_Present_Input_Voltage) - 1, 2},
{s_Present_Temperature, 594, sizeof(s_Present_Temperature) - 1, 1},
{s_External_Port_Mode_1, 600, sizeof(s_External_Port_Mode_1) - 1, 2},
{s_External_Port_Mode_2, 602, sizeof(s_External_Port_Mode_2) - 1, 2},
{s_External_Port_Mode_3, 604, sizeof(s_External_Port_Mode_3) - 1, 2},
{s_External_Port_Mode_4, 606, sizeof(s_External_Port_Mode_4) - 1, 2}};

#define COUNT_EXTPRO_A_ITEMS (sizeof(items_EXTPRO_A) / sizeof(items_EXTPRO_A[0]))
2020-07-04 02:48:22
01binary
2020-07-06 14:59:54 Will Son

Hi,


Please check if there isn't any error on DYNAMIXEL.

For example, when I was using 12V SMPS for Pro series, the Workbench didn't return any DYNAMIXEL because of the input voltage error.

However, when I used 24V SMPS, I was able to detect connected DYNAMIXEL.


 

2020-07-06 14:59:54
willson
2020-07-07 01:02:41 Val

I am using this here:


http://www.robotis.us/dynamixel-starter-set/ 


It's unfortunate that they just sold it to me without a comment, because that adapter is 12 V. The Power Hub board can handle 24 V, so I am getting a new adapter in a couple of days to see if everything is fixed.


Thank you!

2020-07-07 01:02:41
01binary
2020-07-07 08:50:54 Will Son

Though it is not recommended for operating Pro with 12V, during the test procedure you may try lowering the Minimum Input voltage from 150(15.0V) to 100(10.0V) to avoid the error flag issue.

I'll request our US branch office to append voltage information for the Pro / P series.

Thank you very much for your feedback :)

2020-07-07 08:50:54
willson
2020-07-10 14:49:26 Val

Allright, I think this is done! Phew, what a journey. 24V adapter connected to the power hub did it.



 

2020-07-10 14:49:26
01binary
Reply
웹에디터 시작 웹 에디터 끝