Robot speed during PathStatement simulation

Hi,

With reference to “Example” on the “vcPathStatement” page of Python API in the help file, I created a program to teach robot PathStatement from PythonScript.

During simulation, the robot moves to the intended coordinates, but the speed seems to be constant at all times.

The example has the following description

 

#add schema properties/fields for table
my_props = [VC_MATRIX, “Position”,
VC_INTEGER, “MotionType”,
VC_INTEGER, “OriginalIndex”,
VC_REAL, “Speed”]
prop_indices = path_statement.addSchemaProperties(my_props)

#add data to path table
path_statement.beginBatchUpdate(100)
for point_index in range(100):
position = vcMatrix.new()
motion_type = 1
speed = 200.0
position_values = (position, motion_type, point_index, speed)
path_statement.setSchemaValues(point_index, prop_indices, position_values)
path_statement.setSchemaValues(0, “IsReference”, True)
path_statement.setSchemaValues(99, “IsReference”, True)
path_statement.endBatchUpdate(100)

 

Even if you change the value of this Speed, there is no change in the speed of the robot during simulation.
Changing the value of Speed in the PositionProperties window of VC does not change the speed of the robot.

I want to assign different speeds to each frame of the PathStatement and I want to check it by simulation.

Does anyone know how to solve it?

 

 

 

Try changing “Speed” property to “MaxSpeed”. “MaxSpeed” is recognized by the default path handler as the property that determines the motion speed as is described in Python API documentation for vcPathStatement. “Speed” property in the example expects that you have a custom python handler for paths that utilize this property when moving the robot via vcRobotController. This sort of a custom handler is not written in the example unfortunately.

-k