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

[Autoware] What the magic number 3.6 mean?

asked 2020-05-18 03:25:53 -0500

harderthan gravatar image

Hello, experts. What the magic number 3.6 on astar_avoid.cpp mean?

avoid_start_velocity_ / 3.6

the avoid_velocity value is a flag to switch the planning logic like this.

bool avoid_velocity = (current_velocity_.twist.linear.x < avoid_start_velocity_ / 3.6);  
....
else if (state_ == AstarAvoid::STATE::STOPPING)
{
  bool replan = ((ros::WallTime::now() - start_plan_time).toSec() > replan_interval_);

  if (!found_obstacle)
  {
    ROS_INFO("STOPPING -> RELAYING, Obstacle disappers");
    state_ = AstarAvoid::STATE::RELAYING;
  }
  else if (replan && avoid_velocity)
  {
    ROS_INFO("STOPPING -> PLANNING, Start A* planning");
    state_ = AstarAvoid::STATE::PLANNING;
  }
}

I couldn't understand why it have to be 3.6. Does it have a reason mathmatically?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
4

answered 2020-05-18 03:48:29 -0500

Kenji Miyake gravatar image

It's from the conversion between mps and kmph. 36 kmph = 36000m / 3600s = 10 mps, so mps = kmph / 3.6

edit flag offensive delete link more

Comments

did you use astar_navi? have you succesed? i meet some trouble!you can see my problem。do you have any suggestion?thanks you !!!!

rosli gravatar image rosli  ( 2020-12-09 08:15:30 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2020-05-18 03:25:53 -0500

Seen: 155 times

Last updated: May 18 '20