# Robot state while tele-operating

**URL:** <https://forum.hello-robot.com/t/robot-state-while-tele-operating/663>\
**Category:** Ask\
**Created:** [April 7, 2023, 8:47pm UTC](https://forum.hello-robot.com/t/robot-state-while-tele-operating/663 "2023-04-07T20:47:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjung](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/arjung/32/410_2.png) [@arjung](https://forum.hello-robot.com/u/arjung)\
**Post date:** [April 7, 2023, 8:47pm UTC](https://forum.hello-robot.com/t/robot-state-while-tele-operating/663/1 "2023-04-07T20:47:27Z")

</div>

Is there a way to record the robot state (joint angles) while tele-operating the robot (either using the xbox controller or a keyboard)? I wasn’t able to find this in any of the tutorials. Thanks!

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [April 10, 2023, 2:56am UTC](https://forum.hello-robot.com/t/robot-state-while-tele-operating/663/2 "2023-04-10T02:56:15Z")

</div>

Hi @arjung, interesting question! Yes, you have a few ways to do this. If you’re working with ROS and using keyboard teleop, you would subscribe to the `/stretch/joint_states` topic for bounded joints and to the `map` or `odom` TF frame for the mobile base pose. Here’s a [ROS tutorial](https://docs.hello-robot.com/0.2/stretch-tutorials/ros1/internal_state_of_stretch/) on subscribing to joint state. If you’re working with Stretch Body, you have the “status dictionaries” which report the current position, velocity, effort, etc. of each joint. Here’s a [Python tutorial](https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/tutorial_introduction/#the-robot-status) on using those dictionaries.

---

<div class="post-metadata">

**Author:** ![arjung](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/arjung/32/410_2.png) [@arjung](https://forum.hello-robot.com/u/arjung)\
**Post date:** [April 10, 2023, 5:56am UTC](https://forum.hello-robot.com/t/robot-state-while-tele-operating/663/3 "2023-04-10T05:56:40Z")

</div>

Hi @bshah, this is exactly what I was looking for. Thanks so much!

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [April 10, 2023, 6:43pm UTC](https://forum.hello-robot.com/t/robot-state-while-tele-operating/663/4 "2023-04-10T18:43:29Z")

</div>

Glad to hear it! By the way, if you’re interested in creating a motion replay tool (i.e. the robot replays motions that you’ve teleop-ed), I recommend checking out this thread about recording and replaying mobile base movements. In particular, Dr. Charlie Kemp’s reply has useful pointers and things to consider when building that kind of tool.

> [@Base motion replay](https://forum.hello-robot.com/t/base-motion-replay/222/4):
>
> Hi @jianrenw! Thanks for posting this. I wanted to provide additional information about two aspects of your question that might impact you and others in the community. Timing Matters As Aaron touched on in his response, a smoothly varying trajectory for a joint is currently achieved by sending a new motion command before the previous motion command has finished. The [game controller teleoperation code](https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_xbox_controller_teleop.py) provides a good example of this. Each joint’s motor controller generates smooth motion that d…
