17 from sr_robot_commander.sr_robot_state_exporter
import SrRobotStateExporter
20 The following example shows how to use the warehouse state exporter to save 21 robot states from the warehouse as plain text python files. States can be 22 extracted one by one, as a list of state names, or all states from a named 23 trajectory can be extracted together. 25 Once states have been extracted, the resulting dictionary can be exported to 26 a specified file location. The generated file can then be used as a modules 27 for importing into subsequent scripts. 36 'interpolate_time': 3.0
40 'interpolate_time': 3.0,
45 state_exporter = SrRobotStateExporter()
51 state_exporter.extract_one_state(
"state_1")
52 state_exporter.extract_one_state(
"state_2")
55 state_exporter.extract_list([
'state_1',
'state_2'])
58 state_exporter.extract_from_trajectory(trajectory)
61 state_exporter.extract_all()
64 state_exporter.output_module(
"/tmp/exported_states.py")