Open
Description
Is there a way to use directly the pose from AMCL (PoseWithCovarianceStamped) in the ros3d.Pose() widget? Right now I have to create another publisher to publish a PoseStamped message using this code :
pose_msg = Pose()
def amcl_callback(msg):
global pose_msg
pose_msg = msg.pose.pose
pose = PoseStamped()
pose.header.seq = 1
pose.header.stamp = rospy.Time.now()
pose.header.frame_id = "map"
pose.pose.position.x = pose_msg.position.x
pose.pose.position.y = pose_msg.position.y
pose.pose.position.z = 0.0
pose.pose.orientation.x = pose_msg.orientation.x
pose.pose.orientation.y = pose_msg.orientation.y
pose.pose.orientation.z = pose_msg.orientation.z
pose.pose.orientation.w = pose_msg.orientation.w
pose_pub.publish(pose)
Metadata
Metadata
Assignees
Labels
No labels