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

Stand-in for `rclpy` in ROS1. More...

Functions

 create_node (node_name, *context=None, cli_args=None, namespace=None, use_global_arguments=True, enable_rosout=True, start_parameter_services=True, parameter_overrides=None, allow_undeclared_parameters=False, automatically_declare_parameters_from_overrides=False)
 Initializes ROS1 and returns an instance of `rosros.rclify.node.Node`.
 
 get_default_context ()
 Returns None (ROS2 API compatibility stand-in).
 
 get_global_executor ()
 Returns None (ROS2 API compatibility stand-in).
 
 get_rmw_implementation_identifier ()
 Returns empty string (ROS2 API compatibility stand-in).
 
 init (*args=None, context=None)
 Does nothing (ROS2 API compatibility stand-in)
 
 ok (*context=None)
 Returns whether rospy has been initialized and is not shut down.
 
 shutdown (*context=None)
 Sends the shutdown signal to rospy.
 
 spin (node=None, executor=None)
 Waits forever.
 
 spin_once (node=None, *executor=None, timeout_sec=None)
 Waits until timeout or ROS shut down, or forever if timeout not specified.
 
 spin_until_future_complete (node=None, future=None, executor=None, timeout_sec=None)
 Waits until future complete or timeout reached or ROS shut down.
 
 try_shutdown (*context=None)
 Sends the shutdown signal to rospy.
 

Detailed Description

Stand-in for `rclpy` in ROS1.

Heavily modified copy from ROS2 `rclpy`, at https://github.com/ros2/rclpy (`rclpy/rclpy/__init__.py`), released under the Apache 2.0 License.

Function Documentation

◆ create_node()

rosros.rclify.rclify.create_node (   node_name,
context = None,
  cli_args = None,
  namespace = None,
  use_global_arguments = True,
  enable_rosout = True,
  start_parameter_services = True,
  parameter_overrides = None,
  allow_undeclared_parameters = False,
  automatically_declare_parameters_from_overrides = False 
)

Initializes ROS1 and returns an instance of `rosros.rclify.node.Node`.

Parameters
node_namea name to give to the node
contextignored (ROS2 API compatibility stand-in)
cli_argscommand-line arguments to be used by the node
namespacenode namespace
use_global_argumentsshould the node use process-wide command-line arguments
enable_rosoutpublish logging to `/rosout`
start_parameter_servicesignored (ROS2 API compatibility stand-in)
parameter_overrideslist of `Parameter` to override the initial values of parameters declared on the node
allow_undeclared_parametersallow undeclared parameters; this option doesn't affect `parameter_overrides`
automatically_declare_parameters_from_overridesimplicitly declare parameters from `parameter_overrides`
Returns
`rosros.rclify.node.Node`

Definition at line 70 of file rclify.py.

◆ get_default_context()

rosros.rclify.rclify.get_default_context ( )

Returns None (ROS2 API compatibility stand-in).

Definition at line 119 of file rclify.py.

◆ get_global_executor()

rosros.rclify.rclify.get_global_executor ( )

Returns None (ROS2 API compatibility stand-in).

Definition at line 124 of file rclify.py.

◆ get_rmw_implementation_identifier()

rosros.rclify.rclify.get_rmw_implementation_identifier ( )

Returns empty string (ROS2 API compatibility stand-in).

Definition at line 129 of file rclify.py.

◆ init()

rosros.rclify.rclify.init ( args = None,
  context = None 
)

Does nothing (ROS2 API compatibility stand-in)

Parameters
argsignored (ROS2 API compatibility stand-in)
contextignored (ROS2 API compatibility stand-in)

Definition at line 48 of file rclify.py.

◆ ok()

rosros.rclify.rclify.ok ( context = None)

Returns whether rospy has been initialized and is not shut down.

Parameters
contextignored (ROS2 API compatibility stand-in)

Definition at line 139 of file rclify.py.

◆ shutdown()

rosros.rclify.rclify.shutdown ( context = None)

Sends the shutdown signal to rospy.

Parameters
contextignored (ROS2 API compatibility stand-in)

Definition at line 148 of file rclify.py.

◆ spin()

rosros.rclify.rclify.spin (   node = None,
  executor = None 
)

Waits forever.

Parameters
nodeignored (ROS2 API compatibility stand-in)
executorignored (ROS2 API compatibility stand-in)

Definition at line 103 of file rclify.py.

◆ spin_once()

rosros.rclify.rclify.spin_once (   node = None,
executor = None,
  timeout_sec = None 
)

Waits until timeout or ROS shut down, or forever if timeout not specified.

Parameters
nodeignored (ROS2 API compatibility stand-in)
executorignored (ROS2 API compatibility stand-in)
timeout_sectime to wait, as seconds or ROS1 duration

Definition at line 93 of file rclify.py.

◆ spin_until_future_complete()

rosros.rclify.rclify.spin_until_future_complete (   node = None,
  future = None,
  executor = None,
  timeout_sec = None 
)

Waits until future complete or timeout reached or ROS shut down.

Parameters
nodeignored (ROS2 API compatibility stand-in)
futureobject with `concurrent.futures.Future`-conforming interface to complete
executorignored (ROS2 API compatibility stand-in)
timeout_sectime to wait, as seconds or ROS1 duration

Definition at line 115 of file rclify.py.

◆ try_shutdown()

rosros.rclify.rclify.try_shutdown ( context = None)

Sends the shutdown signal to rospy.

Parameters
contextignored (ROS2 API compatibility stand-in)

Definition at line 157 of file rclify.py.