Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions source/Concepts/Basic/About-Interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,49 @@ Field types can be:

(*) All types that are more permissive than their ROS definition enforce the ROS constraints in range and length by software.

These array and sequence types have special mappings in Python. Any subclass of **collections.abc.Sequence** can be passed in for an array.
If a container or type is not mentioned then the default mapping is used.

.. list-table::
:header-rows: 1

* - IDL type
- IDL details
- Python type
- Notes
* - T[N]
- Numeric types:
float, double,
int8, uint8,
int16, uint16,
int32, uint32,
int64, uint64
- numpy.ndarray(
shape=(N, ),
dtype=numpy.DT)
- shape = (N,)
where DT is based on T:
float -> float32
double -> float64
intX -> intX
uintX -> uintX
* - sequence<T>
- Unbounded sequence
of numeric T
- array.array(
typecode )
- typecode based on T:
f, d, b, B,
h, H, l, L,
q, Q
* - sequence<T, N>
- Bounded sequence
of numeric T
- array.array(
typecode )
- Same typecodes
as above

*Example of message definition using arrays and bounded types:*

.. code-block:: bash
Expand Down
Loading