CARLA
 
载入中...
搜索中...
未找到
ActorROS2Handler.cpp
浏览该文件的文档.
1// Copyright (c) 2023 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#include "ActorROS2Handler.h"
8
11
13{
14 if (!_Actor) return;
15
16 ACarlaWheeledVehicle *Vehicle = Cast<ACarlaWheeledVehicle>(_Actor);
17 if (!Vehicle) return;
18
19 // setup control values
20 FVehicleControl NewControl;
21 NewControl.Throttle = Source.throttle;
22 NewControl.Steer = Source.steer;
23 NewControl.Brake = Source.brake;
24 NewControl.bHandBrake = Source.hand_brake;
25 NewControl.bReverse = Source.reverse;
26 NewControl.bManualGearShift = Source.manual_gear_shift;
27 NewControl.Gear = Source.gear;
28
29 Vehicle->ApplyVehicleControl(NewControl, EVehicleInputPriority::User);
30}
Base class for CARLA wheeled vehicles.
void operator()(carla::ros2::VehicleControl &Source)