robot_msgs

Plane

coef = (a, b, c, d): the points with a·x + b·y + c·z + d = 0, in the frame the owner names. (a, b, c) is the normal and need not be a unit vector, as in ROS.

Import
from robot_msgs.shape import Plane
ROS 2shape_msgs/msg/Plane

Preview

The figure robot_msgs.viz.plot(example) draws for the example below.

Plot of an example Plane

Fields

NameTypeDefault
coefArrayrequired

Example

One instance from the package's own test catalog; the output is its real repr().

Plane(coef=[ 0.  ,  0.  ,  1.  , -0.75])
to_dict() as JSON
{
  "_type": "shape/Plane",
  "coef": {
    "dtype": "<f8",
    "shape": [4],
    "data": [0.0, 0.0, 1.0, -0.75]
  }
}

Long arrays are cut after 16 values and say so with “…”.

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_point_normal(point: Any, normal: Any) -> Plane

The plane through point with the given normal (any length); coef comes out with a

from_dict

from Msg
from_dict(data: Mapping[str, Any]) -> M

No docstring.

Properties

Read-only views computed from the fields.

a: float

No docstring.

b: float

No docstring.

c: float

No docstring.

d: float

No docstring.

normal: Vector3

The unit normal (a, b, c) / |(a, b, c)|.

Methods

Return new values; messages are never mutated.

distance(points: Any) -> Any

Signed distance (m), positive on the side the normal points to.

normalized() -> Plane

The same plane with a unit normal.

replace

from Msg
replace(**changes: Any) -> M

A copy with some fields changed. Validation runs again.

to_dict

from Msg
to_dict() -> dict[str, Any]

JSON-safe dict with a "_type" key; arrays keep their dtype and shape.

No other type refers to it, and it refers to none.

robot_msgs 0.2.0 @ 22ec67fGitHub · MIT license · generated from the package, not written per type