pyCreate2.simulation package
Submodules
pyCreate2.simulation.create2_vrep module
pyCreate2.simulation.kuka_lbr4p_vrep module
Module to control the KUKA LBR4+ in V-REP.
-
class
pyCreate2.simulation.kuka_lbr4p_vrep.
KukaLBR4PlusVrep
(client_id)[source]
Bases: object
Class to control the KUKA LBR4+ Manipulator in V-REP.
-
disable_painting
()[source]
Disable spray painting end-effector.
-
enable_painting
()[source]
Enable spray painting end-effector.
-
go_to
(joint, angle)[source]
Go to specified target angle.
Parameters: |
- joint (int) – number of joint to change (0 to 7)
- angle (float) – radians
|
-
set_color
(r, g, b)[source]
Set spray painting color (RGB).
Parameters: |
- r (float) – red component (0 to 1)
- g (float) – green component (0 to 1)
- b (float) – blue component (0 to 1)
|
pyCreate2.simulation.servo module
Module to control a virtual Servo.
-
class
pyCreate2.simulation.servo.
Servo
(client_id)[source]
Bases: object
Class to control a virtual servo in V-REP.
The servo is modeled as joint, using an integrated position controller in V-REP.
-
go_to
(angle)[source]
Go to specified target angle.
Parameters: | angle (float) – -90 - 90 degrees. 0 means facing forward. Negative numbers turn to the left. |
pyCreate2.simulation.sonar module
Module to control a virtual Sonar.
-
class
pyCreate2.simulation.sonar.
Sonar
(client_id)[source]
Bases: object
Class to control a virtual sonar.
-
get_distance
()[source]
Queries the current distance from the sonar.
We use a proximity sensor in V-REP to model the sonar.
Returns: | Distance in m. If there was an error, it returns 3.3 m. |
pyCreate2.simulation.time_helper module
Module to deal with simulation time.
-
class
pyCreate2.simulation.time_helper.
TimeHelper
(client_id)[source]
Bases: object
This class is similar to the default time module of python, however it uses V-REPs simulation time
rather than real time.
-
sleep
(wait_in_sec)[source]
Wait for the specified number of seconds (simulation time).
The simulation will continue making progress.
Parameters: | wait_in_sec (float) – time (in seconds) to continue simulation. |
-
time
()[source]
Query current time. Simulation starts at time 0.
Returns: | Elapsed simulated seconds. |
Module contents