3 #ifndef ROBOWFLEX_DART_STRUCTURE_
4 #define ROBOWFLEX_DART_STRUCTURE_
6 #include <dart/dynamics/BoxShape.hpp>
7 #include <dart/dynamics/CylinderShape.hpp>
8 #include <dart/dynamics/SphereShape.hpp>
9 #include <dart/dynamics/MeshShape.hpp>
10 #include <dart/dynamics/RevoluteJoint.hpp>
11 #include <dart/dynamics/PrismaticJoint.hpp>
12 #include <dart/dynamics/FreeJoint.hpp>
13 #include <dart/dynamics/WeldJoint.hpp>
14 #include <dart/dynamics/Skeleton.hpp>
97 const ACMPtr &getACMConst()
const;
102 void setSkeleton(
const dart::dynamics::SkeletonPtr &skeleton);
107 dart::dynamics::SkeletonPtr &getSkeleton();
112 const dart::dynamics::SkeletonPtr &getSkeletonConst()
const;
118 void dumpGraphViz(
std::ostream &out,
bool standalone =
true);
130 void setJoint(
const std::string &name,
double value);
136 void setJoint(
const std::string &name,
const Eigen::Ref<const Eigen::VectorXd> &value);
147 void setDof(
unsigned int index,
double value);
163 dart::dynamics::Joint *getJoint(
const std::string &joint_name)
const;
169 dart::dynamics::BodyNode *getFrame(
const std::string &name =
"")
const;
174 dart::dynamics::BodyNode *getRootFrame()
const;
180 void reparentFreeFrame(dart::dynamics::BodyNode *child,
const std::string &parent =
"");
208 addRevoluteFrame(
const dart::dynamics::RevoluteJoint::Properties &properties,
209 const dart::dynamics::ShapePtr &shape,
210 dart::dynamics::BodyNode *parent =
nullptr);
219 addPrismaticFrame(
const dart::dynamics::PrismaticJoint::Properties &properties,
220 const dart::dynamics::ShapePtr &shape,
221 dart::dynamics::BodyNode *parent =
nullptr);
230 addFreeFrame(
const dart::dynamics::FreeJoint::Properties &properties,
231 const dart::dynamics::ShapePtr &shape,
232 dart::dynamics::BodyNode *parent =
nullptr);
241 addWeldedFrame(
const dart::dynamics::WeldJoint::Properties &properties,
242 const dart::dynamics::ShapePtr &shape,
243 dart::dynamics::BodyNode *parent =
nullptr);
249 void addGround(
double z = 0.,
double radius = 10.);
258 void createShapeNode(dart::dynamics::BodyNode *body,
const dart::dynamics::ShapePtr &shape);
261 dart::dynamics::SkeletonPtr skeleton_{
nullptr};
313 double inner_radius,
double outer_radius,
320 void setColor(dart::dynamics::BodyNode *node,
const Eigen::Vector4d &color);
#define ROBOWFLEX_CLASS_FORWARD(C)
Macro that forward declares a class and defines two shared ptrs types:
A shared pointer wrapper for robowflex::Geometry.
A const shared pointer wrapper for robowflex::Scene.
A shared pointer wrapper for robowflex::darts::ACM.
Allowable collision matrix for robowflex::darts::Structure.
A shared pointer wrapper for robowflex::darts::Structure.
Wrapper class for a dart::dynamics::Skeleton.
ACMPtr acm_
ACM for structure.
virtual ~Structure()=default
Destructor.
static const double DEFAULT_RESTITUTION
static const double DEFAULT_DAMPING
static const double DEFAULT_DENSITY
std::shared_ptr< dart::dynamics::CylinderShape > makeCylinder(double radius, double height)
Create a cylinder.
void setColor(dart::dynamics::BodyNode *node, const Eigen::Vector4d &color)
Sets the color of the shapes on a body node.
std::shared_ptr< dart::dynamics::MeshShape > makeArcsegment(double low, double high, double inner_radius, double outer_radius, std::size_t resolution=32)
Create a circle's arcsector from one angle to another, with a specified radius.
std::shared_ptr< dart::dynamics::SphereShape > makeSphere(double radius)
Create a sphere.
dart::dynamics::ShapePtr makeGeometry(const GeometryPtr &geometry)
Convert a robowflex::Geometry to a Dart Shape.
std::shared_ptr< dart::dynamics::MeshShape > makeMesh(const GeometryPtr &geometry)
Create a mesh from a robowflex::Geometry that contains a mesh.
std::shared_ptr< dart::dynamics::BoxShape > makeBox(const Eigen::Ref< const Eigen::Vector3d > &v)
Create a box.
Main namespace. Contains all library classes and functions.
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.
Functions for loading and animating scenes in Blender.