rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
All Classes Namespaces Files Functions Variables Properties Pages
rosros.rclify.parameter.Parameter Class Reference

ROS node parameter, a stand-in for ROS2 `rclpy.parameter.Parameter` in ROS1. More...

Classes

class  Type
 ROS parameter type, a stand-in for ROS2 `rclpy.parameter.Parameter.Type` in ROS1. More...
 

Public Member Functions

 __init__ (self, name, type_=None, value=None)
 Raises error if unknown type or given value not of given type.
 
 get_parameter_value (self)
 Returns `ParameterValue`.
 

Static Public Attributes

dict ARRAYS
 Mapping from array types to array element Python types.
 
dict SCALARS
 Mapping from scalar types to Python types.
 

Protected Attributes

 _name
 
 _type_
 
 _value
 

Properties

 name = property
 
 type_ = property
 
 value = property
 

Detailed Description

ROS node parameter, a stand-in for ROS2 `rclpy.parameter.Parameter` in ROS1.

Definition at line 42 of file parameter.py.

Constructor & Destructor Documentation

◆ __init__()

rosros.rclify.parameter.Parameter.__init__ (   self,
  name,
  type_ = None,
  value = None 
)

Raises error if unknown type or given value not of given type.

Definition at line 98 of file parameter.py.

Member Function Documentation

◆ get_parameter_value()

rosros.rclify.parameter.Parameter.get_parameter_value (   self)

Returns `ParameterValue`.

Definition at line 129 of file parameter.py.

Member Data Documentation

◆ _name

rosros.rclify.parameter.Parameter._name
protected

Definition at line 108 of file parameter.py.

◆ _type_

rosros.rclify.parameter.Parameter._type_
protected

Definition at line 107 of file parameter.py.

◆ _value

rosros.rclify.parameter.Parameter._value
protected

Definition at line 109 of file parameter.py.

◆ ARRAYS

dict rosros.rclify.parameter.Parameter.ARRAYS
static
Initial value:
= {Type.BYTE_ARRAY: bytes, Type.BOOL_ARRAY: bool, Type.INTEGER_ARRAY: int,
Type.DOUBLE_ARRAY: float, Type.STRING_ARRAY: str}

Mapping from array types to array element Python types.

Definition at line 94 of file parameter.py.

◆ SCALARS

dict rosros.rclify.parameter.Parameter.SCALARS
static
Initial value:
= {Type.NOT_SET: type(None), Type.BOOL: bool, Type.INTEGER: int,
Type.DOUBLE: float, Type.STRING: str}

Mapping from scalar types to Python types.

Definition at line 90 of file parameter.py.

Property Documentation

◆ name

rosros.rclify.parameter.Parameter.name = property
static

Definition at line 112 of file parameter.py.

◆ type_

rosros.rclify.parameter.Parameter.type_ = property
static

Definition at line 118 of file parameter.py.

◆ value

rosros.rclify.parameter.Parameter.value = property
static

Definition at line 124 of file parameter.py.


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