Skip to content

Commit 7c901bc

Browse files
committed
more stringent condition to apply arc instead of rotating in place
1 parent 7e05a7b commit 7c901bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/octomap_path_planner_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,10 @@ void OctomapPathPlanner::generateTwistCommand(const geometry_msgs::PointStamped&
485485

486486
const geometry_msgs::Point& p = local_target.point;
487487

488-
if(p.x < 0)
488+
if(p.x < 0 || fabs(p.y) > p.x)
489489
{
490490
// turn in place
491-
twist.angular.z = 1.0 * twist_angular_gain_;
491+
twist.angular.z = (p.y > 0 ? 1 : -1) * twist_angular_gain_;
492492
}
493493
else
494494
{

0 commit comments

Comments
 (0)