# Record and save robot data as csv

**URL:** <https://forum.hello-robot.com/t/record-and-save-robot-data-as-csv/848>\
**Category:** Ask\
**Created:** [November 16, 2023, 11:55am UTC](https://forum.hello-robot.com/t/record-and-save-robot-data-as-csv/848 "2023-11-16T11:55:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roboor](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@roboor](https://forum.hello-robot.com/u/roboor)\
**Post date:** [November 16, 2023, 11:55am UTC](https://forum.hello-robot.com/t/record-and-save-robot-data-as-csv/848/1 "2023-11-16T11:55:42Z")

</div>

Hi guys,

For experiments it is useful to record and save the joint and sensor data, like x,y,z orientation and coordinates of the base\_link.

Is there a common best practice to do so?  
Else how do I access this data in a python script to create a csv file?

Best,  
Noor

---

<div class="post-metadata">

**Author:** ![jesusrdz](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/jesusrdz/32/580_2.png) [@jesusrdz](https://forum.hello-robot.com/u/jesusrdz)\
**Post date:** [November 20, 2023, 10:45pm UTC](https://forum.hello-robot.com/t/record-and-save-robot-data-as-csv/848/2 "2023-11-20T22:45:44Z")

</div>

Hi @roboor ,

In Stretch we have a dictionary called **status** , from the Stretch Body, if you are using the robot class you just have to get this status with the information that you are trying to get, take a look at this example, in a terminal run ipython3 and try the following:

```auto
In [1]: import stretch_body.robot

r=stretch_body.robot.Robot()

r.startup()

In [2]: r.pimu.status['imu']

In [3]: r.base.status

In [4]: r.base.status['pos']

In [5]: r.arm.status

```

This are only some examples that you can retrieve data from, when you run the status without a flag it’s going to print you all the data from that specific class, like the input 3 and 4, with this you can search for the data that you want to save from one specific joint and sensor. The base status is the one that has x, y and theta (z) that you may be looking for. You can also take a look at this tutorial from our docs about [Accessing the Status Dictionaries](https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/tutorial_robot_sensors/#accessing-the-status-dictionaries).

If you want to go further and replay your motion data check out [this thread for the base motion](https://forum.hello-robot.com/t/base-motion-replay/222/4), here is some information that may help you understand better.
