jdelacroix / simiam

A MATLAB-based educational bridge between theory and practice in robotics.
http://gritslab.gatech.edu/projects/robot-simulator
Other
104 stars 52 forks source link

About the max w speed #7

Closed BlueBirdHouse closed 10 years ago

BlueBirdHouse commented 10 years ago

From: DifferentialDrive < simiam.robot.dynamics.Dynamics The function: function pose_t_1 = apply_dynamics(obj, pose_t, dt, vel_r, vell) …… w = R/L(vel_r-vel_l); …… If vel_r_R = -vel_l_R = max = 0.196m/s (for firmware > 3.0) I think the w to max w = 2_0.196/0.08841 = 4.434 And I think if the firmware < 3.0, the robot is faster. You set the limit in: function [vel_r, vel_l] = limit_speeds(obj, vel_r, vel_l) … w = max(min(w,2.276),-2.2763); Why it seems slow? Is there something have to consider?

jdelacroix commented 10 years ago

I used the motion_arrowkeys program (from the Khepera III Toolbox) to capture the left and right wheel speed parameters for full speed ahead and full speed turns. During a full speed ahead maneuver, the motion_arrowkeys program reports 50000,50000 (right,left), which corresponds to an approximate linear velocity of 0.3148m/s. During a full speed right turn, the motion_arrowkey program reports 66000,34000 (right,left), which corresponds to an approximate linear velocity of 0.3148m/s and an angular velocity of -2.267rad/s.

It seems that a low-level motor controller ensures that you can maintain the maximum linear velocity independent of angular velocity. I will check this week if the angular velocity can be greater than +/-2.267rad/s when the linear velocity is less than 0.3148m/s.

BlueBirdHouse commented 10 years ago

The rotation rate for each wheel is defined by hardware and can be infer from the V_max/Radius, and the v and w of the vehicle is related, use the rotation rate for each wheel may easy, I think.

BlueBirdHouse commented 10 years ago

From the robo's manual, the speed (for program ) is +-43000 in regulation mode. Unable to 50000 for both frame ware .

jdelacroix commented 10 years ago

Unless I am mistaken in my calculations, 43000 would translate into a linear velocity of approximately 0.271m/s. I'm using the speed factor found in http://ftp.k-team.com/KorebotII/software/common/libkorebot/api/html/index.html, specifically MM_S_TO_SPEED_FIRMWARE_S_3, since it corresponds to firmware < 3.0.

I'm fairly certain that our K3s can travel faster than than 0.271m/s. I will check this week to confirm. I want to ensure that the simulation respects the limitations of the hardware.

jdelacroix commented 10 years ago

I can confirm that we can command the motors in the range of [-50000,50000] without any rotation, and +/- 16000 for any rotations. For example, if the robot is stationary it can achieve a rotation of [-16000,16000], and if it is at full speed it can achieve a translation and rotation of [34000,66000].

The max rotation while stationary, therefore, is 1.655 rad/s, while the max rotation at full forward speed is 2.276 rad/s.

However, it is probably a better idea to implement the simulator to the spec in the manual, rather than the motion_arrowkeys program from the Khepera III toolbox.

jdelacroix commented 10 years ago

Ok, I changed how the limiters work. Instead of limiting the linear and angular velocity, I am now directly limiting the wheel angular velocity to [-48000, 48000]*(sf/R). I will update this change in the manual, because the implication is that if you specify a wheel velocity of [48000, 66000], the robot will not turn as intended. Any controllers (or supervisors) for this robot need to take that into consideration.

Thanks for pointing me to the manual!