Class that is a subclass of osg::Group, which is the main object for DART visualization in OpenSceneGraph. It can contain many SkeletonNodes as parts of a simulation world. In essence, a DartNode is the largest visualization object.
More...
Public Member Functions |
|
| DartNode (bool debug=false) |
| | Constructor for DartNode.
|
| void | _updateContactForces () |
| | Creates arrows for contact forces in the world during simulation.
|
| void | setContactForcesVisible (bool makeVisible) |
| | Toggles contact forces visibility on/off.
|
| dart::dynamics::Skeleton * | parseSkeletonUrdf (std::string urdfFile) |
| | Create a dart::dynamics::Skeleton pointer from a skeleton urdf file using DART's DartLoader.
|
| dart::simulation::World * | parseWorldSdf (std::string sdfFile) |
| | Create a dart::simulation::World pointer from a world sdf file using DART's Sdf parser.
|
| dart::simulation::World * | parseWorldUrdf (std::string urdfFile) |
| | Create a dart::simulation::World pointer from a world urdf file using DART's DartLoader.
|
| int | addWorldFromUrdf (std::string urdfFile) |
| | Add a dart::simulation::World to the DartNode using the name of a world urdf file.
|
| size_t | addWorldFromSdf (std::string sdfFile) |
| | Add a dart::simulation::World to the DartNode using the name of a world sdf file.
|
| size_t | addWorld (std::string file) |
| | Add dart::simulation::World to the DartNode using the name of a world file.
|
| size_t | addSkeleton (std::string urdfFile) |
| | Add a dart::dynamics::Skeleton to the DartNode using the name of a skeleton urdf file.
|
| size_t | addSkeleton (dart::dynamics::Skeleton &skeleton) |
| | Add a skeleton to the DartNode.
|
| size_t | addWorld (dart::simulation::World *world) |
| | Add a world to the DartNode. The world may consist of one or more objects or skeletons, all represented as Skeletons, each with a world transformation.
|
| dart::dynamics::Skeleton * | getSkeleton (size_t skeletonIndex=0) |
| | Get skeleton via index (size_t)
|
| int | removeSkeleton (const dart::dynamics::Skeleton *skeletonToRemove) |
| | Remove skeleton from DartNode by passing in the pointer to the dart::dynamics::Skeleton to be removed.
|
| int | removeSkeleton (size_t skeletonIndex=0) |
| | Remove skeleton from DartNode by passing in the index of the skeleton to be removed.
|
| void | reset () |
| | Clear the DartNode. This is used for when you want to start from scratch but don't want to delete and create a new DartNode.
|
| dart::simulation::World * | getWorld () |
| | Get a pointer to the World object in the DartNode.
|
| size_t | getNumSkeletons () |
| | Get number of skeletons in the DartNode.
|
| void | printInfo () |
| | Print out meta information of the skeleton.
|
| void | update () |
| | Updates the transforms of all the dart objects in the SkeletonNodes of the DartNode for the next culling and drawing events.
|
| void | setSkeletonTransparency (const dart::dynamics::Skeleton &skel, float transparencyValue) |
| | Sets the transparency value of the SkeletonNode corresponding to the dart::dynamics::Skeleton passed in.
|
| void | setBodyNodeTransparency (const dart::dynamics::BodyNode &node, float transparencyValue) |
| | Sets the transparency value of the osg::Group corresponding to the dart::dynamics::BodyNode passed in.
|
| void | setJointAxesVisible (bool makeVisible=false) |
| | Shows or hides the individual joint axes. This applies to skeletons with more than one link. A single line with an arrow is displayed representing the axis of rotation of the joint. This currently only applies to revolute joints.
|
| void | setBodyNodeAxesVisible (bool makeVisible=false) |
| | Shows or hides the individual link frames, represented by x,y,z axes using the color scheme red, green, blue, respectively. Currently this function doesn't account for different sized objects so axes may not be visible for larger objects.
|
| void | setSkeletonCoMVisible (bool makeVisible=false) |
| | Shows or hides the skeleton's center of mass, represented by a sphere.
|
| void | setSkeletonCoMProjectedVisible (bool makeVisible=false) |
| | Shows or hides the skeleton's projected center of mass, represented by a circle on the ground.
|
| void | setSkeletonCollisionMeshOn (bool enable=true) |
| | Render the skeleton using the collision mesh instead of the visual mesh.
|
| void | setSkeletonWireFrameOn (bool enable=true) |
| | Render the skeleton using wireframe instead of fill mode.
|
| void | hideSkeleton (int i) |
| | Hide a skeleton.
|
Protected Member Functions |
| int | skeletonIndexIsValid (size_t skeletonIndex) |
| | Helper function to determine if the index the user passed in to specify a skeleton is valid.
|
Protected Attributes |
|
dart::simulation::World * | _world |
| | Standard vector of pointers to Skeletons.
|
std::vector
< dart::dynamics::Skeleton * > | _skeletons |
| | Standard vector of pointers to dart::dynamics::Skeleton objects.
|
std::vector< osg::ref_ptr
< SkeletonNode > > | _skeletonNodes |
| | Standard vector of pointers to SkeletonNode objects.
|
|
SkeletonNodeMap | _skelNodeMap |
| | Map from dart::dynamics::Skeleton* to osg::SkeletonNode.
|
std::vector< osg::ref_ptr
< osgDart::ContactForceVisual > > | _contactForceArrows |
| | Array of osg::MatrixTransforms representing contactForces in the world.
|
|
const bool | _debug |
| | Debug variable for whether or not to print debug output.
|
|
bool | _showContactForces |
| | Whether or not to show the contact forces in the visualization.
|
Class that is a subclass of osg::Group, which is the main object for DART visualization in OpenSceneGraph. It can contain many SkeletonNodes as parts of a simulation world. In essence, a DartNode is the largest visualization object.