[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

Package Summary

Library for computing transformations in arbitrary graph structures.

Use GitHub to report bugs or submit feature requests. [View active issues]

Overview

transform_graph is a library for computing transformations between coordinate frames in an arbitrary graph structure.

Quick start

The library's generated documentation explains how to use transform_graph in detail. Below are a few quick examples illustrating how it can be used.

transform_graph::Graph maintains the graph of transformations and is the primary interface to transform_graph:

   1 #include "transform_graph/transform_graph.h"
   2 
   3 int main(int argc, char** argv) {
   4   transform_graph::Graph graph; 
   5   return 0;
   6 }

Add frames to the graph using transform_graph::Graph::Add:

   1 transform_graph::Graph graph;
   2 
   3 geometry_msgs::Pose torso_pose;
   4 pose.position.z = 0.4;
   5 pose.orientation.w = 1;
   6 
   7 graph.Add("torso_lift_link", transform_graph::RefFrame("base_link"), torso_pose);

Get points in different frames using transform_graph::Graph::DescribePosition. In this example, we want to know what a point 10 cm in front of the robot's wrist is, expressed in the base frame:

   1 geometry_msgs::Point pt;
   2 pt.x = 0.1;
   3 transform_graph::Transform pt_in_base;
   4 graph.DescribePosition(pt, transform_graph::Source("wrist"), transform_graph::Target("base_link"), &pt_in_base);
   5 Eigen::Vector3d v = pt_in_base.vector();


2024-11-16 17:49