pycram.ros.ros2.ros_tools#

Attributes#

Exceptions#

ResourceNotFound

Common base class for all non-exit exceptions.

ServiceException

Common base class for all non-exit exceptions.

Functions#

get_node_names(node[, namespace])

Get the names of all nodes in the ROS system.

create_ros_pack([ros_paths])

get_ros_package_path(package_name)

get_parameter(name, node)

wait_for_message(topic_name, msg_type, node)

is_master_online(node)

sleep(duration, node)

Sleep for a given duration.

get_time(node)

create_timer(duration, callback, node[, oneshot])

Module Contents#

pycram.ros.ros2.ros_tools.logger#
pycram.ros.ros2.ros_tools.get_node_names(node, namespace=None)#

Get the names of all nodes in the ROS system.

Parameters:

namespace – The namespace to search for nodes.

Returns:

A list of node names.

pycram.ros.ros2.ros_tools.create_ros_pack(ros_paths=None)#
pycram.ros.ros2.ros_tools.get_ros_package_path(package_name)#
pycram.ros.ros2.ros_tools.get_parameter(name, node)#
pycram.ros.ros2.ros_tools.wait_for_message(topic_name, msg_type, node)#
pycram.ros.ros2.ros_tools.is_master_online(node)#
pycram.ros.ros2.ros_tools.sleep(duration, node)#

Sleep for a given duration.

Parameters:

duration – The duration to sleep in seconds.

pycram.ros.ros2.ros_tools.get_time(node)#
pycram.ros.ros2.ros_tools.create_timer(duration, callback, node, oneshot=False)#
exception pycram.ros.ros2.ros_tools.ResourceNotFound(*args, **kwargs)#

Bases: Exception

Common base class for all non-exit exceptions.

exception pycram.ros.ros2.ros_tools.ServiceException(*args, **kwargs)#

Bases: Exception

Common base class for all non-exit exceptions.