Motor dutycycle numbering

Hi!

I completed the code to get the pwm of each wheel using the code suggested in the link below.

pwm_msg1.data = 1-RosbotDrive::getInstance().getSpeed((RosbotMotNum)0, SpeedMode::DUTY_CYCLE);
pwm_msg2.data = 1-RosbotDrive::getInstance().getSpeed((RosbotMotNum)1, SpeedMode::DUTY_CYCLE);
pwm_msg3.data = 1-RosbotDrive::getInstance().getSpeed((RosbotMotNum)2, SpeedMode::DUTY_CYCLE);
pwm_msg4.data = 1-RosbotDrive::getInstance().getSpeed((RosbotMotNum)3, SpeedMode::DUTY_CYCLE);

There is one thing I want to check.

The index of the motor is from 0 to 3.

Please check which index represents which wheel.

0 : Front Left
1 : Front Right
2 : Rear Left
3 : Rear Right

Is this index correct?

Thank you!

Today, I check the index.

I Think 0 : Front Right 1 : Rear Right 2 : Rear Left and 3 : Front Left are correct.

How do you think?

Hi chokings

According to rosbot-stm32-firmware/src/rosbot_kinematics.h motors are in following order:

#define MOTOR_FR MOTOR1
#define MOTOR_FL MOTOR4
#define MOTOR_RR MOTOR2
#define MOTOR_RL MOTOR3

Best regards,
Krzysztof Wojciechowski.

1 Like