Ask Your Question

Accessing previous estimated joint states of a robot

asked 2018-04-07 13:22:08 -0500

Sahand_Rez gravatar image

updated 2018-04-07 13:53:42 -0500


I am new to ROS and I am trying to implement a Kalman filter for estimating the joints velocity and acceleration of a robotic manipulator.

The angular position of each joint is published to the topic /j2n6s300/joint_states, and the 'estimate_joint_states' node subscribes to that topic to get the data. Now I want the estimation to be done within 'estimate_joint_states' node and published to another topic /j2n6s300/estimated_joint_states. However, in each iteration of the Kalman filter, the previous estimates of the system (angular position, velocity and acceleration) are required. What is the "ROS way" to access that data? Can the node estimate_joint_states subscribe to /j2n6s300/estimated_joint_states (the topic in which it is also publishing) and then use its data in the next time step? Or is there a better way to access the previous estimated states?

I know it is possible to write a node which subscribes and publishes at the same time. But is it also possible to implement a node which subscribes to two topics and publishes in to one of them?

I am implementing in python by the way.

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-07 13:24:51 -0500

gvdhoorn gravatar image

What you ask (subscribe to your own topic) is possible, but in this case it seems strange: if estimate_joint_states calculates the estimate, why not keep it around in a local variable and reuse it in the next iteration?

edit flag offensive delete link more


Thanks a lot for pointing that out! I wasn't at all thinking about something this simple.

Sahand_Rez gravatar image Sahand_Rez  ( 2018-04-07 13:50:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-04-07 13:22:08 -0500

Seen: 116 times

Last updated: Apr 07 '18