Skip to content

Instantly share code, notes, and snippets.

@peteflorence
Created September 6, 2016 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peteflorence/c854d1ba819f2a574762c8ccbeeeabe5 to your computer and use it in GitHub Desktop.
Save peteflorence/c854d1ba819f2a574762c8ccbeeeabe5 to your computer and use it in GitHub Desktop.
visualization_msgs::Marker marker;
marker.header.frame_id = "ortho_body";
marker.header.stamp = ros::Time::now();
marker.ns = "my_namespace";
marker.id = 0;
marker.type = visualization_msgs::Marker::SPHERE;
marker.action = visualization_msgs::Marker::ADD;
marker.pose.position.x = carrot_ortho_body_frame(0);
marker.pose.position.y = carrot_ortho_body_frame(1);
marker.pose.position.z = carrot_ortho_body_frame(2);
marker.scale.x = 0.5;
marker.scale.y = 0.5;
marker.scale.z = 0.5;
marker.color.a = 0.5; // Don't forget to set the alpha!
marker.color.r = 0.9;
marker.color.g = 0.4;
marker.color.b = 0.0;
carrot_pub.publish( marker );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment