Publishing Marker arrow causes Segmentation fault (core dumped)
Hello,
I am trying to publish a marker arrow and want to visualize it in rviz with a start and an end point.
When I am using the points member as described here http://wiki.ros.org/rviz/DisplayTypes... and try to run it I am getting the following error: Segmentation fault (core dumped).
When I am just using the pose.position and pose.orientatien without the points member the arrow is appearing.
visualization_msgs::Marker markers_msg;
markers_msg.header.frame_id = "world";
markers_msg.header.stamp = ros::Time::now();
markers_msg.ns = "drop";
markers_msg.id = 0;
markers_msg.type = visualization_msgs::Marker::ARROW;
markers_msg.action = visualization_msgs::Marker::ADD;
markers_msg.pose.position.x = 1;
markers_msg.pose.position.y = 1;
markers_msg.pose.position.z = 1;
markers_msg.pose.orientation.x = 0.0;
markers_msg.pose.orientation.y = 0.0;
markers_msg.pose.orientation.z = 0.0;
markers_msg.pose.orientation.w = 1.0;
markers_msg.lifetime = ros::Duration(0);
markers_msg.scale.x = 1;
markers_msg.scale.y = 0.1;
markers_msg.scale.z = 0.1;
markers_msg.color.a = 1.0; // Don't forget to set the alpha!
markers_msg.color.r = 1.0;
markers_msg.color.g = 0.0;
markers_msg.color.b = 0.0;
markers_msg.points[0].x = 0.0f;
markers_msg.points[0].y = 0.0f;
markers_msg.points[0].z = 0.0f;
markers_msg.points[1].x = 1.0f;
markers_msg.points[1].y = 1.0f;
markers_msg.points[1].z = 1.0f;
I hope anyone can help me. Thank you very much in advance!
Kind regards,
Raphael