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

Getting endpoint states of robot

asked 2014-07-02 13:21:36 -0500

grisam gravatar image

updated 2014-07-02 13:52:37 -0500

I'm using a Baxter and I want to get the endpoint states of my robot. The endpoint states are located in the topic


and on the terminal I can echo this topic to get the endpoint states. Running this would yield:

x: some double
y: some double
z: some double

I only need the pose x y and z position data. My guess is to get this, I need to subscribe to this topic, but I'm not sure how I would subscribe to it to get just that data.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-02 14:31:10 -0500

allenh1 gravatar image

There are two ways to do this:

  1. subscribe to the topic. This is the easy way. I highly recommend this method as apposed to the following. You will just take the message and use the parts you need. If you are using C++ or Java, you will use the variables like you would a struct.

  2. Please don't do this to yourself... The other method would be to interpret the echo as a string, and parse through it. This is extremely unnecessary, and will only slow things down.

edit flag offensive delete link more


I have no intention of doing the latter, and I've been stuck on number 1. for a couple days now. When I subscribe to the topic, how do I only extract the information I need, i.e. the x y and z of the pose? As in how would the callback work?

grisam gravatar image grisam  ( 2014-07-02 14:35:42 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-02 13:21:36 -0500

Seen: 632 times

Last updated: Jul 02 '14