UBCSailbot / raye-local-pathfinding

UBC Sailbot's Local Pathfinding Repository: OMPL-based pathfinding that avoids upwind/downwind sailing, minimizes turning, and minimizes path length.
https://www.ubcsailbot.org/
MIT License
2 stars 0 forks source link

Handle global wind speed is 0 #270

Closed tylerlum closed 2 years ago

tylerlum commented 2 years ago

When global wind speed is 0, then the direction is measningless. However, we look at the direction wrt the boat's path direction to decide if we are upwind/downwind. THEREFORE, we should have a check that says no upwind/downwind if global wind speed is 0.

tylerlum commented 2 years ago

Also, ensure we handle the 0 global wind speed situation correctly in general.

patrick-5546 commented 2 years ago

Relevant code

https://github.com/UBCSailbot/local-pathfinding/blob/5259485a46a1b11c73f961a503d20eb9f8401c9f/python/main_loop.py#L115-L117

patrick-5546 commented 2 years ago

Also, ensure we handle the 0 global wind speed situation correctly in general.

What needs to be checked?

tylerlum commented 2 years ago

When wind speed is 0, the wind direction is ambiguous. 0 length vector has no direction. Therefore, the planning that uses wind direction might be kinda dumb (may think it's going upwind or downwind, when it does not).

patrick-5546 commented 2 years ago

Could use a threshold instead of just 0; see #271

patrick-5546 commented 2 years ago

Brainstorming:

jamenkaye commented 2 years ago

Current plan: make a low wind threshold below which the local path doesn't get updated. Also, this threshold ideally would depend on the wind direction compared to the direction we're trying to sail in. The threshold should be lower for downwind sailing, because we will still be floating in the right direction. Currently thinking the threshold should be 3knots ish, but this should be tuned after on water testing.

patrick-5546 commented 2 years ago

Add filtering logic in ros_interface.py so that it can be used for both pathfinding and controls

jamenkaye commented 2 years ago

Expected speed of raye in m/s as a function of wind angle for different wind speeds raye_vpp_estimated .