Implementation:CARLA simulator Carla WalkerBoneControlIn
| Knowledge Sources | |
|---|---|
| Domains | Pedestrian Control, RPC Serialization |
| Last Updated | 2026-02-15 05:00 GMT |
Overview
WalkerBoneControlIn is an RPC-serializable class that carries a collection of bone transform commands to control individual skeleton bones of a pedestrian walker in the CARLA simulation.
Description
Defined in the carla::rpc namespace (~52 lines), this class wraps a vector of BoneTransformDataIn pairs, where each entry maps a bone name (string) to a transform. This enables direct skeletal animation control of walker actors, allowing clients to set specific bone positions and rotations. When compiled within UE4, the class converts to FWalkerBoneControlIn by mapping bone names via ToFString and adding entries to the UE4 TMap.
Usage
Use this type when programmatically controlling the skeleton pose of pedestrian walkers, such as setting custom animations or applying motion capture data.
Code Reference
Source Location
- Repository: CARLA
- File:
LibCarla/source/carla/rpc/WalkerBoneControlIn.h
Signature
namespace carla {
namespace rpc {
class WalkerBoneControlIn {
public:
WalkerBoneControlIn() = default;
explicit WalkerBoneControlIn(
std::vector<rpc::BoneTransformDataIn> bone_transforms);
std::vector<rpc::BoneTransformDataIn> bone_transforms;
MSGPACK_DEFINE_ARRAY(bone_transforms);
};
} // namespace rpc
} // namespace carla
Import
#include "carla/rpc/WalkerBoneControlIn.h"
I/O Contract
| Field | Type | Default | Description |
|---|---|---|---|
| bone_transforms | std::vector<BoneTransformDataIn> |
empty | List of (bone_name, transform) pairs to apply |
Usage Examples
#include "carla/rpc/WalkerBoneControlIn.h"
carla::rpc::WalkerBoneControlIn bone_control;
// Set a specific bone transform
carla::rpc::BoneTransformDataIn bone_data;
bone_data.first = "crl_spine__C";
bone_data.second = some_transform;
bone_control.bone_transforms.push_back(bone_data);
// Apply bone control to walker
walker->SetBonesTransform(bone_control);