apollo icon indicating copy to clipboard operation
apollo copied to clipboard

How to get obstacle velocity from reference line

Open l1212s opened this issue 7 years ago • 2 comments

Hi, Apollo developers,

Current Apollo API provides a way to get speed of obstacle "obstacle->speed()", my understanding is such speed is always positive which means obstacle always move in the same direction as ego vehicle. However, In two-way traffic, obstacles may have opposite direction toward ego vehicle. Is there any API to get the velocity of Obstacle ? positive means same direction and negative means opposite direction with ego vehicle ?

l1212s avatar May 13 '19 01:05 l1212s

The speed is the absolute value of the velocity. There is also a velocity_heading parameter which shows the velocity direction from 0 to 2*PI.

HongyiSun avatar May 13 '19 18:05 HongyiSun

Closing this issue as it appears to be resolved. Feel free to reopen if you have additional questions. Thanks!

natashadsouza avatar May 17 '19 22:05 natashadsouza