ros_gazebo_gym.common.markers.target_marker

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

Note

This class overloads the visualization_msgs.msgs.Marker class in order to pre-initialize some of its attributes.

Module Contents

Classes

TargetMarker

RViz target goal marker.

class ros_gazebo_gym.common.markers.target_marker.TargetMarker(x=0, y=0, z=0, frame_id=None, *args, **kwargs)[source]

Bases: visualization_msgs.msg.Marker

RViz target goal marker.

id

The marker object id.

Type:

int

type

The marker type.

Type:

str

action

The marker message action (add or remove).

Type:

float

scale

The marker scale.

Type:

geometry_msgs.Vector3

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

If both the x,y,z positions and a Pose is supplied the x,y,z positions are used.

Initialize TargetMarker object.

Parameters:
  • x (int, optional) – The target marker x position. Defaults to 0.

  • y (int, optional) – The target marker y position. Defaults to 0.

  • z (int, optional) – The target marker z position. Defaults to 0.

  • 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 pose[source]

Retrieve the marker pose.

publish_tf(tf_frame_name)[source]

Publish a tf frame for the marker.

Parameters:

tf_frame_name (str, optional) – The name used for the tf frame. Defaults to None (i.e. frame name will be autogenerated).