@@ -92,6 +92,30 @@ def create_neck(
9292 cervical_axis ["bend" ] = np .array ((0.0 , 0.0 , 1.0 ))
9393 cervical_axis ["twist" ] = np .array ((1.0 , 0.0 , 0 ))
9494
95+ neck_ranges = {
96+ "C_7_extend" : [- 14.2 , 35.4 ],
97+ "C_7_bend" : [- 23.5 , 23.5 ],
98+ "C_7_twist" : [- 42.4 , 42.4 ],
99+ "C_6_extend" : [- 14.2 , 35.4 ],
100+ "C_6_bend" : [- 23.5 , 23.5 ],
101+ "C_6_twist" : [- 42.4 , 42.4 ],
102+ "C_5_extend" : [- 11.9 , 11.2 ],
103+ "C_5_bend" : [- 27.9 , 27.9 ],
104+ "C_5_twist" : [- 33 , 33 ],
105+ "C_4_extend" : [- 11.9 , 11.2 ],
106+ "C_4_bend" : [- 27.9 , 27.9 ],
107+ "C_4_twist" : [- 33 , 33 ],
108+ "C_3_extend" : [- 13.4 , 18.3 ],
109+ "C_3_bend" : [- 32 , 32 ],
110+ "C_3_twist" : [- 10.1 , 10.1 ],
111+ "C_2_extend" : [- 13.4 , 18.3 ],
112+ "C_2_bend" : [- 32 , 32 ],
113+ "C_2_twist" : [- 10.1 , 10.1 ],
114+ "C_1_extend" : [- 16.4 , 12.9 ],
115+ "C_1_bend" : [- 26 , 26 ],
116+ "C_1_twist" : [- 10.1 , 10.1 ],
117+ }
118+
95119 num_dofs = 0
96120 cervical_joints = []
97121 cervical_joint_names = []
@@ -117,6 +141,7 @@ def create_neck(
117141 "joint" ,
118142 name = cervical_joint_names [- 1 ],
119143 dclass = "cervical_" + dof_name ,
144+ range = neck_ranges [cervical_joint_names [- 1 ]],
120145 axis = cervical_axis [dof_name ],
121146 pos = joint_pos .dot (joint_frame ),
122147 )
0 commit comments