Project

General

Profile

tf2 component

This module was started to provide an interface between open_robots::pose_estimator and ROS tf. The goal was to display these pose/frame in rviz You need to connect each or_pose_estimator::state port to the multiple in or_pose_estimator::state (with a name) then you can add this Pose to tf (with its parent, its refresh period, etc. A similar mechanism has been setup for forces which get translated to ROS wrenchs, and speeds to ROS twist. They can then be displayed in the proper frame in rviz.

Ports

Poses (multiple in)

Data structure
  • struct ::or_pose_estimator::state Poses

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::pos_cov > pos_cov

      • double cov[6]

    • optional< struct ::or::t3d::att_cov > att_cov

      • double cov[10]

    • optional< struct ::or::t3d::att_pos_cov > att_pos_cov

      • double cov[12]

    • optional< struct ::or::t3d::vel_cov > vel_cov

      • double cov[6]

    • optional< struct ::or::t3d::avel_cov > avel_cov

      • double cov[6]

    • optional< struct ::or::t3d::acc_cov > acc_cov

      • double cov[6]

    • optional< struct ::or::t3d::aacc_cov > aacc_cov

      • double cov[6]

The GenoM or_pose_estimators you want to push in ROS tf.


Forces (multiple in)

Data structure
  • struct ::or::rb3d::force Forces

    • double x

    • double y

    • double z

Force ports we want to push as geometry_msgs/WrenchStamped.msg.


Speeds (multiple in)

Data structure
  • struct ::or_rigid_body::state Speeds

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::jerk > jerk

      • double jx

      • double jy

      • double jz

    • optional< struct ::or::t3d::snap > snap

      • double sx

      • double sy

      • double sz

Twist ports we want to push as geometry_msgs/TwistStamped.msg.


OccupancyGrid (in)

Data structure
  • struct ::og::nav_msgs_OccupancyGrid OccupancyGrid

    • struct ::og::std_msgs_header header

      • unsigned long seq

      • struct ::og::msgs_time stamp

        • unsigned long sec

        • unsigned long nsec

      • string frame_id

    • struct ::og::nav_msgs_MapMetaData info

      • struct ::og::msgs_time map_load_time

        • unsigned long sec

        • unsigned long nsec

      • float resolution

      • unsigned long width

      • unsigned long height

      • struct ::og::geometry_msgs_Pose origin

        • struct ::og::geometry_msgs_Point position

          • double x

          • double y

          • double z

        • struct ::og::geometry_msgs_Quaternion orientation

          • double x

          • double y

          • double z

          • double w

    • sequence< octet > data

To visualise the map in rviz.


Services

SetVerbose (attribute)

Inputs
  • short verbose (default "0") Verbose level

Set the verbose level.


Init (function)

Do the ROS init.


AddOccupancyGrid (function)

Inputs
  • string<128> name ROS topic name

  • long ms_period (default "10") Refresh period in ms

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add an OccupancyGrid (only one) ROS nav_msgs/OccupancyGrid.msg.


AddWrench (function)

Inputs
  • string<128> name Port name in the Forces sequence

  • string<128> frame Frame in which it is defined

  • string<128> topic Topic name to publish

  • string<128> frame Frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add an OpenRobot wrench to be transformed in a ROS geometry_msgs/WrenchStamped.msg.


AddWrenchFromPose (function)

Inputs
  • string<128> name Port name in the Forces sequence

  • string<128> frame Frame in which it is defined

  • string<128> topic Topic name to publish

  • string<128> frame Frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add an OpenRobot wrench to be transformed in a ROS geometry_msgs/WrenchStamped.msg.


AddTwist (function)

Inputs
  • string<128> name Port name in the Speeds sequence

  • string<128> frame Frame in which it is defined

  • string<128> topic Topic name to publish

  • string<128> frame Frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add an OpenRobot speed in a or_rigid_body::state to be transformed in a ROS geometry_msgs/TwistStamped.msg.


AddTwistFromPose (function)

Inputs
  • string<128> name Port name in the Poses sequence

  • string<128> frame Frame in which it is defined

  • string<128> topic Topic name to publish

  • string<128> frame Frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add an OpenRobot Pose speed field to be transformed in a ROS geometry_msgs/TwistStamped.msg.


AddDynamicTF (function)

Inputs
  • string<128> name Name in the Poses sequence

  • string<128> parent_frame Parent frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

  • boolean undef_in_orig If True, will be displayed in origin when undefined

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add a Pose to be broadcasted to TF2 at ms_period.


AddOdometry (function)

Inputs
  • string<128> name Name in the Poses sequence

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::not_defined

Add an already existing Pose to be broadcasted as Odometry.msg .


SetOdometryDisplay (function)

Inputs
  • string<128> name Name in the Poses sequence

  • boolean show

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::not_defined

Silence or unsilence an odometry…​


AddDynamicPosTF (function)

Inputs
  • string<128> name Name in the Poses sequence

  • string<128> parent_frame Parent frame in which it is defined

  • long ms_period (default "100") Refresh period in ms

  • boolean undef_in_orig If True, will be displayed in origin when undefined

Throws
  • exception ::tf2::e_mem

  • exception ::tf2::already_defined

Add a Position only (not att, like gps) Pose to be broadcasted to TF2 at ms_period.


PublishStaticTF (function)

Inputs
  • string<128> name Name in the Poses sequence

  • string<128> parent_frame Parent frame in which it is defined

  • double x

  • double y

  • double z

  • double roll

  • double pitch

  • double yaw

Static TF.


Tasks

RGPPTF

Context
Throws
  • exception ::tf2::bad_port