Robot movement after collision
Posted: Thu Dec 05, 2013 5:58 pm
I have a couple of robots in my argos3 application that move around. Occasionally, they bump into each other, at which point they use the diffuctionVector from the argos foraging example (footbot_foraging.cpp file) to move away from each other. That's all fine. However, sometimes a robot after a head-on collision would not move, even if nothing is in its way. I originally thought that was just a bug in my code, but I am reading the values set to the wheels and the values from the differential steering sensor and they all seem fine.
If the maximum wheel speed is e.g. set to 20, then I can read that the values sent to are 20, 20. Afterwards, values read by the
are also correct, 0.02 and 0.02.
However, visually, the robot keeps rotating at one spot, as if one wheel was not getting any actual speed. It is only when another robot comes and hits it so that it moves a bit that the robot actually continues moving correctly.
Needles to say, this completely screws up odometry. Have you every noticed anything similar? Is there an easy fix?
If the maximum wheel speed is e.g. set to 20, then I can read that the values sent to
Code: Select all
wheels->SetLinearVelocity(left_, right_);
Code: Select all
const CCI_DifferentialSteeringSensor::SReading& steeringData = steeringSensor->GetReading();
interWheel = steeringData.WheelAxisLength * 0.01;
distR = steeringData.CoveredDistanceRightWheel * 0.01;
distL = steeringData.CoveredDistanceLeftWheel * 0.01;
However, visually, the robot keeps rotating at one spot, as if one wheel was not getting any actual speed. It is only when another robot comes and hits it so that it moves a bit that the robot actually continues moving correctly.
Needles to say, this completely screws up odometry. Have you every noticed anything similar? Is there an easy fix?