ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 2012-06-21 08:25:57 -0500

joq gravatar image

I generally use disk-shaped markers for way-points, like this:

def mark_way_points(self, color):
    """Create slightly transparent disks for way-points.

    :param color: disk RGBA value
    """
    index = 0
    for wp in self.map_points:
        marker = Marker(header = self.map.header,
                        ns = "waypoints_osm",
                        id = index,
                        type = Marker.CYLINDER,
                        action = Marker.ADD,
                        scale = Vector3(x=2., y=2., z=0.2),
                        color = color,
                        lifetime = self.marker_life)
        index += 1
        # use easting and northing coordinates (ignoring altitude)
        marker.pose.position = wp.toPointXY()
        marker.pose.orientation = Quaternion(x=0., y=0., z=0., w=1.)
        self.msg.markers.append(marker)