|
| _execute (self, cmd) |
|
| _is_success (self, ans) |
|
| _prepare_del_all_command (self) |
|
| _prepare_create_command (self, obj, size, location, colour) |
|
| _prepare_move_command (self, obj, obj_id, location) |
|
| _prepare_rot_command (self, obj, obj_id, rotation) |
|
| _prepare_get_command (self, obj, obj_id) |
|
Class for controlling iCub simulator via its RPC world port.
Definition at line 7 of file python_simworld_control.py.
◆ __init__()
python_simworld_control.WorldController.__init__ |
( |
|
self | ) |
|
◆ __del__()
python_simworld_control.WorldController.__del__ |
( |
|
self | ) |
|
◆ _execute()
python_simworld_control.WorldController._execute |
( |
|
self, |
|
|
|
cmd |
|
) |
| |
|
protected |
◆ _is_success()
python_simworld_control.WorldController._is_success |
( |
|
self, |
|
|
|
ans |
|
) |
| |
|
protected |
◆ _prepare_create_command()
python_simworld_control.WorldController._prepare_create_command |
( |
|
self, |
|
|
|
obj, |
|
|
|
size, |
|
|
|
location, |
|
|
|
colour |
|
) |
| |
|
protected |
Prepare an RPC command for creating an object in the simulator environment.
See Simulator Readme section 'Object Creation'
Parameters:
obj - object type string. 'sph', 'box', 'cyl' 'ssph', 'sbox' or 'scyl'.
size - list of values specifying the size of an object. Parameters depend on object type:
(s)box: [ x, y, z ]
(s)sph: [ radius ]
(s)cyl: [ radius, length ]
location - coordinates of the object location, [ x, y, z ]
colour - object colour in RGB (normalised), [ r, g, b ]
Returns:
yarp.Bottle with the command, ready to be sent to the rpc port of the simulator
Definition at line 40 of file python_simworld_control.py.
◆ _prepare_del_all_command()
python_simworld_control.WorldController._prepare_del_all_command |
( |
|
self | ) |
|
|
protected |
◆ _prepare_get_command()
python_simworld_control.WorldController._prepare_get_command |
( |
|
self, |
|
|
|
obj, |
|
|
|
obj_id |
|
) |
| |
|
protected |
◆ _prepare_move_command()
python_simworld_control.WorldController._prepare_move_command |
( |
|
self, |
|
|
|
obj, |
|
|
|
obj_id, |
|
|
|
location |
|
) |
| |
|
protected |
◆ _prepare_rot_command()
python_simworld_control.WorldController._prepare_rot_command |
( |
|
self, |
|
|
|
obj, |
|
|
|
obj_id, |
|
|
|
rotation |
|
) |
| |
|
protected |
◆ create_object()
python_simworld_control.WorldController.create_object |
( |
|
self, |
|
|
|
obj, |
|
|
|
size, |
|
|
|
location, |
|
|
|
colour |
|
) |
| |
Create an object of a specified type, size, location and colour, returning internal object ID or -1 on error.
Definition at line 99 of file python_simworld_control.py.
◆ del_all()
python_simworld_control.WorldController.del_all |
( |
|
self | ) |
|
◆ get_object_location()
python_simworld_control.WorldController.get_object_location |
( |
|
self, |
|
|
|
obj_id |
|
) |
| |
◆ move_object()
python_simworld_control.WorldController.move_object |
( |
|
self, |
|
|
|
obj_id, |
|
|
|
location |
|
) |
| |
◆ rotate_object()
python_simworld_control.WorldController.rotate_object |
( |
|
self, |
|
|
|
obj_id, |
|
|
|
rotation |
|
) |
| |
◆ _objects
python_simworld_control.WorldController._objects |
|
protected |
◆ _port_name
python_simworld_control.WorldController._port_name |
|
protected |
◆ _rpc_client
python_simworld_control.WorldController._rpc_client |
|
protected |
◆ _sim_ids_counters
python_simworld_control.WorldController._sim_ids_counters |
|
protected |
The documentation for this class was generated from the following file: