YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeSimulatedWorld.cpp
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
7
9#include <yarp/os/LogStream.h>
10
11#include <string>
12
13using namespace yarp::os;
14using namespace yarp::dev;
15using namespace yarp::sig;
16
17namespace {
18YARP_LOG_COMPONENT(FAKESIMULATEDWORLD, "yarp.device.fakeSimulatedWorld")
19}
20
25
30
32{
33 if (!this->parseParams(config)) {return false;}
34
35 start();
36 return true;
37}
38
40{
42 return true;
43}
44
45bool FakeSimulatedWorld::threadInit()
46{
47 return true;
48}
49
50void FakeSimulatedWorld::run()
51{
52}
53
54
55ReturnValue FakeSimulatedWorld::makeSphere (std::string id, double radius, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name, bool gravity_enable, bool collision_enable)
56{
57 return ReturnValue_ok;
58}
59
60ReturnValue FakeSimulatedWorld::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, bool collision_enable)
61{
62 return ReturnValue_ok;
63}
64
65ReturnValue FakeSimulatedWorld::makeCylinder (std::string id, double radius, double length, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name, bool gravity_enable, bool collision_enable)
66{
67 return ReturnValue_ok;
68}
69
70ReturnValue FakeSimulatedWorld::makeFrame (std::string id, double size, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name, bool gravity_enable, bool collision_enable)
71{
72 return ReturnValue_ok;
73}
74
79
80ReturnValue FakeSimulatedWorld::setPose(std::string id, yarp::sig::Pose6D pose, std::string frame_name)
81{
82 return ReturnValue_ok;
83}
84
86{
87 return ReturnValue_ok;
88}
89
91{
92 return ReturnValue_ok;
93}
94
95ReturnValue FakeSimulatedWorld::getPose(std::string id, yarp::sig::Pose6D& pose, std::string frame_name)
96{
97 return ReturnValue_ok;
98}
99
100ReturnValue FakeSimulatedWorld::makeModel(std::string id, std::string filename, yarp::sig::Pose6D pose, std::string frame_name, bool gravity_enable, bool collision_enable)
101{
102 return ReturnValue_ok;
103}
104
106{
107 return ReturnValue_ok;
108}
109
111{
112 return ReturnValue_ok;
113}
114
119
120ReturnValue FakeSimulatedWorld::getList(std::vector<std::string>& names)
121{
122 return ReturnValue_ok;
123}
124
125ReturnValue FakeSimulatedWorld::attach(std::string id, std::string link_name)
126{
127 return ReturnValue_ok;
128}
129
131{
132 return ReturnValue_ok;
133}
134
135ReturnValue FakeSimulatedWorld::rename(std::string old_name, std::string new_name)
136{
137 return ReturnValue_ok;
138}
#define ReturnValue_ok
Definition ReturnValue.h:82
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
yarp::dev::ReturnValue makeActor(std::string id, std::string skin_filename, std::string animation_filename, yarp::sig::Pose6D pose) override
Create an actor.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue getList(std::vector< std::string > &names) override
List id of all objects that have been added to the world.
yarp::dev::ReturnValue deleteAll() override
Delete all objects in the world.
yarp::dev::ReturnValue setPose(std::string id, yarp::sig::Pose6D pose, std::string frame_name) override
Set new object pose.
yarp::dev::ReturnValue makeModel(std::string id, std::string filename, yarp::sig::Pose6D pose, std::string frame_name, bool gravity_enable, bool collision_enable) override
Create a model from a file.
yarp::dev::ReturnValue makeFrame(std::string id, double size, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name, bool gravity_enable, bool collision_enable) override
Make a reference frame (a 3D model with 3 arrows representing the axes)
yarp::dev::ReturnValue makeSphere(std::string id, double radius, yarp::sig::Pose6D pose, yarp::sig::ColorRGB color, std::string frame_name, bool gravity_enable, bool collision_enable) override
Make a sphere.
yarp::dev::ReturnValue detach(std::string id) override
Detach a previously attached object.
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, bool collision_enable) override
Make a box.
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue attach(std::string id, std::string link_name) override
Attach an object to a link of another object.
yarp::dev::ReturnValue enableCollision(std::string id, bool enable) override
Enable/disables collision detection for an object.
yarp::dev::ReturnValue changeColor(std::string id, yarp::sig::ColorRGB color) override
Change the color of an object.
yarp::dev::ReturnValue enableGravity(std::string id, bool enable) override
Enable/disables gravity for an object.
yarp::dev::ReturnValue deleteObject(std::string id) override
Delete an object.
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, bool collision_enable) override
Make a cylinder.
yarp::dev::ReturnValue rename(std::string old_name, std::string new_name) override
Change the names of an object.
yarp::dev::ReturnValue getPose(std::string id, yarp::sig::Pose6D &pose, std::string frame_name) override
Get object pose.
A mini-server for performing network communication in the background.
An abstraction for a periodic thread.
bool start()
Call this to start the thread.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
A base class for nested structures that can be searched.
Definition Searchable.h:31
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
Definition OSTestMsg.cpp:13