daenny / collvoid

ROS multi_robot_collision_avoidance
http://wiki.ros.org/multi_robot_collision_avoidance
82 stars 37 forks source link

Is it a bug? #2

Closed housx closed 7 years ago

housx commented 8 years ago

Hi,Daniel Claes: I am loking at the code,and have some puzzled to ask you. There is a function A define as "size_t linearProgram2(const std::vector &lines, float radius, const Vector2 &optVelocity, bool dirOpt,Vector2 &result);".

But the A is called by the function B"void Agent::computeOrcaVelocity" like below: { ................................. size_t line_fail = linearProgram2(orcalines, max_speedx, pref_velocity, false, newvelocity); }

The second param 'float radius' is cover by 'max_speedx',is it a bug or just the param's name is inappropriate.

Thank you !

daenny commented 7 years ago

Hi, sorry for the late reply. This comes from the official ORCA implementation. They approximate the achievable speeds by a circle, i.e. the robot can move in all directions equally fast. This is the radius meant here. So that is why it is max_speed_x.