#include <Block.h>
Public Types | |
using | Ptr = std::shared_ptr< DummyInvisibleBlock > |
![]() | |
using | Ptr = std::shared_ptr< Simulable > |
Public Member Functions | |
void | add_sensor (const SensorBase::Ptr &sensor) |
virtual void | apply_force ([[maybe_unused]] const mrpt::math::TVector2D &force, [[maybe_unused]] const mrpt::math::TPoint2D &applyPoint) override |
virtual void | create_multibody_system (b2World &) |
DummyInvisibleBlock (World *parent) | |
virtual double | getMass () const |
virtual float | getMaxBlockRadius () const |
virtual void | simul_post_timestep (const TSimulContext &context) override |
virtual void | simul_pre_timestep (const TSimulContext &context) override |
![]() | |
const std::optional< Shape2p5 > & | collisionShape () const |
void | customVisualVisible (const bool visible) |
bool | customVisualVisible () const |
virtual void | guiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical) |
World * | parent () |
const World * | parent () const |
void | showCollisionShape (bool show) |
VisualObject (World *parent, bool insertCustomVizIntoViz=true, bool insertCustomVizIntoPhysical=true) | |
virtual | ~VisualObject () |
![]() | |
virtual void | apply_force (const mrpt::math::TVector2D &force, const mrpt::math::TPoint2D &applyPoint=mrpt::math::TPoint2D(0, 0)) |
const b2Body * | b2d_body () const |
b2Body * | b2d_body () |
virtual void | freeOpenGLResources () |
mrpt::poses::CPose2D | getCPose2D () const |
Alternative to getPose() More... | |
mrpt::poses::CPose3D | getCPose3D () const |
Alternative to getPose() More... | |
mrpt::math::TVector3D | getLinearAcceleration () const |
const std::string & | getName () const |
mrpt::math::TPose3D | getPose () const |
mrpt::math::TPose3D | getPoseNoLock () const |
No thread-safe version. Used internally only. More... | |
World * | getSimulableWorldObject () |
const World * | getSimulableWorldObject () const |
mrpt::math::TTwist2D | getTwist () const |
mrpt::math::TTwist2D | getVelocityLocal () const |
bool | hadCollision () const |
bool | isInCollision () const |
virtual VisualObject * | meAsVisualObject () |
void | resetCollisionFlag () |
void | setName (const std::string &s) |
void | setPose (const mrpt::math::TPose3D &p) const |
void | setTwist (const mrpt::math::TTwist2D &dq) const |
Simulable (World *parent) | |
Static Public Member Functions | |
static Ptr | factory (World *parent, const rapidxml::xml_node< char > *xml_node) |
static Ptr | factory (World *parent, const std::string &xml_text) |
![]() | |
static void | FreeOpenGLResources () |
Protected Member Functions | |
void | internalGuiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, [[maybe_unused]] bool childrenOnly) override |
void | registerOnServer (mvsim::Client &c) override |
![]() | |
void | addCustomVisualization (const mrpt::opengl::CRenderizable::Ptr &glModel, const mrpt::poses::CPose3D &modelPose={}, const float modelScale=1.0f, const std::string &modelName="group", const std::optional< std::string > &modelURI=std::nullopt, const bool initialShowBoundingBox=false) |
virtual void | internalGuiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly=false)=0 |
bool | parseVisual (const rapidxml::xml_node< char > &rootNode) |
Returns true if there is at least one <visual>...</visual> entry. More... | |
bool | parseVisual (const JointXMLnode<> &rootNode) |
void | setCollisionShape (const Shape2p5 &cs) |
Private Attributes | |
TListSensors | sensors_ |
Sensors aboard. More... | |
Additional Inherited Members | |
![]() | |
static double | GeometryEpsilon = 1e-3 |
![]() | |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCollision_ |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCustomVisual_ |
int32_t | glCustomVisualId_ = -1 |
const bool | insertCustomVizIntoPhysical_ = true |
const bool | insertCustomVizIntoViz_ = true |
World * | world_ |
![]() | |
std::string | name_ |
An invisible block which can be used as an auxiliary anchor object.
using mvsim::DummyInvisibleBlock::Ptr = std::shared_ptr<DummyInvisibleBlock> |
DummyInvisibleBlock::DummyInvisibleBlock | ( | World * | parent | ) |
|
inline |
|
inlineoverridevirtual |
|
static |
Class factory: Creates a block from XML description of type "<block>...</block>".
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinevirtual |
|
inlinevirtual |
|
overrideprotected |
|
inlineoverrideprotectedvirtual |
Reimplemented from mvsim::Simulable.
|
inlineoverridevirtual |
Override to do any required process right after the integration of dynamic equations for each timestep. IMPORTANT: Reimplementations MUST also call this base method, since it is in charge of important tasks (e.g. update q_, dq_)
Reimplemented from mvsim::Simulable.
|
inlineoverridevirtual |
Process right before the integration of dynamic equations for each timestep: set action forces from motors, update friction models, etc.
Reimplemented from mvsim::Simulable.
|
private |