ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Like shade said, since your angular velocity seems you should limit your angular range

Like shade said, since your angular velocity seems to be constantly 0, you should limit your angular range to something significantly smaller than a whole range scan.

The real problem of you approach is that you scan point by point and decide for each one. This seems completely wrong. What could be better is first loop through all points (with a single for) and if there is a point that is below your threshold (eg 0.8 meters) then decelerate if not continue. Also for lowering the speed gradually you should use vel=vel*0.8 or something similar.

Like shade said, since your angular velocity seems to be constantly 0, you should limit your angular range to something significantly smaller than a whole range scan.

The real problem of you approach is that you scan point by point and decide for each one. This seems completely wrong. This way your robot will decide for EVERY point in your laser scan (probably changing it's mind a lot of times within one scan). What could be better is for each scan first loop through all points (with a single for) and if there is a point that is below your threshold (eg 0.8 meters) then decelerate if not continue. decelerate. Also for lowering the speed gradually you should use vel=vel*0.8 or something similar.

Like shade said, since your angular velocity seems to be constantly 0, you should limit your angular range to something significantly smaller than a whole range scan.

The real problem of you approach is that you scan point by point and decide for each one. This seems completely wrong. This way your robot will decide for EVERY point in your laser scan (probably changing it's mind a lot of times within one scan). What could be better is for each scan first loop through all points (with a single for) and if there is a point that is below your threshold (eg 0.8 meters) then decelerate. Also for lowering the speed gradually you should use might consider using vel=vel*0.8 or something similar.