YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::ISimulatedWorld Class Referenceabstract

ISimulatedWorld Interface. More...

#include <yarp/dev/ISimulatedWorld.h>

+ Inheritance diagram for yarp::dev::ISimulatedWorld:

Public Member Functions

virtual ~ISimulatedWorld ()
 Destructor.
 
virtual yarp::dev::ReturnValue makeSphere (std::string id, double radius, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name="", bool gravity_enable=0, bool collision_enable=1)=0
 Make a sphere.
 
virtual yarp::dev::ReturnValue makeBox (std::string id, double width, double height, double thickness, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name="", bool gravity_enable=0, bool collision_enable=1)=0
 Make a box.
 
virtual yarp::dev::ReturnValue makeCylinder (std::string id, double radius, double length, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name="", bool gravity_enable=0, bool collision_enable=1)=0
 Make a cylinder.
 
virtual yarp::dev::ReturnValue makeFrame (std::string id, double size, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name="", bool gravity_enable=0, bool collision_enable=1)=0
 Make a reference frame (a 3D model with 3 arrows representing the axes)
 
virtual yarp::dev::ReturnValue makeModel (std::string id, std::string filename, yarp::sig::Pose6D pose, std::string frame_name="", bool gravity_enable=0, bool collision_enable=1)=0
 Create a model from a file.
 
virtual yarp::dev::ReturnValue makeActor (std::string id, std::string skin_filename, std::string animation_filename, yarp::sig::Pose6D pose)=0
 Create an actor.
 
virtual yarp::dev::ReturnValue changeColor (std::string id, yarp::sig::ColorRGB color)=0
 Change the color of an object.
 
virtual yarp::dev::ReturnValue setPose (std::string id, yarp::sig::Pose6D pose, std::string frame_name="")=0
 Set new object pose.
 
virtual yarp::dev::ReturnValue enableGravity (std::string id, bool enable)=0
 Enable/disables gravity for an object.
 
virtual yarp::dev::ReturnValue enableCollision (std::string id, bool enable)=0
 Enable/disables collision detection for an object.
 
virtual yarp::dev::ReturnValue getPose (std::string id, yarp::sig::Pose6D &pose, std::string frame_name="")=0
 Get object pose.
 
virtual yarp::dev::ReturnValue deleteObject (std::string id)=0
 Delete an object.
 
virtual yarp::dev::ReturnValue deleteAll ()=0
 Delete all objects in the world.
 
virtual yarp::dev::ReturnValue getList (std::vector< std::string > &names)=0
 List id of all objects that have been added to the world.
 
virtual yarp::dev::ReturnValue attach (std::string id, std::string link_name)=0
 Attach an object to a link of another object.
 
virtual yarp::dev::ReturnValue detach (std::string id)=0
 Detach a previously attached object.
 
virtual yarp::dev::ReturnValue rename (std::string old_name, std::string new_name)=0
 Change the names of an object.
 

Detailed Description

ISimulatedWorld Interface.

Definition at line 27 of file ISimulatedWorld.h.

Constructor & Destructor Documentation

◆ ~ISimulatedWorld()

yarp::dev::ISimulatedWorld::~ISimulatedWorld ( )
virtualdefault

Destructor.

Member Function Documentation

◆ attach()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::attach ( std::string  id,
std::string  link_name 
)
pure virtual

Attach an object to a link of another object.

Parameters
idstring that identifies object in gazebo
link_namename of a link
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ changeColor()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::changeColor ( std::string  id,
yarp::sig::ColorRGB  color 
)
pure virtual

Change the color of an object.

Parameters
idobject id
colorthe color of the frame
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ deleteAll()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::deleteAll ( )
pure virtual

Delete all objects in the world.

Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ deleteObject()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::deleteObject ( std::string  id)
pure virtual

Delete an object.

Parameters
idstring that identifies object in gazebo
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ detach()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::detach ( std::string  id)
pure virtual

Detach a previously attached object.

Parameters
idstring that identifies object in gazebo
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ enableCollision()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::enableCollision ( std::string  id,
bool  enable 
)
pure virtual

Enable/disables collision detection for an object.

Parameters
idobject id
enable1 to enable collision detection, 0 otherwise
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ enableGravity()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::enableGravity ( std::string  id,
bool  enable 
)
pure virtual

Enable/disables gravity for an object.

Parameters
idobject id
enable1 to enable gravity, 0 otherwise
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ getList()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::getList ( std::vector< std::string > &  names)
pure virtual

List id of all objects that have been added to the world.

Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ getPose()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::getPose ( std::string  id,
yarp::sig::Pose6D &  pose,
std::string  frame_name = "" 
)
pure virtual

Get object pose.

Parameters
idobject id
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeActor()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeActor ( std::string  id,
std::string  skin_filename,
std::string  animation_filename,
yarp::sig::Pose6D  pose 
)
pure virtual

Create an actor.

Parameters
idthe name of the object to create
skin_filenamestring that specifies the name of the model to load
animation_filenamestring that specifies the name of the animation to load (e.g. walking, running, etc.)
posethe initial pose of the object [m]
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeBox()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeBox ( std::string  id,
double  width,
double  height,
double  thickness,
yarp::sig::Pose6D  pose,
yarp::sig::ColorRGB  color,
std::string  frame_name = "",
bool  gravity_enable = 0,
bool  collision_enable = 1 
)
pure virtual

Make a box.

Parameters
idthe name of the object to create
widthbox width [m]
heightbox height[m]
thicknessbox thickness [m]
posethe pose of the box [m]
colorthe color of the box
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
gravity_enable(optional) enables gravity (default false)
collision_enable(optional) enables collision (default true)
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeCylinder()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeCylinder ( std::string  id,
double  radius,
double  length,
yarp::sig::Pose6D  pose,
yarp::sig::ColorRGB  color,
std::string  frame_name = "",
bool  gravity_enable = 0,
bool  collision_enable = 1 
)
pure virtual

Make a cylinder.

Parameters
idthe name of the object to create
radiusthe radius of the cylinder [m]
lengththe length of the cylinder [m]
posethe pose of the cylinder [m]
colorthe color of the cylinder
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
object_name(optional) assigns a name to the object.
gravity_enable(optional) enables gravity (default false)
collision_enable(optional) enables collision (default true)
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeFrame()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeFrame ( std::string  id,
double  size,
yarp::sig::Pose6D  pose,
yarp::sig::ColorRGB  color,
std::string  frame_name = "",
bool  gravity_enable = 0,
bool  collision_enable = 1 
)
pure virtual

Make a reference frame (a 3D model with 3 arrows representing the axes)

Parameters
idthe name of the object to create
sizethe size of the frame [m]
posethe pose of the frame [m]
colorthe color of the frame
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
object_name(optional) assigns a name to the object.
gravity_enable(optional) enables gravity (default false)
collision_enable(optional) enables collision (default true)
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeModel()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeModel ( std::string  id,
std::string  filename,
yarp::sig::Pose6D  pose,
std::string  frame_name = "",
bool  gravity_enable = 0,
bool  collision_enable = 1 
)
pure virtual

Create a model from a file.

Parameters
idthe name of the object to create
filenamestring that specifies the name of the model to load
posethe initial pose of the object [m]
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ makeSphere()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::makeSphere ( std::string  id,
double  radius,
yarp::sig::Pose6D  pose,
yarp::sig::ColorRGB  color,
std::string  frame_name = "",
bool  gravity_enable = 0,
bool  collision_enable = 1 
)
pure virtual

Make a sphere.

Parameters
idthe name of the object to create
radiusthe radius of the sphere [m]
posethe pose of the sphere [m]
colorthe color of the sphere
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
gravity_enable(optional) enables gravity (default false)
collision_enable(optional) enables collision (default true)
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ rename()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::rename ( std::string  old_name,
std::string  new_name 
)
pure virtual

Change the names of an object.

Parameters
old_namestring that identifies object in gazebo
new_namestring that will be used as new name
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.

◆ setPose()

virtual yarp::dev::ReturnValue yarp::dev::ISimulatedWorld::setPose ( std::string  id,
yarp::sig::Pose6D  pose,
std::string  frame_name = "" 
)
pure virtual

Set new object pose.

Parameters
idobject id
posenew pose
frame_name(optional) is specified, the pose will be relative to the specified fully scoped frame (e.g. MODEL_ID::FRAME_ID). Otherwise, world it will be used.
Returns
returns true or false on success failure

Implemented in FakeSimulatedWorld, and SimulatedWorld_nwc_yarp.


The documentation for this class was generated from the following files: