コード例 #1
0
void DroneRvizDisplay::initMenu(int i)
{

    std::ostringstream s;

    s << "Drone " << i;

    h_mode_last = menu_handler.insert( sub_menu_handle, s.str(), &modeCb );
    menu_handler.setCheckState( h_mode_last, MenuHandler::UNCHECKED );
    h_mode_last = 2;
    menu_handler.setCheckState( h_mode_last, MenuHandler::CHECKED );  //try
    //

    ROS_INFO("INIT");
    //obstacles.ns="zero";


}
コード例 #2
0
#include "RvizInteractiveMarkerDisplay.h"

using namespace visualization_msgs;
using namespace interactive_markers;

//Menu Initialize
MenuHandler menu_handler;
MenuHandler::EntryHandle h_first_entry;
MenuHandler::EntryHandle h_mode_last=2;
MenuHandler::EntryHandle sub_menu_handle = menu_handler.insert( "Drone Selection" );

//Server Initialize
boost::shared_ptr<interactive_markers::InteractiveMarkerServer> server;

//Marker objects
visualization_msgs::Marker obstacles;
visualization_msgs::Marker walls;
visualization_msgs::Marker line_strip;
visualization_msgs::Marker point;

//Initialize Markers
int ini = 0;
int iniMP = 0;
int iniO = 0;


//-------------------------Create Markers(Box / Sphere)------------------------------------------------//


Marker makeBox( InteractiveMarker &msg )
{