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

Position Control Problems: OpenCR 1.0 with Dynamixel XM430-W350-R #138

Open
hdavidjensen opened this issue Jan 28, 2025 · 0 comments
Open

Comments

@hdavidjensen
Copy link

Hello I am trying use the position control function with my Dynamixel XM430-W350-R on an OpenCR 1.0 board.

It will move to one position but only once, if I have two positions in the same loop it will only go to one of them, and then after that it won't move at all, even in response to any changes I make in the raw position numbers.

I have been able to utilize the velocity operating mode but not this.

I wanted to use Dynamixel Wizard 2.0 to troubleshoot, but it won't recognize the device, and upon following the instructions to update the firmware to fix this, I get a message that says (Port Open Failed) and I know the comm port I am using is correct.

This is the code I am using:

#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial3
#define DEBUG_SERIAL Serial
const int DXL_DIR_PIN = 84;

const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 2.0;

Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);

//This namespace is required to use Control table item names
using namespace ControlTableItem;

void setup() {
// put your setup code here, to run once:
// Use UART port of DYNAMIXEL Shield to debug.
DEBUG_SERIAL.begin(115200);

// Set Port baudrate to 57600bps. This has to match with DYNAMIXEL baudrate.
dxl.begin(57600);
// Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
dxl.setPortProtocolVersion(2.0);

// Get DYNAMIXEL information
dxl.ping(DXL_ID);

// Turn off torque when configuring items in EEPROM area
dxl.torqueOff(DXL_ID);
delay(1000);
dxl.ledOn(DXL_ID);
DEBUG_SERIAL.println("LED ON");
delay(1000);
dxl.setOperatingMode(DXL_ID, OP_POSITION);
dxl.torqueOn(DXL_ID);
}

void loop() {
// put your main code here, to run repeatedly:
int i_present_position = 0;
i_present_position = dxl.getPresentPosition(DXL_ID);
DEBUG_SERIAL.print("Present_Position(raw) : ");
DEBUG_SERIAL.println(i_present_position);
delay(1000);
dxl.setGoalPosition(DXL_ID, 1);
delay(3000);
dxl.setGoalPosition(DXL_ID, 3000);
delay(3000);
}

Here is the link to the firmware recovery video I already tried but did not work:
https://www.youtube.com/watch?v=FAnVIE_23AA

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

1 participant