forked from HBPNeurorobotics/hbpprak_2017_perception
-
Notifications
You must be signed in to change notification settings - Fork 2
/
thimblerigger_config.py
84 lines (74 loc) · 2.66 KB
/
thimblerigger_config.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
namespace = "thimblerigger"
thimblerigger_started_topic = namespace + "/start_challenge_signal"
thimblerigger_step_topic = namespace + "/step_challenge_signal"
thimblerigger_stopped_topic = namespace + "/stop_challenge_signal"
thimblerigger_start_service = namespace + "/start_challenge"
thimblerigger_step_service = namespace + "/step_challenge"
thimblerigger_stop_service = namespace + "/stop_challenge"
thimblerigger_reset_service = namespace + "/reset"
thimblerigger_show_correct_service = namespace + "/show_correct_mug"
thimblerigger_hide_correct_service = namespace + "/hide_correct_mug"
thimblerigger_shuffle_service = namespace + "/shuffle"
thimblerigger_training_topic = namespace + "/training_signal"
training_signal_frequency = 10
num_mugs = 3 # Number of mugs, should be 3 for the final challenge
num_shuffles = 1 # Number of permutations the configuration goes through while shuffling
seed = None # Random seed for shuffling and choice of ball start position
movement_rate = None # None equals full speed. Lower values indicate slower movements,
# allowing to mitigate slow simulations where the camera misses some frames.
# Do not change these, they are descriptors for the mug and ball mesh
ball_sdf_xml = """
<?xml version='1.0'?>
<sdf version='1.5'>
<model name='{ball_name}'>
<pose>0 0 0 0 0 0</pose>
<link name='{ball_name}'>
<gravity>0</gravity>
<inertial>
<mass>0.057</mass>
</inertial>
<visual name='visual'>
<geometry>
<sphere>
<radius>{radius}</radius>
</sphere>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Green</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
"""
mug_sdf_xml = """
<?xml version='1.0'?>
<sdf version='1.5'>
<model name='{mug_name}'>
<pose>0 0 .7 0 0 0</pose>
<link name='{mug_name}'>
<gravity>0</gravity>
<inertial>
<mass>0.8</mass>
</inertial>
<visual name='visual'>
<geometry>
<cylinder>
<radius>{radius}</radius>
<length>{length}</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Red</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
"""