Apply transform to visualization marker
I create a visualization marker with circle shape in this way:
from geometry_msgs.msg import Point, Quaternion
from visualization_msgs.msg import Marker
marker = Marker()
marker.type = Marker.LINE_STRIP
marker.action = Marker.ADD
marker.pose.orientation = Quaternion(0,0,0,1)
marker.scale.x = 0.01
marker.color.g = 1.0
marker.color.a = 1.0
centre_x = x
centre_y = y
R = radius
delta_th = 0.01
for th in numpy.arange(0.0, 2*math.pi+delta_th, delta_th):
x = centre_x + R * math.sin(th)
y = centre_y + R * math.cos(th)
point = Point()
point.x = x
point.y = y
marker.points.append(point)
marker.ns = "circle"
marker.header.frame_id = "P"
I would like to apply a transform operation like translation, rotation or scalation to this marker.
Is there an already developed way to do it? Or I would have to recalculate the marker.points with new parameters in the circle equation?
I thought about applying translation/rotation matrix to each point of marker.points array but I don't know how I could proceed with scale operation