src/visualizations/path_display.py
def create_line_marker(self, ptsList,
                           scale=_DEFAULTSCALE, color=_GREEN,
                           mrkrNS=_NAMESPACE):
        """ Return a marker composed of the points """
        # Create marker
        trace = Marker()
        # Populate header
        trace.header.stamp = rospy.Time.now()
        trace.header.frame_id = "base"
        # Set marker info for a persistent marker
        trace.ns = mrkrNS
        trace.action = trace.ADD
        trace.type = trace.LINE_STRIP
        trace.id = 200 + self.get_next_index()
        # How long the object should last before being automatically deleted.
        # 0 means forever
        trace.lifetime = rospy.Duration(0)
        # Set marker size
        # Line strips: Only scale.x is used and it controls
        # the width of the line segments.
        trace.scale.x = scale
        # Set marker color
        trace.color.a = 1.0
        trace.color.r = color[0]
        trace.color.g = color[1]
        trace.color.b = color[2]
        # Set the marker pose
        trace.pose = origin_pose()
        # Build the points list
        for pnt in ptsList:
            mrkrPnt = Point()
            mrkrPnt.x = pnt[0]
            mrkrPnt.y = pnt[1]
            mrkrPnt.z = pnt[2]
            trace.points.append(mrkrPnt)
        # Return marker
        return trace
 Return a marker composed of the points 
Return a marker composed of the points
Return a marker composed of the points
def create_line_marker(self, ptsList,
                           scale=_DEFAULTSCALE, color=_GREEN,
                           mrkrNS=_NAMESPACE):
        trace = Marker()
        trace.header.stamp = rospy.Time.now()
        trace.header.frame_id = "base"
        trace.ns = mrkrNS
        trace.action = trace.ADD
        trace.type = trace.LINE_STRIP
        trace.id = 200 + self.get_next_index()
        trace.lifetime = rospy.Duration(0)
        trace.scale.x = scale
        trace.color.a = 1.0
        trace.color.r = color[0]
        trace.color.g = color[1]
        trace.color.b = color[2]
        trace.pose = origin_pose()
        for pnt in ptsList:
            mrkrPnt = Point()
            mrkrPnt.x = pnt[0]
            mrkrPnt.y = pnt[1]
            mrkrPnt.z = pnt[2]
            trace.points.append(mrkrPnt)
        return trace
def create_line_marker ( self , ptsList , scale = _DEFAULTSCALE , color = _GREEN , mrkrNS = _NAMESPACE ) : trace = Marker ( ) trace . header . stamp = rospy . Time . now ( ) trace . header . frame_id = "base" trace . ns = mrkrNS trace . action = trace . ADD trace . type = trace . LINE_STRIP trace . id = 200 + self . get_next_index ( ) trace . lifetime = rospy . Duration ( 0 ) trace . scale . x = scale trace . color . a = 1.0 trace . color . r = color [ 0 ] trace . color . g = color [ 1 ] trace . color . b = color [ 2 ] trace . pose = origin_pose ( ) for pnt in ptsList : mrkrPnt = Point ( ) mrkrPnt . x = pnt [ 0 ] mrkrPnt . y = pnt [ 1 ] mrkrPnt . z = pnt [ 2 ] trace . points . append ( mrkrPnt ) return trace
Return a marker composed of the points
Return a marker composed of the points
""" Return a marker composed of the points """ # Create marker # Populate header # Set marker info for a persistent marker # How long the object should last before being automatically deleted. # 0 means forever # Set marker size # Line strips: Only scale.x is used and it controls # the width of the line segments. # Set marker color # Set the marker pose # Build the points list # Return marker
self
ptsList
scale
color
mrkrNS