candlewick 0.6.0
A tiny cross-platform renderer based on SDL3
Loading...
Searching...
No Matches
RobotDebug.h
Go to the documentation of this file.
1#pragma once
2
3#include "Multibody.h"
5
6namespace candlewick::multibody {
7
13 inline static const Float3 DEFAULT_TRIAD_SCALE = Float3::Constant(0.3333f);
14
15 RobotDebugSystem(const pin::Model &model, const pin::Data &data)
16 : IDebugSubSystem(), m_robotModel(model), m_robotData(data) {}
17
18 entt::entity addFrameTriad(DebugScene &scene, pin::FrameIndex frame_id,
19 const Float3 &scale = DEFAULT_TRIAD_SCALE);
20
21 entt::entity addFrameVelocityArrow(DebugScene &scene,
22 pin::FrameIndex frame_id);
23
29 void update(DebugScene &scene) {
30 updateFrames(scene.registry());
31 updateFrameVelocities(scene.registry());
32 }
33
34private:
35 void updateFrames(entt::registry &reg);
36 void updateFrameVelocities(entt::registry &reg);
37
38 const pin::Model &m_robotModel;
39 const pin::Data &m_robotData;
40};
41
42} // namespace candlewick::multibody
Scene for organizing debug entities and render systems.
Definition DebugScene.h:44
entt::registry & registry()
Definition DebugScene.h:62
Support for the Pinocchio rigid-body algorithms library and the Coal collision detection library.
Definition LoadPinocchioGeometry.h:8
Eigen::Vector3f Float3
Definition math_types.h:8
A subsystem for the DebugScene.
Definition DebugScene.h:25
entt::entity addFrameVelocityArrow(DebugScene &scene, pin::FrameIndex frame_id)
entt::entity addFrameTriad(DebugScene &scene, pin::FrameIndex frame_id, const Float3 &scale=DEFAULT_TRIAD_SCALE)
RobotDebugSystem(const pin::Model &model, const pin::Data &data)
Definition RobotDebug.h:15
static const Float3 DEFAULT_TRIAD_SCALE
Definition RobotDebug.h:13
void update(DebugScene &scene)
Update the transform components for the debug visual entities, according to their frame placements an...
Definition RobotDebug.h:29