ModelNode is a class in the OpenRAVE library written in C++. It is used to represent a single node in a robot or object's kinematic tree. The class provides methods for setting and getting the transformation matrix, as well as for adding and removing child nodes.
Example 1:
// Creating a ModelNode for a robot's base link OpenRAVE::RobotBasePtr robot = env->GetRobot("my_robot"); OpenRAVE::KinBody::LinkPtr base_link = robot->GetLink("base_link"); OpenRAVE::ModelNodePtr base_node = OpenRAVE::RaveCreateModelNode(env, ""); base_node->SetTransform(base_link->GetTransform()); robot->SetModelNode(base_node);
This code creates a ModelNode for the base link of a robot, sets its transformation to match the base link's transform, and associates it with the robot.
Example 2:
// Adding a child node to a ModelNode OpenRAVE::ModelNodePtr parent_node = ...; OpenRAVE::ModelNodePtr child_node = OpenRAVE::RaveCreateModelNode(env, ""); parent_node->AddChild(child_node);
This code adds a new child node to a ModelNode.
Package/library: OpenRAVE.
C++ (Cpp) ModelNode - 30 examples found. These are the top rated real world C++ (Cpp) examples of ModelNode extracted from open source projects. You can rate examples to help us improve the quality of examples.