Robot state while tele-operating

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!

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 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 on using those dictionaries.

1 Like

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

1 Like

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.