rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.core Namespace Reference

Stand-ins for `rospy.core` in ROS2. More...

Functions

 get_node_uri ()
 Returns empty string (ROS1 compatibility stand-in).
 
 get_ros_root (required=False, env=None)
 Returns rclpy share directory.
 
 is_shutdown ()
 Returns whether ROS2 has been started and shut down.
 
 parse_rosrpc_uri (uri)
 Utility function for parsing ROS-RPC URIs.
 
 signal_shutdown (reason)
 Initiates shutdown process.
 

Variables

str ROSRPC = "rosrpc://"
 

Detailed Description

Stand-ins for `rospy.core` in ROS2.

Function Documentation

◆ get_node_uri()

rosros.rospify.core.get_node_uri ( )

Returns empty string (ROS1 compatibility stand-in).

Definition at line 40 of file core.py.

◆ get_ros_root()

rosros.rospify.core.get_ros_root (   required = False,
  env = None 
)

Returns rclpy share directory.

In ROS1, this returns a path along the lines of "/opt/ros/noetic/share/ros".

Parameters
envignored (ROS1 compatibility stand-in)
requiredfail with ROSException if not found
Returns
rclpy share directory path
Exceptions
ROSExceptionif `require` is True and result unavailable

Definition at line 55 of file core.py.

◆ is_shutdown()

rosros.rospify.core.is_shutdown ( )

Returns whether ROS2 has been started and shut down.

Definition at line 26 of file core.py.

◆ parse_rosrpc_uri()

rosros.rospify.core.parse_rosrpc_uri (   uri)

Utility function for parsing ROS-RPC URIs.

Parameters
uriROSRPC URI
Returns
(address, port)
Exceptions
ParameterInvalidif uri is not a valid ROSRPC URI

Definition at line 73 of file core.py.

◆ signal_shutdown()

rosros.rospify.core.signal_shutdown (   reason)

Initiates shutdown process.

Parameters
reasonignored (ROS1 compatibility stand-in)

Definition at line 36 of file core.py.

Variable Documentation

◆ ROSRPC

str rosros.rospify.core.ROSRPC = "rosrpc://"

Definition at line 64 of file core.py.