hbp_nrp_cle.robotsim.RosCommunicationAdapter module¶
Represents an implementation of the robot communication adapter actually using ROS
-
class
RosCommunicationAdapter
[source]¶ Bases:
hbp_nrp_cle.robotsim.RobotInterface.IRobotCommunicationAdapter
Represents a robot communication adapter actually using ROS
-
create_service_proxy
(service, **config)[source]¶ Creates a service proxy object for the given service
- Parameters
service – The service
config – Additional configuration for the service proxy
- Returns
A service proxy object
-
create_topic_publisher
(topic, **config)[source]¶ Creates a publisher object for the given topic
- Parameters
topic – The topic
config – Additional configuration for the publisher
queue_size – ROS Publisher queue_size parameter, please refer to ROS documentation
- Returns
A publisher object
-
create_topic_subscriber
(topic, **config)[source]¶ Creates the subscription object for the given topic
- Parameters
topic – The topic
config – Additional configuration for the subscriber
queue_size – ROS Subscriber queue_size parameter, please refer to ROS documentation
buff_size – ROS Subscriber buff_size parameter, please refer to ROS documentation
- Returns
A subscription object
-
get_topic_type
(topic_name, update_when_miss=True)[source]¶ Gets the type for the given ROS topic
- Parameters
topic_name – The name of the topic
update_when_miss – If set, the function will try to update the cached topic types if the topic cannot be found
-
initialize
(name)[source]¶ Initializes this robot communication adapter
- Parameters
name – The name of this node
-
property
is_alive
¶ Gets a value indicating whether the robot simulation is still alive
-
-
class
RosPublishedPreprocessedTopic
(topic, **config)[source]¶ Bases:
hbp_nrp_cle.robotsim.RosCommunicationAdapter.RosPublishedTopic
Represents a robot topic publisher actually using ROS
-
class
RosPublishedTopic
(topic, **config)[source]¶ Bases:
hbp_nrp_cle.robotsim.RobotInterface.IRobotPublishedTopic
Represents a robot topic publisher actually using ROS
-
class
RosServiceProxy
(service, initial_response=None, persistent=False, headers=None)[source]¶ Bases:
hbp_nrp_cle.robotsim.RobotInterface.IRobotServiceProxy
Represents a robot service proxy actually using ROS
-
reset
(transfer_function_manager)[source]¶ Gets a reset subscriber
- Parameters
transfer_function_manager – The transfer function manager in which the subscribed service is contained
-
update_value
(*args, **kwargs)[source]¶ Update service response value
- Returns
Returns Service Response
-
property
value
¶ Gets the last value received by this ROS subscribed service
-
-
class
RosSubscribedPreprocessedTopic
(topic, initial_value, **config)[source]¶ Bases:
hbp_nrp_cle.robotsim.RosCommunicationAdapter.RosSubscribedTopic
Represents a robot topic subscriber with a preprocessor
-
class
RosSubscribedTopic
(topic, initial_value, **config)[source]¶ Bases:
hbp_nrp_cle.robotsim.RobotInterface.IRobotSubscribedTopic
Represents a robot topic subscriber actually using ROS
-
property
changed
¶ Indicates whether the current value of this subscriber has changed since the last iteration
-
register_tf_trigger
(tf)[source]¶ Registers to trigger the provided TF in case a new value appears
- Parameters
tf – The transfer function
-
reset
(transfer_function_manager)[source]¶ Gets a reset subscriber
- Parameters
transfer_function_manager – The transfer function manager in which the subscribed topic is contained
-
property
value
¶ Gets the last value received by this ROS subscribed topic
-
property