YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SimulatedWorld_nws_ros2 Class Reference

SimulatedWorld_nws_ros2: A network wrapper server that exposes the ISimulatedWorld interface via ROS2 services. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/opt-modules/yarp-devices-ros2/src/devices/simulatedWorld_nws_ros2/SimulatedWorld_nws_ros2.h>

+ Inheritance diagram for SimulatedWorld_nws_ros2:

Public Member Functions

 SimulatedWorld_nws_ros2 ()
 
 SimulatedWorld_nws_ros2 (const SimulatedWorld_nws_ros2 &)=delete
 
 SimulatedWorld_nws_ros2 (SimulatedWorld_nws_ros2 &&) noexcept=delete
 
SimulatedWorld_nws_ros2 & operator= (const SimulatedWorld_nws_ros2 &)=delete
 
SimulatedWorld_nws_ros2 & operator= (SimulatedWorld_nws_ros2 &&) noexcept=delete
 
 ~SimulatedWorld_nws_ros2 () override=default
 
bool attach (yarp::dev::PolyDriver *driver) override
 Attach to another object.
 
bool detach () override
 Detach the object (you must have first called attach).
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
void makeSphereCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeSphere::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeSphere::Response > response)
 
void makeBoxCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeBox::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeBox::Response > response)
 
void makeCylinderCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeCylinder::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeCylinder::Response > response)
 
void makeFrameCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeFrame::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeFrame::Response > response)
 
void makeModelCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeModel::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeModel::Response > response)
 
void makeActorCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeActor::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeActor::Response > response)
 
void changeColorCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::ChangeColor::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::ChangeColor::Response > response)
 
void setPoseCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::SetPose::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::SetPose::Response > response)
 
void enableGravityCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableGravity::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableGravity::Response > response)
 
void enableCollisionCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableCollision::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableCollision::Response > response)
 
void getPoseCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetPose::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetPose::Response > response)
 
void deleteObjectCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteObject::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteObject::Response > response)
 
void deleteAllCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteAll::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteAll::Response > response)
 
void getListCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetList::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetList::Response > response)
 
void attachCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Attach::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Attach::Response > response)
 
void detachCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Detach::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Detach::Response > response)
 
void renameCallback (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Rename::Request > request, std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Rename::Response > response)
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriver & operator= (const DeviceDriver &other)=delete
 
DeviceDriver & operator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDriver * getImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::WrapperSingle
 ~WrapperSingle () override
 Destructor.
 
bool attachAll (const yarp::dev::PolyDriverList &drivers) final
 Attach to a list of objects.
 
bool detachAll () final
 Detach the object (you must have first called attach).
 
- Public Member Functions inherited from yarp::dev::IWrapper
virtual ~IWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor.
 
- Public Member Functions inherited from SimulatedWorld_nws_ros2_ParamsParser
 SimulatedWorld_nws_ros2_ParamsParser ()
 
 ~SimulatedWorld_nws_ros2_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 Return the value (represented as a string) of the requested parameter.
 
std::string getConfiguration () const override
 Return the configuration of the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Additional Inherited Members

- Public Attributes inherited from SimulatedWorld_nws_ros2_ParamsParser
const std::string m_device_classname = {"SimulatedWorld_nws_ros2"}
 
const std::string m_device_name = {"simulatedWorld_nws_ros2"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_node_name_defaultValue = {"simulatedWorld_nws_ros2"}
 
const std::string m_namespace_defaultValue = {""}
 
const std::string m_makesphere_servicename_defaultValue = {"makeSphere"}
 
const std::string m_makebox_servicename_defaultValue = {"makeBox"}
 
const std::string m_makecylinder_servicename_defaultValue = {"makeCylinder"}
 
const std::string m_makeframe_servicename_defaultValue = {"makeFrame"}
 
const std::string m_makemodel_servicename_defaultValue = {"makeModel"}
 
const std::string m_makeactor_servicename_defaultValue = {"makeActor"}
 
const std::string m_changecolor_servicename_defaultValue = {"changeColor"}
 
const std::string m_setpose_servicename_defaultValue = {"setPose"}
 
const std::string m_enablegravity_servicename_defaultValue = {"enableGravity"}
 
const std::string m_enablecollision_servicename_defaultValue = {"enableCollision"}
 
const std::string m_getpose_servicename_defaultValue = {"getPose"}
 
const std::string m_deleteobject_servicename_defaultValue = {"deleteObject"}
 
const std::string m_deleteall_servicename_defaultValue = {"deleteAll"}
 
const std::string m_getlist_servicename_defaultValue = {"getList"}
 
const std::string m_attach_servicename_defaultValue = {"attach"}
 
const std::string m_detach_servicename_defaultValue = {"detach"}
 
const std::string m_rename_servicename_defaultValue = {"rename"}
 
std::string m_node_name = {"simulatedWorld_nws_ros2"}
 
std::string m_namespace = {}
 
std::string m_makesphere_servicename = {"makeSphere"}
 
std::string m_makebox_servicename = {"makeBox"}
 
std::string m_makecylinder_servicename = {"makeCylinder"}
 
std::string m_makeframe_servicename = {"makeFrame"}
 
std::string m_makemodel_servicename = {"makeModel"}
 
std::string m_makeactor_servicename = {"makeActor"}
 
std::string m_changecolor_servicename = {"changeColor"}
 
std::string m_setpose_servicename = {"setPose"}
 
std::string m_enablegravity_servicename = {"enableGravity"}
 
std::string m_enablecollision_servicename = {"enableCollision"}
 
std::string m_getpose_servicename = {"getPose"}
 
std::string m_deleteobject_servicename = {"deleteObject"}
 
std::string m_deleteall_servicename = {"deleteAll"}
 
std::string m_getlist_servicename = {"getList"}
 
std::string m_attach_servicename = {"attach"}
 
std::string m_detach_servicename = {"detach"}
 
std::string m_rename_servicename = {"rename"}
 

Detailed Description

SimulatedWorld_nws_ros2: A network wrapper server that exposes the ISimulatedWorld interface via ROS2 services.

Parameters required by this device are shown in class: SimulatedWorld_nws_ros2_ParamsParser

Definition at line 46 of file SimulatedWorld_nws_ros2.h.

Constructor & Destructor Documentation

◆ SimulatedWorld_nws_ros2() [1/3]

SimulatedWorld_nws_ros2::SimulatedWorld_nws_ros2 ( )
default

◆ SimulatedWorld_nws_ros2() [2/3]

SimulatedWorld_nws_ros2::SimulatedWorld_nws_ros2 ( const SimulatedWorld_nws_ros2 &  )
delete

◆ SimulatedWorld_nws_ros2() [3/3]

SimulatedWorld_nws_ros2::SimulatedWorld_nws_ros2 ( SimulatedWorld_nws_ros2 &&  )
deletenoexcept

◆ ~SimulatedWorld_nws_ros2()

SimulatedWorld_nws_ros2::~SimulatedWorld_nws_ros2 ( )
overridedefault

Member Function Documentation

◆ attach()

bool SimulatedWorld_nws_ros2::attach ( yarp::dev::PolyDriver *  driver)
overridevirtual

Attach to another object.

Parameters
driverthe polydriver that you want to attach to.
Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 61 of file SimulatedWorld_nws_ros2.cpp.

◆ attachCallback()

void SimulatedWorld_nws_ros2::attachCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Attach::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Attach::Response >  response 
)

Definition at line 543 of file SimulatedWorld_nws_ros2.cpp.

◆ changeColorCallback()

void SimulatedWorld_nws_ros2::changeColorCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::ChangeColor::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::ChangeColor::Response >  response 
)

Definition at line 344 of file SimulatedWorld_nws_ros2.cpp.

◆ close()

bool SimulatedWorld_nws_ros2::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 151 of file SimulatedWorld_nws_ros2.cpp.

◆ deleteAllCallback()

void SimulatedWorld_nws_ros2::deleteAllCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteAll::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteAll::Response >  response 
)

Definition at line 502 of file SimulatedWorld_nws_ros2.cpp.

◆ deleteObjectCallback()

void SimulatedWorld_nws_ros2::deleteObjectCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteObject::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::DeleteObject::Response >  response 
)

Definition at line 479 of file SimulatedWorld_nws_ros2.cpp.

◆ detach()

bool SimulatedWorld_nws_ros2::detach ( )
overridevirtual

Detach the object (you must have first called attach).

Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 78 of file SimulatedWorld_nws_ros2.cpp.

◆ detachCallback()

void SimulatedWorld_nws_ros2::detachCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Detach::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Detach::Response >  response 
)

Definition at line 575 of file SimulatedWorld_nws_ros2.cpp.

◆ enableCollisionCallback()

void SimulatedWorld_nws_ros2::enableCollisionCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableCollision::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableCollision::Response >  response 
)

Definition at line 421 of file SimulatedWorld_nws_ros2.cpp.

◆ enableGravityCallback()

void SimulatedWorld_nws_ros2::enableGravityCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableGravity::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::EnableGravity::Response >  response 
)

Definition at line 398 of file SimulatedWorld_nws_ros2.cpp.

◆ getListCallback()

void SimulatedWorld_nws_ros2::getListCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetList::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetList::Response >  response 
)

Definition at line 520 of file SimulatedWorld_nws_ros2.cpp.

◆ getPoseCallback()

void SimulatedWorld_nws_ros2::getPoseCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetPose::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::GetPose::Response >  response 
)

Definition at line 444 of file SimulatedWorld_nws_ros2.cpp.

◆ makeActorCallback()

void SimulatedWorld_nws_ros2::makeActorCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeActor::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeActor::Response >  response 
)

Definition at line 327 of file SimulatedWorld_nws_ros2.cpp.

◆ makeBoxCallback()

void SimulatedWorld_nws_ros2::makeBoxCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeBox::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeBox::Response >  response 
)

Definition at line 198 of file SimulatedWorld_nws_ros2.cpp.

◆ makeCylinderCallback()

void SimulatedWorld_nws_ros2::makeCylinderCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeCylinder::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeCylinder::Response >  response 
)

Definition at line 233 of file SimulatedWorld_nws_ros2.cpp.

◆ makeFrameCallback()

void SimulatedWorld_nws_ros2::makeFrameCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeFrame::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeFrame::Response >  response 
)

Definition at line 265 of file SimulatedWorld_nws_ros2.cpp.

◆ makeModelCallback()

void SimulatedWorld_nws_ros2::makeModelCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeModel::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeModel::Response >  response 
)

Definition at line 297 of file SimulatedWorld_nws_ros2.cpp.

◆ makeSphereCallback()

void SimulatedWorld_nws_ros2::makeSphereCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeSphere::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::MakeSphere::Response >  response 
)

Definition at line 167 of file SimulatedWorld_nws_ros2.cpp.

◆ open()

bool SimulatedWorld_nws_ros2::open ( yarp::os::Searchable &  config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 84 of file SimulatedWorld_nws_ros2.cpp.

◆ operator=() [1/2]

SimulatedWorld_nws_ros2 & SimulatedWorld_nws_ros2::operator= ( const SimulatedWorld_nws_ros2 &  )
delete

◆ operator=() [2/2]

SimulatedWorld_nws_ros2 & SimulatedWorld_nws_ros2::operator= ( SimulatedWorld_nws_ros2 &&  )
deletenoexcept

◆ renameCallback()

void SimulatedWorld_nws_ros2::renameCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Rename::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::Rename::Response >  response 
)

Definition at line 599 of file SimulatedWorld_nws_ros2.cpp.

◆ setPoseCallback()

void SimulatedWorld_nws_ros2::setPoseCallback ( const std::shared_ptr< rmw_request_id_t >  request_header,
const std::shared_ptr< simulated_world_nws_ros2_msgs::srv::SetPose::Request >  request,
std::shared_ptr< simulated_world_nws_ros2_msgs::srv::SetPose::Response >  response 
)

Definition at line 368 of file SimulatedWorld_nws_ros2.cpp.


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