YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ISimulatedWorld.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026-2026 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_ISIMULATEDWORLD_H
7#define YARP_DEV_ISIMULATEDWORLD_H
8
9#include <string>
10#include <vector>
11
12#include <yarp/dev/api.h>
13#include <yarp/sig/Vector.h>
14#include <yarp/sig/ColorRGB.h>
15#include <yarp/sig/Pose6D.h>
17
18namespace yarp::dev {
19class ISimulatedWorld;
20}
21
28{
29public:
34
46 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;
47
61 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;
62
76 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;
77
90 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;
91
99 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;
100
109 virtual yarp::dev::ReturnValue makeActor(std::string id, std::string skin_filename, std::string animation_filename, yarp::sig::Pose6D pose) = 0;
110
117 virtual yarp::dev::ReturnValue changeColor (std::string id, yarp::sig::ColorRGB color) =0;
118
126 virtual yarp::dev::ReturnValue setPose(std::string id, yarp::sig::Pose6D pose, std::string frame_name="") =0;
127
134 virtual yarp::dev::ReturnValue enableGravity (std::string id, bool enable) =0;
135
142 virtual yarp::dev::ReturnValue enableCollision (std::string id, bool enable) =0;
143
150 virtual yarp::dev::ReturnValue getPose(std::string id, yarp::sig::Pose6D& pose, std::string frame_name="") =0;
151
157 virtual yarp::dev::ReturnValue deleteObject(std::string id) =0;
158
164
169 virtual yarp::dev::ReturnValue getList(std::vector<std::string>& names) =0;
170
177 virtual yarp::dev::ReturnValue attach(std::string id, std::string link_name) =0;
178
184 virtual yarp::dev::ReturnValue detach(std::string id) =0;
185
192 virtual yarp::dev::ReturnValue rename(std::string old_name, std::string new_name) = 0;
193};
194
195
196#endif // YARP_DEV_ISIMULATEDWORLD_H
contains the definition of a Vector type
ISimulatedWorld Interface.
virtual yarp::dev::ReturnValue getPose(std::string id, yarp::sig::Pose6D &pose, std::string frame_name="")=0
Get 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 getList(std::vector< std::string > &names)=0
List id of all objects that have been added to the world.
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 attach(std::string id, std::string link_name)=0
Attach an object to a link of another object.
virtual ~ISimulatedWorld()
Destructor.
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 changeColor(std::string id, yarp::sig::ColorRGB color)=0
Change the color of an object.
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 deleteObject(std::string id)=0
Delete an object.
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 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 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 rename(std::string old_name, std::string new_name)=0
Change the names of an object.
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 deleteAll()=0
Delete all objects in the world.
virtual yarp::dev::ReturnValue detach(std::string id)=0
Detach a previously attached object.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18