Hello everyone
While using the youbot_driver_rtt component with the youbot_test.lua
script, I faced some trouble with the command:
amove(0, 2, 0.03)
while executing this command the joint was not stopping after the desired
time of 2 seconds.
In order to rectify it I made some changes in the "set_vels(axis, vels)"
function in the youbot_test.lua file.
Following is the corrected function (note that "vel" is changed to "vels"):
local function set_vels(axis, vels)
if not type(vels)=='table' then error("if axis is table then vel
musttoo") end
if not #vels==#axis then error("size of table axis not equal size of
table vel") end
for i,ax in ipairs(axis) do set_vel(ax, vels[i]) end
end
Following this update the corrected behavior of the "amove(0, 2, 0.03)"
command is executed.
I think there was a possible typo and perhaps the change should be
incorporated in the repository!
Best Wishes
Shashank
Possible bug in youbot_test.lua script in youbot_driver_rtt comp
Hi Shashank,
On Tue, May 29, 2012 at 01:41:23PM +0200, shashank sharma wrote:
>
> While using the youbot_driver_rtt component with the youbot_test.lua script, I
> faced some trouble with the command:
>
> amove(0, 2, 0.03)
>
> while executing this command the joint was not stopping after the desired time
> of 2 seconds.
>
> In order to rectify it I made some changes in the "set_vels(axis, vels)"
> function in the youbot_test.lua file.
>
> Following is the corrected function (note that "vel" is changed to "vels"):
>
> local function set_vels(axis, vels)
> if not type(vels)=='table' then error("if axis is table then vel
> musttoo") end
> if not #vels==#axis then error("size of table axis not equal size of
> table vel") end
> for i,ax in ipairs(axis) do set_vel(ax, vels[i]) end
> end
>
> Following this update the corrected behavior of the "amove(0, 2, 0.03)" command
> is executed.
>
> I think there was a possible typo and perhaps the change should be incorporated
> in the repository!
Thanks for reporting, I also stumbled over this recently. I fixed it
on the dev branch (commit id 347587a). I'm planning to release v0.4
soon which additionally will feature some basic self-protection
mechanism, but I would like to upgrade to the latest firmware as soon
as I get my hands on it...
Markus