Skip to content

Commit

Permalink
fixing static poses + optimizing change exposure and map changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marinagmoreira committed May 8, 2024
1 parent b1a20da commit eda8e8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 45 deletions.
22 changes: 11 additions & 11 deletions astrobee/survey/survey_manager/data/iss_survey_static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ bays:
jem_bay7: [11.0, -9.7, 4.8]
jem_bay0: [11.0, -9.7, 4.8]
nod2_bay1: [11.0, -9.7, 4.8]
nod2_bay2: [11.0, -9.7, 4.8]
nod2_bay3: [11.0, -9.7, 4.8]
nod2_bay4: [11.0, -9.7, 4.8]
nod2_bay5: [11.0, -9.7, 4.8]
usl_bay0: [11.0, -9.7, 4.8]
usl_bay1: [11.0, -9.7, 4.8]
usl_bay2: [11.0, -9.7, 4.8]
usl_bay3: [11.0, -9.7, 4.8]
usl_bay4: [11.0, -9.7, 4.8]
usl_bay5: [11.0, -9.7, 4.8]
usl_bay6: [11.0, -9.7, 4.8]
nod2_bay2: [11.0, -1.0, 4.8]
nod2_bay3: [10.0, 0.0, 4.8]
nod2_bay4: [9.0, 0.0, 4.8]
nod2_bay5: [7.8, 0.0, 4.8]
usl_bay0: [5.3, 0.0, 4.8]
usl_bay1: [4.7, 0.0, 4.8]
usl_bay2: [3.65, 0.0, 4.8]
usl_bay3: [2.6, 0.0, 4.8]
usl_bay4: [1.55, 0.0, 4.8]
usl_bay5: [0.5, 0.0, 4.8]
usl_bay6: [-0.5, 0.0, 4.8]

bays_move:
jem_bay1: ["-pos", "11 -4 4.8", "-att", "1.5708 0 0 1"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,45 +70,23 @@ def first_non_zero(a: int, b: int) -> int:


def exposure_change(config_static, bay_origin, bay_destination):
# Going to JEM
if bay_origin == "nod2_bay1" and bay_destination == "jem_bay0":
loginfo("CHANGING EXPOSURE TO JEM")
return config_static["exposure"]["jem"]

# Going to NOD2
if (
bay_origin == "jem_bay0"
and bay_destination == "nod2_bay1"
or bay_origin == "usl_bay0"
and bay_destination == "nod2_bay5"
):
loginfo("CHANGING EXPOSURE TO NOD2")
return config_static["exposure"]["nod2"]

# Going to USL
if bay_origin == "nod2_bay5" and bay_destination == "usl_bay0":
return config_static["exposure"]["usl"]
origin_prefix = bay_origin.split("_")[0]
destination_prefix = bay_destination.split("_")[0]

if origin_prefix != destination_prefix:
loginfo(f"CHANGING EXPOSURE TO {destination_prefix.upper()}")
return config_static["exposure"][destination_prefix]

return 0


def map_change(config_static, bay_origin, bay_destination):
# Going to JEM
if bay_origin == "nod2_bay1" and bay_destination == "jem_bay0":
loginfo("CHANGING MAP TO JEM")
return config_static["maps"]["jem"]
# Going to NOD2
if (
bay_origin == "jem_bay0"
and bay_destination == "nod2_bay1"
or bay_origin == "usl_bay0"
and bay_destination == "nod2_bay5"
):
loginfo("CHANGING MAP TO NOD2")
return config_static["maps"]["nod2"]
# Going to USL
if bay_origin == "nod2_bay5" and bay_destination == "usl_bay0":
return config_static["maps"]["usl"]
origin_prefix = bay_origin.split("_")[0]
destination_prefix = bay_destination.split("_")[0]

if origin_prefix != destination_prefix:
loginfo(f"CHANGING MAP TO {destination_prefix.upper()}")
return config_static["maps"][destination_prefix]
return ""


Expand Down

0 comments on commit eda8e8c

Please sign in to comment.