The machine's frame system: the tree of reference frames viam-server builds from the frame config of every resource. Use it to find where a component is and to move poses and point clouds between frames.
More...
#include "services/framesystem.hpp"
|
|
std::vector< frame_system_config > | get_frame_system_config () |
| | Get the configuration of every frame in the frame system.
|
| |
| virtual std::vector< frame_system_config > | get_frame_system_config (const std::vector< WorldState::transform > &additional_transforms)=0 |
| | Get the configuration of every frame in the frame system.
|
| |
| pose_in_frame | get_pose (const std::string &component_name) |
| | Get the pose of a component in the world reference frame.
|
| |
| pose_in_frame | get_pose (const std::string &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms) |
| | Get the pose of a component in the desired reference frame.
|
| |
| virtual pose_in_frame | get_pose (const std::string &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms, const ProtoStruct &extra)=0 |
| | Get the pose of a component in the desired reference frame.
|
| |
| pose_in_frame | transform_pose (const pose_in_frame &query, const std::string &destination) |
| | Express a pose in a different reference frame.
|
| |
| virtual pose_in_frame | transform_pose (const pose_in_frame &query, const std::string &destination, const std::vector< WorldState::transform > &additional_transforms)=0 |
| | Express a pose in a different reference frame.
|
| |
| virtual std::vector< unsigned char > | transform_pcd (const std::vector< unsigned char > &pcd, const std::string &source, const std::string &destination)=0 |
| | Express a point cloud in a different reference frame.
|
| |
| API | api () const override |
| | Returns the API associated with a particular resource.
|
| |
| Name | get_resource_name () const override |
| | Returns the Name for a particular resource.
|
| |
|
| Resource (std::string name) |
| |
|
| Resource (const ResourceConfig &cfg) |
| | Construct from a resource config. Use this overload to ensure Viam App log filtering works immediately during object construction.
|
| |
|
virtual std::string | name () const |
| | Return the resource's name.
|
| |
|
void | set_log_level (log_level) const |
| | Set the log level for log messages originating from this Resource.
|
| |
|
|
static Name | public_name () |
| | The full resource name of the machine's frame system. Its short name is kPublicName.
|
| |
|
|
static const std::string | kPublicName |
| | The reserved name viam-server publishes the machine's frame system under.
|
| |
The machine's frame system: the tree of reference frames viam-server builds from the frame config of every resource. Use it to find where a component is and to move poses and point clouds between frames.
viam-server owns one frame system per machine and publishes it under the reserved name $framesystem. A modular resource finds it in its Dependencies under that name, and RobotClient::resource_by_name hands it out under that name too. It is never listed in RobotClient::resource_names.
◆ api()
| API viam::sdk::FrameSystem::api |
( |
| ) |
const |
|
overridevirtual |
◆ get_frame_system_config()
Get the configuration of every frame in the frame system.
- Parameters
-
| additional_transforms | Extra frames to add to the frame system for this call only. |
Implemented in viam::sdk::impl::FrameSystemClient.
◆ get_pose() [1/3]
| pose_in_frame viam::sdk::FrameSystem::get_pose |
( |
const std::string & | component_name | ) |
|
|
inline |
Get the pose of a component in the world reference frame.
- Parameters
-
| component_name | The component whose pose is being requested. |
◆ get_pose() [2/3]
| pose_in_frame viam::sdk::FrameSystem::get_pose |
( |
const std::string & | component_name, |
|
|
const std::string & | destination_frame, |
|
|
const std::vector< WorldState::transform > & | supplemental_transforms ) |
|
inline |
Get the pose of a component in the desired reference frame.
- Parameters
-
| component_name | The component whose pose is being requested. |
| destination_frame | The reference frame in which to express the pose. |
| supplemental_transforms | Extra frames needed to compute the pose. |
◆ get_pose() [3/3]
| virtual pose_in_frame viam::sdk::FrameSystem::get_pose |
( |
const std::string & | component_name, |
|
|
const std::string & | destination_frame, |
|
|
const std::vector< WorldState::transform > & | supplemental_transforms, |
|
|
const ProtoStruct & | extra ) |
|
pure virtual |
Get the pose of a component in the desired reference frame.
- Parameters
-
| component_name | The component whose pose is being requested. |
| destination_frame | The reference frame in which to express the pose. |
| supplemental_transforms | Extra frames needed to compute the pose. |
| extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::FrameSystemClient.
◆ transform_pcd()
| virtual std::vector< unsigned char > viam::sdk::FrameSystem::transform_pcd |
( |
const std::vector< unsigned char > & | pcd, |
|
|
const std::string & | source, |
|
|
const std::string & | destination ) |
|
pure virtual |
Express a point cloud in a different reference frame.
- Parameters
-
| pcd | The point cloud, serialized in PCD format. |
| source | The reference frame the point cloud is currently expressed in. |
| destination | The reference frame to express the point cloud in. |
- Returns
- The transformed point cloud, serialized in PCD format as raw PCD bytes.
Implemented in viam::sdk::impl::FrameSystemClient.
◆ transform_pose() [1/2]
Express a pose in a different reference frame.
- Parameters
-
| query | The pose to transform, with the frame it is currently expressed in. |
| destination | The reference frame to express the pose in. |
◆ transform_pose() [2/2]
Express a pose in a different reference frame.
- Parameters
-
| query | The pose to transform, with the frame it is currently expressed in. |
| destination | The reference frame to express the pose in. |
| additional_transforms | Extra frames needed to compute the transform. |
Implemented in viam::sdk::impl::FrameSystemClient.
The documentation for this class was generated from the following file: