ros_gazebo_gym.common.markers.sample_region_marker

Contains a class that can be used for displaying a sampling region marker in RViz.

Note

This class overloads the visualization_msgs.msgs.Marker class in order to pre-initialize some of its attributes. It further also adds the ability to specify the marker scale using s``x``, y, z max and min values.

Module Contents

Classes

SampleRegionMarker

RViz goal sample region marker.

class ros_gazebo_gym.common.markers.sample_region_marker.SampleRegionMarker(x=0, y=0, z=0, x_min=None, y_min=None, z_min=None, x_max=None, y_max=None, z_max=None, frame_id=None, *args, **kwargs)[source]

Bases: visualization_msgs.msg.Marker

RViz goal sample region marker.

id

The marker object id.

Type:

int

type

The marker type.

Type:

str

action

The marker message action (add or remove).

Type:

float

color

The marker color.

Type:

std_msgs.ColorRGBA

lifetime

The lifetime duration.

Type:

:rospy.Duration

frame_locked

Boolean specifying whether the marker frame is locked to the world.

Type:

bool

point

The marker points.

Type:

geometry_msgs.Point

text

The text that is used for text markers.

Type:

str

mesh_resource

Marker mess location.

Type:

str

mesh_use_embedded_materials

Boolean specifying whether we want to use a mesh.

Type:

bool

Important

The x, y, z min/max values take precedence over x y z position values, which take precedence over position and scale values.

Initialize SampleRegionMarker object.

Parameters:
  • x_min (float, optional) – The min x position of the marker. Defaults to None.

  • y_min (float, optional) – The min y position of the marker. Defaults to None.

  • z_min (float, optional) – The min z position of the marker. Defaults to None.

  • x_max (float, optional) – The max x position of the marker. Defaults to None.

  • y_max (float, optional) – The max y position of the marker. Defaults to None.

  • z_max (float, optional) – The max z position of the marker. Defaults to None.

  • frame_id (str, optional) – The frame the position/orientation are relative to. Defaults to None.

  • *args – Arguments passed to the Marker super class.

  • **kwargs – Keyword arguments that are passed to the Marker super class.

Raises:

Exception – Thrown when the ROS time is not initialised.

property x[source]

Retrieve the marker x position.

property y[source]

Retrieve the marker y position.

property z[source]

Retrieve the marker z position.

property x_min[source]

Retrieve the value of x_min.

property y_min[source]

Retrieve the value of y_min.

property z_min[source]

Retrieve the value of z_min.

property x_max[source]

Retrieve the value of x_max.

property y_max[source]

Retrieve the value of y_max.

property z_max[source]

Retrieve the value of z_max.

property scale[source]

Get marker scale.

property pose[source]

Retrieve marker pose.