Created
March 23, 2013 23:49
-
-
Save AtsushiSakai/5229819 to your computer and use it in GitHub Desktop.
座標変換ライブラリtfのlistenerサンプルコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "tf/transform_listener.h" | |
tf::TransformListener tflistener; | |
//それぞれの座標系におけるレーザの点群のデータ変数 | |
sensor_msgs::PointCloud laserPointsRobot; | |
sensor_msgs::PointCloud laserPointsGlobal; | |
//robot座標系におけるレーザ点群の情報の取得 | |
laserPointsRobot=getLaserPoints(); | |
//レーザの点群をrobot座標系からglobal座標系に変換 | |
//変換されたデータはlaserPointsGlobalに格納される. | |
tflistener.transformPointCloud("robot",laserPointsRobot.header.stamp,laserPointsRobot,"global",laserPointsGlobal); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment