candlewick 0.7.0-59-g23c6
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
14 RobotDebugSystem(DebugScene &scene, const pin::Model &model,
15 const pin::Data &data)
16 : IDebugSubSystem(scene), m_robotModel(&model), m_robotData(&data) {}
17
18 entt::entity addFrameTriad(pin::FrameIndex frame_id,
19 const Float3 &scale = Float3::Constant(0.3333f));
20
21 entt::entity addFrameVelocityArrow(pin::FrameIndex frame_id,
22 float scale = 0.5f);
23
29 void update() override;
30
32
34 this->destroyEntities();
35 this->m_robotModel = nullptr;
36 this->m_robotData = nullptr;
37 }
38
39 void reload(const pin::Model &model, const pin::Data &data) {
40 this->destroyEntities();
41 this->m_robotModel = &model;
42 this->m_robotData = &data;
43 }
44
45private:
46 pin::Model const *m_robotModel;
47 pin::Data const *m_robotData;
48};
49
50} // namespace candlewick::multibody
Scene for organizing debug entities and render systems.
Definition DebugScene.h:50
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
IDebugSubSystem(DebugScene &scene)
Definition DebugScene.h:30
void reload(const pin::Model &model, const pin::Data &data)
Definition RobotDebug.h:39
entt::entity addFrameVelocityArrow(pin::FrameIndex frame_id, float scale=0.5f)
void update() override
Update the transform components for the debug visual entities, according to their frame placements an...
RobotDebugSystem(DebugScene &scene, const pin::Model &model, const pin::Data &data)
Definition RobotDebug.h:14
~RobotDebugSystem()
Definition RobotDebug.h:33
entt::entity addFrameTriad(pin::FrameIndex frame_id, const Float3 &scale=Float3::Constant(0.3333f))