RBX1 inverse kinematics


#1

Hello,

I menaged to make the direct kinematics on my rbx1 project just using python and numpy, however the inverse kinematics is the real challenge. I know there is some programs in ROS out there that can help, but making learning and understanding how to use ROS from scratch is as hard (ive been trying just to make gazebo work for months).

Anyway, my direct kinematics give me rotation and position, given each joint angle. Anyone know a easy to use reverse kinematic solver? I also know that for each position, there will be 8 possibility of joints configuration on a 6 axis arm.


#2

So I actually solved the reverse kinematic on the 6 axis arm, i can actually give coordinates and tool orientation to the arm and it will calculate the angles needed for each joint and move there.

There is still no lineare trajectory since I didnt manage to control the motors speed with enough precision yet. I will make the jacobian matrixes for speed calculation next, but the .setMaxSpeed command seems to round up my values.


#3

Hi olivier,

Seems like you are making great progress.

Note, you can only read and write integer values to the L6470 motor driver. I’m also having similar issues with my T-Bot - I need to reduce the speed of one of the stepper motors when drawing a diagonal line, and set max speed does not accept decimal values.


#4

Found any way to control the speed with a more precise value? Is it the driver or the library programmed that is accepting only integer value?


#5

Hi olivier,

It’s the actual L6470 chip, which can only accept values from 0 to 1023 (MAX_SPEED). The method setMaxSpeed() will convert the decimal value to a rounded integer.

I’ve managed to resolve my issue by using Step Clock mode - my program generates a step, to rotate the stepper motor a number of times.


#6

Can you tell me more about this step clock mode? I wonder if there is any way to control the speed with precision? Ive tryed to make the motors move in a for loop with very small incremental move but that make the arm twitch alot. This method was working fine on servo motors too.


#7

Here’s the video which made me use Step Clock mode, Coordinated stepper motor control (arduino), instead of using the methods provided by the L6470 chip.

Motor.py has a method called stepClock(self, dir), and you only use setCurrent(self, hold, run, acc, dec) and setMicroSteps(self, microSteps). To get the required speed, you pass in the appropriate parameter for hold, and you set the delay between steps (similar, to what is shown in the video).

You need to use the constant e.g. MTR0_StepClock which is defined in file SlushEngine_ModelX.py, and the coding will look something like this,

# Set pin
gpio.setup(SLX.MTR0_StepClock, gpio.OUT)

# Perform 1 step, i.e. 1.8 degrees
gpio.output(SLX.MTR0_StepClock, gpio.LOW)
gpio.output(SLX.MTR0_StepClock, gpio.HIGH)

#8

Thank you for sharing this.

Ive also started a new project, im gona make my own robot arm from sratch since the rbx1 is too weak and big for my liking. Ive found out that 27:1 ratio gearbox is where the torque to weight ratio start to get decent with steppers motor. The lost of speed isnt too bad at this point, to compare, the rbx1 elbow ratio is around 22. I tryed a 5:1 nema 14 vs a 27:1 nema 14, and with the same output speed, the 27:1 was much stronger and much more suitable for a robot arm project.