当前位置:网站首页>21、 TF coordinate transformation (I): coordinate MSG message

21、 TF coordinate transformation (I): coordinate MSG message

2022-07-28 14:54:00 Rock magnon

One 、 introduction

In the process of robot movement , Need to sense the orientation of surrounding objects through sensors . Because the sensor and robot are not in the same coordinate system , So we need to transform the coordinate system . stay ROS in , It directly encapsulates the relevant modules : Coordinate transformation (TF)
stay ROS In the system , The object is calibrated through the right-hand coordinate system , As shown in the figure below :
 Insert picture description here

be relative to tf,tf2 More concise and efficient , Common function packs include :

  • tf2_geometry_msgs: Can be ROS The message is converted to tf2 news .

  • tf2: Encapsulates common messages of coordinate transformation .

  • tf2_ros: by tf2 Provides roscpp and rospy binding , Encapsulates the commonly used coordinate transformation API

Two 、 coordinate msg news

2.1 Commonly used msg

  • geometry_msgs/TransformStamped: Transmit position information related to different coordinate systems
    std_msgs/Header header                     # Header information 
    uint32 seq                                #|--  Serial number 
    time stamp                                #|--  Time stamp 
    string frame_id                            #|--  coordinate  ID
    string child_frame_id                    # Of the sub coordinate system  id
    geometry_msgs/Transform transform        # Coordinate information 
    geometry_msgs/Vector3 translation        # Offset 
        float64 x                                #|-- X  Offset of direction 
        float64 y                                #|-- Y  Offset of direction 
        float64 z                                #|-- Z  The offset in the direction 
    geometry_msgs/Quaternion rotation        # Four yuan number 
        float64 x                                
        float64 y                                
        float64 z                                
        float64 w
    
  • geometry_msgs/PointStamped: Transmit the information of coordinate points in a coordinate system
    std_msgs/Header header                    # head 
    uint32 seq                                #|--  Serial number 
    time stamp                                #|--  Time stamp 
    string frame_id                            #|--  Of the coordinate system  id
    geometry_msgs/Point point                # Point coordinates 
    float64 x                                    #|-- x y z  coordinate 
    float64 y
    float64 z
    
原网站

版权声明
本文为[Rock magnon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/196/202207130924519816.html