@@ -165,7 +165,7 @@ def ServoTo(manipulator, target, duration, timeStep=0.05, collisionChecking=True
165
165
else :
166
166
return False
167
167
168
- def GetVelocityLimits (self , openrave = True , owd = True ):
168
+ def GetVelocityLimits (self , openrave = None , owd = None ):
169
169
"""Get the OpenRAVE and OWD joint velocity limits.
170
170
This function checks both the OpenRAVE and OWD joint velocity limits.
171
171
If they do not match, a warning is printed and the minimum value is
@@ -174,37 +174,13 @@ def GetVelocityLimits(self, openrave=True, owd=True):
174
174
@param owd flag to set the OWD velocity limits
175
175
@return list of velocity limits, in radians per second
176
176
"""
177
- # Update the OpenRAVE limits.
178
- if openrave :
179
- or_velocity_limits = Manipulator .GetVelocityLimits (self )
180
- if self .simulated or not owd :
181
- return or_velocity_limits
182
-
183
- # Update the OWD limits.
184
- if owd and not self .simulated :
185
- args = [ 'GetSpeed' ]
186
- args_str = ' ' .join (args )
187
- owd_speed_limits_all = self .controller .SendCommand (args_str )
188
- #if we get nothing back, e.g. if the arm isn't running, return openrave lims
189
- if owd_speed_limits_all is None :
190
- return or_velocity_limits
191
-
192
- owd_speed_limits = map (float , owd_speed_limits_all .split (',' ));
193
- #first 7 numbers are velocity limits
194
- owd_velocity_limits = numpy .array (owd_speed_limits [0 :len (self .GetIndices ())])
195
-
196
- diff_arr = numpy .subtract (or_velocity_limits , owd_velocity_limits )
197
- max_diff = max (abs (diff_arr ))
198
-
199
- if max_diff > 0.01 :
200
- # TODO: Change this to use the logging framework.
201
- print ('GetVelocityLimits Error: openrave and owd limits very different' )
202
- print ('\t Openrave limits:\t ' + str (or_velocity_limits ))
203
- print ('\t OWD limits:\t \t ' + str (owd_velocity_limits ))
204
-
205
- return numpy .minimum (or_velocity_limits , owd_velocity_limits )
177
+ if openrave is not None or owd is not None :
178
+ warnings .warn (
179
+ 'The "openrave" and "owd" flags are deprecated in'
180
+ ' GetVelocityLimits and will be removed in a future version.' ,
181
+ DeprecationWarning )
206
182
207
- return or_velocity_limits
183
+ return Manipulator . GetVelocityLimits ( self )
208
184
209
185
def SetVelocityLimits (self , velocity_limits , min_accel_time ,
210
186
openrave = True , owd = True ):
0 commit comments