ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The format for just the PoseStamped message will be:

{ 
    header: { 
        seq:    <int>, 
        stamp:  {
            secs: <int>,
            nsecs: <int>
        }
        frame_id: <string>
    }
    pose: {
        position: {
            x: <float>,
            y: <float>,
            z: <float>
        },
        orientation: {
            x: <float>,
            y: <float>,
            z: <float>,
            w: <float>
        }
    }
}

The entire JSON message that you would send to rosbridge to publish the message would be:

{
    receiver: "/topic",
    type: "geometry_msgs/PoseStamped",
    msg: { ...as above... }
}

Cheers, Jon

The format for just the PoseStamped message will be:

{ 
    header: { 
        seq:  <int>, 
        stamp:  {
            secs: <int>,
            nsecs: <int>
        }
        frame_id: <string>
    }
    pose: {
        position: {
            x: <float>,
            y: <float>,
            z: <float>
        },
        orientation: {
            x: <float>,
            y: <float>,
            z: <float>,
            w: <float>
        }
    }
}

The entire JSON message that you would send to rosbridge to publish the message would be:

{
    receiver: "/topic",
    type: "geometry_msgs/PoseStamped",
    msg: { ...as above... }
}

Cheers, Jon

The format for just the structure of geometry_msgs/PoseStamped is documented here: http://ros.org/doc/api/geometry_msgs/html/msg/PoseStamped.html

A PoseStamped message will be:in JSON would therefore look as follows:

{ 
    header: { 
        seq: <int>, 
        stamp:  {
            secs: <int>,
            nsecs: <int>
        }
        frame_id: <string>
    }
    pose: {
        position: {
            x: <float>,
            y: <float>,
            z: <float>
        },
        orientation: {
            x: <float>,
            y: <float>,
            z: <float>,
            w: <float>
        }
    }
}

The entire JSON message that you would send to rosbridge to publish the message would be:

{
    receiver: "/topic",
    type: "geometry_msgs/PoseStamped",
    msg: { ...as above... }
}

Cheers, Jon

The structure of geometry_msgs/PoseStamped is documented here: http://ros.org/doc/api/geometry_msgs/html/msg/PoseStamped.html

A PoseStamped message in JSON would therefore look as follows:

{ 
    header: { 
        seq: <int>, 
        stamp:  {
            secs: <int>,
            nsecs: <int>
        }
},
        frame_id: <string>
    }
},
    pose: {
        position: {
            x: <float>,
            y: <float>,
            z: <float>
        },
        orientation: {
            x: <float>,
            y: <float>,
            z: <float>,
            w: <float>
        }
    }
}

The entire JSON message that you would send to rosbridge to publish the message would be:

{
    receiver: "/topic",
    type: "geometry_msgs/PoseStamped",
    msg: { ...as above... }
}

Cheers, Jon