List iteration, creation, or comprehension I suspect that this can be done in a much neater way using list comprehension in python:

poses = []
for x,y in get_points(spline):
    pose = Pose2D()
    pose.theta = 0
    pose.x=x
    pose.y=y
    poses.append(pose)
return poses


Is there a way to create a nice one liner for the above? (I do not have a constructor that takes the three arguments for Pose2D)
def make_pose(pt):
    pose = Pose2D()
    pose.theta = 0
    pose.x, pose.y = pt
    return pose

poses = [make_pose(pt) for pt in get_points(spline)]


Alternatively, you could subclass Pose2D to give it an appropriate constructor.