RobWorkProject
23.9.11-
|
Utility functions for the rw::kinematics module. More...
#include <Kinematics.hpp>
Static Public Member Functions | |
static math::Transform3D | worldTframe (const rw::core::Ptr< const rw::kinematics::Frame > &to, const rw::kinematics::State &state) |
The transform of frame in relative to the world frame. More... | |
static math::Transform3D | frameTframe (const rw::core::Ptr< const rw::kinematics::Frame > &from, const rw::core::Ptr< const rw::kinematics::Frame > &to, const rw::kinematics::State &state) |
The transform of frame to relative to frame from. More... | |
static std::vector< rw::kinematics::Frame * > | findAllFrames (rw::core::Ptr< rw::kinematics::Frame > root, const rw::kinematics::State &state) |
All frames reachable from root for a tree structure of state. More... | |
static std::vector< rw::kinematics::Frame * > | findAllFrames (rw::core::Ptr< rw::kinematics::Frame > root) |
All frames reachable from root for a tree structure. More... | |
static rw::kinematics::Frame * | worldFrame (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::kinematics::State &state) |
Find the world frame of the workcell by traversing the path from frame to the root of the tree. More... | |
static const Frame * | worldFrame (const rw::core::Ptr< const Frame > &frame, const rw::kinematics::State &state) |
Find the world frame of the workcell by traversing the path from frame to the root of the tree. More... | |
static std::vector< rw::kinematics::Frame * > | childToParentChain (rw::core::Ptr< rw::kinematics::Frame > child, rw::core::Ptr< rw::kinematics::Frame > parent, const rw::kinematics::State &state) |
The chain of frames connecting child to parent. More... | |
static std::vector< rw::kinematics::Frame * > | reverseChildToParentChain (rw::core::Ptr< rw::kinematics::Frame > child, rw::core::Ptr< rw::kinematics::Frame > parent, const rw::kinematics::State &state) |
Like ChildToParentChain() except that the frames are returned in the reverse order. | |
static std::vector< rw::kinematics::Frame * > | parentToChildChain (rw::core::Ptr< rw::kinematics::Frame > parent, rw::core::Ptr< rw::kinematics::Frame > child, const rw::kinematics::State &state) |
The chain of frames connecting parent to child. More... | |
static std::map< std::string, kinematics::Frame * > | buildFrameMap (rw::core::Ptr< kinematics::Frame > root, const kinematics::State &state) |
A map linking frame names to frames. More... | |
static bool | isDAF (rw::core::Ptr< const rw::kinematics::Frame > frame) |
True if frame is a DAF and false otherwise. | |
static bool | isFixedFrame (const rw::core::Ptr< const rw::kinematics::Frame > &frame) |
Check if frame is fixed. More... | |
static void | gripFrame (rw::core::Ptr< rw::kinematics::Frame > item, rw::core::Ptr< rw::kinematics::Frame > gripper, rw::kinematics::State &state) |
Grip item with gripper thereby modifying state. More... | |
static void | gripFrame (MovableFrame *item, rw::core::Ptr< rw::kinematics::Frame > gripper, rw::kinematics::State &state) |
Grip item with gripper thereby modifying state. More... | |
static std::vector< FrameList > | getStaticFrameGroups (rw::core::Ptr< rw::kinematics::Frame > root, const rw::kinematics::State &state) |
Get static frame groups. More... | |
static std::vector< ConstFrameList > | getStaticFrameGroups (rw::core::Ptr< const Frame > root, const rw::kinematics::State &state) |
Get static frame groups. More... | |
static std::vector< ConstFrameList > | getStaticFrameGroups (const Frame *root, const rw::kinematics::State &state) |
Get static frame groups. More... | |
static std::vector< FrameList > | getStaticFrameGroups (Frame *root, const rw::kinematics::State &state) |
Get static frame groups. More... | |
Utility functions for the rw::kinematics module.
|
static |
A map linking frame names to frames.
The map contains an entry for every frame below root in the tree with structure described by state.
root | [in] Root of the kinematics tree to search. |
state | [in] The kinematics tree structure. |
|
static |
The chain of frames connecting child to parent.
child is included in the chain, but parent is not included. If parent is NULL then the entire path from child to the world frame is returned. If child as well as parent is NULL then the empty chain is gracefully returned.
The state gives the connectedness of the tree.
If parent is not on the chain from child towards the root, then an exception is thrown.
|
static |
All frames reachable from root for a tree structure.
This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.
We give no guarantee on the ordering of the frames.
DAF are not included.
root | [in] The root node from where the frame search is started. |
|
static |
All frames reachable from root for a tree structure of state.
This is a tremendously useful utility. An alternative would be to have an iterator interface for trees represented by work cell states.
We give no guarantee on the ordering of the frames.
root | [in] The root node from where the frame search is started. |
state | [in] The structure of the tree. |
|
static |
The transform of frame to relative to frame from.
FrameTframe() is related to WorldTframe() as follows:
from | [in] The start frame. |
to | [in] The end frame. |
state | [in] The state of the kinematics tree. |
|
static |
Get static frame groups.
A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group.
root | [in] the root frame of the tree to search. |
state | [in] containing information about the current tree state and the Dynamically Attachable Frames (DAF). |
|
static |
Get static frame groups.
A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group.
root | [in] the root frame of the tree to search. |
state | [in] containing information about the current tree state and the Dynamically Attachable Frames (DAF). |
|
static |
Get static frame groups.
A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group.
root | [in] the root frame of the tree to search. |
state | [in] containing information about the current tree state and the Dynamically Attachable Frames (DAF). |
|
static |
Get static frame groups.
A static frame group consist of frames that are fixed with respect to the other frames in the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static group.
root | [in] the root frame of the tree to search. |
state | [in] containing information about the current tree state and the Dynamically Attachable Frames (DAF). |
|
static |
Grip item with gripper thereby modifying state.
item must be a DAF.
item | [in] the frame to grip. |
gripper | [in] the grasping frame. |
state | [in/out] the state. |
An | exception is thrown if item is not a DAF. |
|
static |
Grip item with gripper thereby modifying state.
item must be a DAF.
item | [in] the frame to grip. |
gripper | [in] the grasping frame. |
state | [in/out] the state. |
An | exception is thrown if item is not a DAF. |
|
static |
Check if frame is fixed.
frame | [in] the frame. |
|
static |
The chain of frames connecting parent to child.
parent is included in the list, but child is excluded. If parent as well as child is NULL then the empty chain is returned. Otherwise parent is included even if parent is NULL.
|
static |
Find the world frame of the workcell by traversing the path from frame to the root of the tree.
The state state is needed to retrieve the parent frames, but the world frame returned is the same for any (valid) state.
|
static |
Find the world frame of the workcell by traversing the path from frame to the root of the tree.
The state state is needed to retrieve the parent frames, but the world frame returned is the same for any (valid) state.
|
static |
The transform of frame in relative to the world frame.
If to=NULL the method returns a \( 4 \times 4 \) identify matrix
to | [in] The transform for which to find the world frame. |
state | [in] The state of the kinematics tree. |