fix for issue/1555 perceverance model rotation

This commit is contained in:
Micah Acinapura
2021-05-26 22:48:58 -04:00
parent b7803688c9
commit 1f45c6ca97
4 changed files with 12 additions and 512 deletions
@@ -1,6 +1,6 @@
--perseverance/model.asset
local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local trail = asset.require('./trail')
local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
-- asset.require('./fov')
@@ -29,7 +29,7 @@ local models = asset.syncedResource({
-- Perseverance Model --
local Perseverance = {
Identifier = "Perseverance",
Parent = transforms.MSL_Body.Identifier,
Parent = trail.PerseveranceNode.Identifier,
GUI = {
Name = "Perseverance",
Path = "/Solar System/Missions/Perseverance"
@@ -56,7 +56,8 @@ local Body = {
Body = "MARS SCIENCE LABORATORY",
GeometryFile = models .. "/Perseverance.obj",
LightSources = LightSources,
PerformShading = false
PerformShading = false,
RotationVector = {65.940000,201.389999,263.980011}
},
GUI = {
Name = "Perseverance Model Body",
@@ -60,10 +60,11 @@ local PerseveranceTrailSun = {
Color = { 0.2, 0.7, 0.1 },
StartTime = startTime,
EndTime = endTime,
SampleInterval = 100
SampleInterval = 100,
Enabled = false
},
GUI = {
Name = "Perseverance Trail",
Name = "Perseverance Trail (Sun)",
Path = "/Solar System/Missions/Perseverance"
}
}
@@ -82,7 +83,8 @@ local PerseveranceTrailMars = {
Color = { 0.7, 0.9, 0.6 },
StartTime = approachMars,
EndTime = endTime,
SampleInterval = 100
SampleInterval = 100,
Enabled = false
},
GUI = {
Name = "Perseverance Trail (Mars)",
@@ -1,503 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms')
local marsAsset = asset.require('scene/solarsystem/planets/mars/mars')
local trailAsset = asset.require('./trail')
local MSL_Body = {
Identifier = "MSL_Body",
Parent = trailAsset.PerseveranceNode.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0, 0.0, 2.8 }
},
Rotation = {
Type = "StaticRotation",
Rotation = { -0.521593,0.648407,2.888407 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- ROBOTIC ARM RA ----
local RA_Base_Location = {
Identifier = "RA_Base_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 1.111, -0.4525, -0.106 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--AZ
local RA_Shoulder_AZ_Location = {
Identifier = "RA_Shoulder_AZ_Location",
Parent = RA_Base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, -0.08 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
----EL
local RA_Shoulder_EL_Location = {
Identifier = "RA_Shoulder_EL_Location",
Parent = RA_Shoulder_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.17, 0.2, -0.005 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--ELBOW
local RA_Elbow_Location = {
Identifier = "RA_Elbow_Location",
Parent = RA_Shoulder_EL_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.83, -0.2, 0.0 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--WRIST
local RA_Wrist_Location = {
Identifier = "RA_Wrist_Location",
Parent = RA_Elbow_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.77, 0.13, 0.035 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--TURRET
local RA_Turret_Location = {
Identifier = "RA_Turret_Location",
Parent = RA_Wrist_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.04, -0.15 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
--MAHLI
local RA_Mahli_Location = {
Identifier = "RA_Mahli_Location",
Parent = RA_Turret_Location.Identifier
}
---- MASTCAM RSM ----
local RSM_ROOT_Location = {
Identifier = "RSM_ROOT_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.7039, 0.5769, -0.563 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_AZ_Location = {
Identifier = "RSM_AZ_Location",
Parent = RSM_ROOT_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.008, 0.0 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_ZERO_EL_Location = {
Identifier = "RSM_ZERO_EL_Location",
Parent = RSM_AZ_Location.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local RSM_EL_Location = {
Identifier = "RSM_EL_Location",
Parent = RSM_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
--Position = {0.0, 0.0, -0.664}
Position = { 0.002, 0.007, -0.688 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- HIGH GAIN ANTENNA HGA ----
local HGA_AZ_Location = {
Identifier = "HGA_AZ_Location",
Parent = MSL_Body.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.46, -0.47, -0.55 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local HGA_EL_Location = {
Identifier = "HGA_EL_Location",
Parent = HGA_AZ_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, -0.17 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- SAM & HEMIN ----
local SAM_Cover_1_Location = {
Identifier = "SAM_Cover_1_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local SAM_Cover_2_Location = {
Identifier = "SAM_Cover_2_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local CHEMIN_Location = {
Identifier = "CHEMIN_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
---- Wheels ----
local Wheel_base_Location = {
Identifier = "Wheel_base_Location",
Parent = MSL_Body.Identifier,
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
-- Left side --
local Leg_1_L_Location = {
Identifier = "Leg_1_L_Location",
Parent = Wheel_base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.217, -0.812, -0.215 } --for the right side
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Leg_2_L_Location = {
Identifier = "Leg_2_L_Location",
Parent = Leg_1_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.74, -0.00380, 0.223 } --CORRECT, DONT CHANGE
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_F_L_Location = {
Identifier = "Wrist_F_L_Location",
Parent = Leg_1_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.8839, -0.2659, 0.2 } --CORRECT, DONT TOUCH
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_F_L_Location = {
Identifier = "Wheel_F_L_Location",
Parent = Wrist_F_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_C_L_Location = {
Identifier = "Wheel_C_L_Location",
Parent = Leg_2_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.45, -0.4, 0.403 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_B_L_Location = {
Identifier = "Wrist_B_L_Location",
Parent = Leg_2_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.627, -0.2635, -0.022 } --CORRECT, DONT CHANGE
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_B_L_Location = {
Identifier = "Wheel_B_L_Location",
Parent = Wrist_B_L_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, -0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
-- wheels, Right Side --
local Leg_1_R_Location = {
Identifier = "Leg_1_R_Location",
Parent = Wheel_base_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.217, 0.812, -0.215 } --Check with caroline!!!
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Leg_2_R_Location = {
Identifier = "Leg_2_R_Location",
Parent = Leg_1_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
--Position = {-0.74, 0.0, 0.24}
Position = { -0.74, 0.00380, 0.223 } --want to use this one, once the center point is changed in maya
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_F_R_Location = {
Identifier = "Wrist_F_R_Location",
Parent = Leg_1_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.882, 0.259, 0.215 }
--Position = {0.8839, 0.2659, 0.2} --position for the Wrist_F_L
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_F_R_Location = {
Identifier = "Wheel_F_R_Location",
Parent = Wrist_F_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_C_R_Location = {
Identifier = "Wheel_C_R_Location",
Parent = Leg_2_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.45, 0.4, 0.403 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wrist_B_R_Location = {
Identifier = "Wrist_B_R_Location",
Parent = Leg_2_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -0.6208, 0.2759, -0.025 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
local Wheel_B_R_Location = {
Identifier = "Wheel_B_R_Location",
Parent = Wrist_B_R_Location.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, -0.0005, 0.426 }
}
},
GUI = {
Path = "/Solar System/Missions/Perseverance/Transforms",
Hidden = true
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
MSL_Body,
RA_Base_Location,
RA_Shoulder_AZ_Location,
RA_Shoulder_EL_Location,
RA_Elbow_Location,
RA_Wrist_Location,
RA_Turret_Location,
RA_Mahli_Location,
RSM_ROOT_Location,
RSM_AZ_Location,
RSM_ZERO_EL_Location,
RSM_EL_Location,
HGA_AZ_Location,
HGA_EL_Location,
SAM_Cover_1_Location,
SAM_Cover_2_Location,
CHEMIN_Location,
Wheel_base_Location,
Leg_1_L_Location,
Leg_2_L_Location,
Wrist_F_L_Location,
Wheel_F_L_Location,
Wheel_C_L_Location,
Wrist_B_L_Location,
Wheel_B_L_Location,
Leg_1_R_Location,
Leg_2_R_Location,
Wrist_F_R_Location,
Wheel_F_R_Location,
Wheel_C_R_Location,
Wrist_B_R_Location,
Wheel_B_R_Location
})
+3 -3
View File
@@ -39,7 +39,7 @@
"is_local": false,
"key": "I",
"name": "Setup scene for insight EDL",
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:01.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
},
{
"documentation": "Disable Mars layer settings used for insight EDL",
@@ -55,7 +55,7 @@
"is_local": false,
"key": "P",
"name": "Setup and Goto Perseverance",
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1674.0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1674.0);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
}
],
"mark_nodes": [
@@ -77,6 +77,6 @@
},
"version": {
"major": 1,
"minor": 1
"minor": 2
}
}