13 #include <mrpt/math/TPoint2D.h>
14 #include <mrpt/math/TPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 #include <mrpt/poses/CPose3DInterpolator.h>
19 #include <shared_mutex>
42 using Ptr = std::shared_ptr<Simulable>;
61 const mrpt::math::TVector2D& force,
62 const mrpt::math::TPoint2D& applyPoint = mrpt::math::TPoint2D(0, 0));
71 mrpt::math::TPose3D
getPose()
const;
82 mrpt::math::TTwist2D
getTwist()
const;
92 void setPose(
const mrpt::math::TPose3D& p,
bool notifyChange =
true)
const;
98 void setTwist(
const mrpt::math::TTwist2D& dq)
const;
138 [[maybe_unused]]
const mrpt::math::TPoint2D& worldXY)
const
152 b2Body* b2dBody_ =
nullptr;
160 virtual void notifySimulableSetPose([[maybe_unused]]
const mrpt::math::TPose3D& newPose)
166 World* simulable_parent_ =
nullptr;
169 mutable std::shared_mutex q_mtx_;
172 mrpt::math::TPose3D q_ = mrpt::math::TPose3D::Identity();
175 mrpt::math::TTwist2D dq_{0, 0, 0};
178 mrpt::math::TVector3D ddq_lin_{0, 0, 0};
180 mrpt::math::TPose3D former_q_;
184 mrpt::math::TPose3D initial_q_ = mrpt::math::TPose3D::Identity();
186 std::optional<mrpt::poses::CPose3DInterpolator> anim_keyframes_path_;
191 bool isInCollision_ =
false;
197 bool hadCollisionFlag_ =
false;
200 std::string publishPoseTopic_;
202 std::string publishRelativePoseTopic_;
203 std::vector<std::string> publishRelativePoseOfOtherObjects_;
205 double publishPosePeriod_ = 100e-3;
206 double publishPoseLastTime_ = 0;