Skip to content

Commit

Permalink
Update example to be movement sensor
Browse files Browse the repository at this point in the history
Tested
  • Loading branch information
sguequierre committed Jan 6, 2025
1 parent 17387c4 commit 4beca91
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/viam/app/data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,17 +1345,23 @@ async def tabular_data_capture_upload(
::
from datetime import datetime
time_requested = datetime(2023, 6, 5, 11)
time_received = datetime(2023, 6, 5, 11, 0, 3)
file_id = await data_client.tabular_data_capture_upload(
part_id="INSERT YOUR PART ID",
component_type='rdk:component:motor',
component_name='left_motor',
method_name='IsPowered',
tags=["tag_1", "tag_2"],
component_type='rdk:component:movement_sensor',
component_name='my_movement_sensor',
method_name='Readings',
tags=["sensor_data"],
data_request_times=[(time_requested, time_received)],
tabular_data=[{'PowerPCT': 0, 'IsPowered': False}]
tabular_data=[{
'readings': {
'linear_velocity': {'x': 0.5, 'y': 0.0, 'z': 0.0},
'angular_velocity': {'x': 0.0, 'y': 0.0, 'z': 0.1}
}
}]
)
Args:
Expand Down

0 comments on commit 4beca91

Please sign in to comment.