candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
RobotDebug.h
Go to the documentation of this file.
1#pragma once
2
3#include "Multibody.h"
4#include "Components.h"
6
7namespace candlewick::multibody {
8
14 inline static const Float3 DEFAULT_TRIAD_SCALE = Float3::Constant(0.3333f);
15
16 RobotDebugSystem(const pin::Model &model, const pin::Data &data)
17 : IDebugSubSystem(), m_robotModel(model), m_robotData(data) {}
18
19 entt::entity addFrameTriad(DebugScene &scene, pin::FrameIndex frame_id,
20 const Float3 &scale = DEFAULT_TRIAD_SCALE);
21
22 entt::entity addFrameVelocityArrow(DebugScene &scene,
23 pin::FrameIndex frame_id);
24
30 void update(DebugScene &scene) {
31 updateFrames(scene.registry());
32 updateFrameVelocities(scene.registry());
33 }
34
35private:
36 void updateFrames(entt::registry &reg);
37 void updateFrameVelocities(entt::registry &reg);
38
39 const pin::Model &m_robotModel;
40 const pin::Data &m_robotData;
41};
42
43} // namespace candlewick::multibody
Scene for organizing debug entities and render systems.
Definition DebugScene.h:42
entt::registry & registry()
Definition DebugScene.h:63
Support for the Pinocchio rigid-body algorithms library and the Coal collision detection library.
Definition Components.h:5
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:16
static const Float3 DEFAULT_TRIAD_SCALE
Definition RobotDebug.h:14
void update(DebugScene &scene)
Update the visualization of the frame placements and their velocities.
Definition RobotDebug.h:30