Guide local goals around observed obstacles and finish native recovery
This commit is contained in:
@@ -118,3 +118,23 @@ def test_native_module_identity_includes_behavior_helpers(monkeypatch,helper):
|
||||
after=identities()
|
||||
assert before['simulation-nav2-navigation']!=after['simulation-nav2-navigation']
|
||||
assert before['simulation-waypoint-mission']==after['simulation-waypoint-mission']
|
||||
|
||||
|
||||
@pytest.mark.parametrize('kind', ['overhang-ground','physical-object','track-ground'])
|
||||
def test_spin_selection_keeps_body_and_track_surface_domains_separate(motion,kind):
|
||||
from differential_motion import alignment_angle
|
||||
from navigation.footprint import Footprint
|
||||
geometry=dict(length_m=1.2,width_m=.6,collision_length_m=1.8,
|
||||
max_step_m=.1,max_slope_degrees=25.,ground_contact=dict(
|
||||
schema_version='missioncore.ground-contact/v1',model='two-track-bottom-bands',
|
||||
bands=[dict(side='left',lower_xy_m=[-.4,.2],upper_xy_m=[.3,.3]),
|
||||
dict(side='right',lower_xy_m=[-.4,-.3],upper_xy_m=[.3,-.2])]))
|
||||
monitor=Footprint(geometry)
|
||||
floor=np.array([[i*.05,j*.05,0.,0.] for i in range(-30,31) for j in range(-30,31)])
|
||||
point=np.array([[0.,-.45 if kind=='track-ground' else -.82,0.,1.]])
|
||||
terrain=np.r_[floor,point]
|
||||
collision=terrain.copy()
|
||||
if kind!='physical-object':collision[-1,3]=0.
|
||||
angle=alignment_angle(pose(),[0.,2.,0.],terrain,[],monitor,.37,
|
||||
collision_terrain=collision)
|
||||
assert (angle is not None) == (kind=='overhang-ground')
|
||||
|
||||
Reference in New Issue
Block a user