You've already forked LuckyWorld
FT - Primitive WebSocket Actuators Control
+ Optionally allow remote control of the robot + Direct set of actuators, this should pass by the layer controler for proper interpolation
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
#include "Robot/PilotComponent/RobotPilotSO100Component.h"
|
||||
|
||||
#include "LuckyDataTransferSubsystem.h"
|
||||
#include "Actors/MujocoVolumeActor.h"
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "Robot/RobotPawn.h"
|
||||
@ -85,6 +87,14 @@ void URobotPilotSO100Component::SetRobotCurrentRewardZone(const FTransform& Rewa
|
||||
bDropZoneIsRight = FVector::DotProduct(RobotOwner->RobotActor->GetActorRotation().Quaternion().GetRightVector(), DirectionToTarget) > 0.f;
|
||||
}
|
||||
|
||||
void URobotPilotSO100Component::ReceiveRemoteCommand(const FRemoteControlPayload& RemoteRobotPayload)
|
||||
{
|
||||
for (const auto& [ActuatorName, ActuatorValue] : RemoteRobotPayload.Commands)
|
||||
{
|
||||
// Will print an error message if it doesn't exists
|
||||
RobotOwner->PhysicsSceneProxy->SetActuatorValue(ActuatorName, ActuatorValue);
|
||||
}
|
||||
}
|
||||
|
||||
void URobotPilotSO100Component::PrintCurrentActuators() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user