File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Source/RapyutaSimulationPlugins/Private/Tools Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,12 @@ void ASimulationState::GetEntityStateSrv(UROS2GenericSrv* Service)
88
88
}
89
89
AActor* Entity = Entities[Request.name ];
90
90
Response.state_name = Request.name ;
91
- FVector Pos = Entity->GetActorLocation () / 100 .f - RefPos;
91
+ FVector Pos = RefQuat. Inverse (). RotateVector ( Entity->GetActorLocation () / 100 .f - RefPos) ;
92
92
Response.state_pose_position_x = Pos.X ;
93
93
Response.state_pose_position_y = Pos.Y ;
94
94
Response.state_pose_position_z = Pos.Z ;
95
95
Response.state_pose_orientation = Entity->GetActorQuat () * RefQuat.Inverse ();
96
+ Response.state_pose_orientation .Normalize ();
96
97
LeftToRight (Response.state_pose_position_x ,
97
98
Response.state_pose_position_y ,
98
99
Response.state_pose_position_z ,
You can’t perform that action at this time.
0 commit comments