-
Notifications
You must be signed in to change notification settings - Fork 16
toaster_simu
To start the toaster_simu ros node, run the following command on terminal -
> rosrun toaster_simu toaster_simu
toaster_simu
is an inbuilt-simulation component of TOASTER which allows to add entities (objects, robots, humans and joints)
and provides the desired environment to TOASTER for situation assessment.
This makes possible to quickly set up an interaction environment in order to test new features or new modules without requiring any robotic device or any real environment.
WARNING toaster_simu is not a real simulator as it is only meant to add entities (human, robot, objects) to the environment in order to quickly test toaster modules. If you wish to simulate perception or to have further functionalities, please use a real simulator as morse.
The following figure gives an idea of the implementation of services and topics in toaster_simu.
Inputs for this module are id, type and position of entities to be added to the environment being assessed. They are provided through services as described below. Another set of inputs will be from keyboard if any entity is teleoperated (see figure below for keyboard teleoperation keys).
Outputs for toaster_simu component are published on topics /toaster_simu/humanList
, /toaster_simu/robotList
and /toaster_simu/objectList
which are subscribed by higher level component PDG.
This component provides the following services :
add_entity - enables you to add an entity to the environment. It takes a string id
to give to the entity, a string name
which will be also use to find the corresponding 3D model, a string type
which should be set to the entity type (human, robot, object or joint). The last parameter is the string ownerId
. It is used for joint entities to give the id of the agent it belongs to.
Shell command to call the service:
rosservice call /toaster_simu/add_entity "id: ''
name: ''
type: ''
ownerId: ''"
remove_entity - enables you to remove an entity from the environment. It takes strings to identify the entity.
Shell command:
rosservice call /toaster_simu/remove_entity "id: ''
type: ''
ownerId: ''"
set_entity_keyboard - enables you to set any entity to keyboard mode so that it can be controlled by keyboard. It takes a sting with the id of the entity you want to control.
Shell command:
rosservice call /toaster_simu/set_entity_keyboard "id: ''"
set_entity_pose: - enables you to set position of any existing entity. The three first parameters id, ownerId, type
are strings meant to identify the entity whose position is to be changed. The last parameter is the pose in which we want to put the entity with the type geometry_msgs/Pose
from ros.
Shell command:
rosservice call /toaster_simu/set_entity_pose "{id: '',
ownerId: '',
type: '',
pose:
{position:
{x: 0.0,
y: 0.0,
z: 0.0},
orientation:
{x: 0.0,
y: 0.0,
z: 0.0,
w: 1.0}}}"
The current version of toaster_simu allows to quickly add or remove any kind of entity from the environment. However, as it is meant to be a tool for quick testing, it doesn't provide a simulation of perception as a simulator would do but directly add a "perceived" world state. Nevertheless, TOASTER is also compatible with inputs from the robotic open-source software MORSE.
An other limitation is that an agent can be added with his joints, however for now, the joint position is not updated with the agent's one (see issue 19).