-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun_gc_demo.py
30 lines (27 loc) · 1.26 KB
/
run_gc_demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Script to demonstrate "Floating" Robot Demo.
Joint torques are set to 0.
Robot gravity compensation must be enabled!
"""
from joint_demo import GravityCompDemo
import argparse
parser = argparse.ArgumentParser(
description="Test controllers and measure errors.")
parser.add_argument('--world', default=None,
help='World type for the demo, uses config file if not specified', choices=['Bullet', 'Real'])
parser.add_argument('--num_steps', default=500, type=int,
help="max steps for demo.")
parser.add_argument('--plot_pos', action="store_true",
help="whether to plot positions of demo.")
parser.add_argument('--plot_error', action="store_true",
help="whether to plot errors.")
parser.add_argument('--save', action="store_true",
help="whether to store data to file")
parser.add_argument('--demo_name', default=None,
type=str, help="Valid filename for demo.")
parser.add_argument('--save_fig', action="store_true",
help="whether to save pngs of plots")
parser.add_argument('--config_file', default='demos/demo_control_cfg.yaml', help='absolute filepath for config file.')
args = parser.parse_args()
kwargs = vars(args)
demo = GravityCompDemo(**kwargs)
demo.run()