How to get obstacle velocity from reference line
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 ?
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.
Closing this issue as it appears to be resolved. Feel free to reopen if you have additional questions. Thanks!