I don’t exactly understand this solution. Why is there robot_pose=Pose() in the beginning? Why PoseWithCovarianceStamped in later steps? It would be helpful if you could let me understand the code in a better way.
Hi @apurva.mramdham,
The Subscriber ’/amcl_pose’ returns a PoseWithCovarianceStamped message. The callback extracts the pose from that message (robot_pose = msg.pose.pose) and the service returns just that pose. Have a look at those two message types here:
PoseWithCovarianceStamped
Pose
I hope that explained it
Hello together,
I honestly don’t understand the meaning of robot_pose = Pose() and the import of Pose exactly either. It also works if you omit the line, doesn’t it?
Best regards
Sebastian
@viswadeepkopalli2000
Thank you very much for the understandable and detailed explanation. Makes Sense ;). I have now been able to apply and understand it in another task!
Best regards
Sebastian
Great explanation @viswadeepkopalli2000 ! Many thanks for helping out answering this question.