ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You need to initialized quaternion of marker

add four line under marker = Marker()

marker.pose.orientation.x = 0.0
marker.pose.orientation.y = 0.0
marker.pose.orientation.z = 0.0
marker.pose.orientation.w = 1.0

or

from geometry_msgs.msg import Quaternion

# your code

marker = Marker()
marker.pose.orientation = Quaternion(0.0, 0.0, 0.0, 1.0)