void CovarianceDisplay::createProperties () { topic_property_ = property_manager_->createProperty<rviz::ROSTopicStringProperty> ("Topic", property_prefix_, boost::bind (&CovarianceDisplay::getTopic, this), boost::bind (&CovarianceDisplay::setTopic, this, _1), parent_category_, this ); setPropertyHelpText (topic_property_, "geometry_msgs::PoseWithCovarianceStamped topic to subscribe to."); rviz::ROSTopicStringPropertyPtr topic_prop = topic_property_.lock (); topic_prop->setMessageType (ros::message_traits::datatype <geometry_msgs::PoseWithCovarianceStamped> ()); color_property_ = property_manager_->createProperty<rviz::ColorProperty> ("Color", property_prefix_, boost::bind (&CovarianceDisplay::getColor, this), boost::bind (&CovarianceDisplay::setColor, this, _1), parent_category_, this); setPropertyHelpText (color_property_, "Color to draw the ellipse."); alpha_property_ = property_manager_->createProperty<rviz::FloatProperty> ("Alpha", property_prefix_, boost::bind (&CovarianceDisplay::getAlpha, this), boost::bind (&CovarianceDisplay::setAlpha, this, _1), parent_category_, this); setPropertyHelpText (alpha_property_, "0 is fully transparent, 1.0 is fully opaque."); scale_property_ = property_manager_->createProperty<rviz::FloatProperty> ("Scale", property_prefix_, boost::bind (&CovarianceDisplay::getScale, this), boost::bind (&CovarianceDisplay::setScale, this, _1), parent_category_, this); setPropertyHelpText (scale_property_, "Ellipse scale factor."); }
void NXTUltrasonicDisplay::createProperties() { topic_property_ = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "Topic", property_prefix_, boost::bind( &NXTUltrasonicDisplay::getTopic, this ), boost::bind( &NXTUltrasonicDisplay::setTopic, this, _1 ), parent_category_, this ); setPropertyHelpText(topic_property_, "nxt_msgs::Range topic to subscribe to."); rviz::ROSTopicStringPropertyPtr topic_prop = topic_property_.lock(); topic_prop->setMessageType(ros::message_traits::datatype<nxt_msgs::Range>()); color_property_ = property_manager_->createProperty<rviz::ColorProperty>( "Color", property_prefix_, boost::bind( &NXTUltrasonicDisplay::getColor, this ), boost::bind( &NXTUltrasonicDisplay::setColor, this, _1 ), parent_category_, this ); setPropertyHelpText(color_property_, "Color to draw the range."); alpha_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Alpha", property_prefix_, boost::bind( &NXTUltrasonicDisplay::getAlpha, this ), boost::bind( &NXTUltrasonicDisplay::setAlpha, this, _1 ), parent_category_, this ); setPropertyHelpText(alpha_property_, "Amount of transparency to apply to the range."); }
void CButCobDisplay::createProperties() { // Create some properties rviz::CategoryPropertyWPtr category = property_manager_->createCategory( "Camera position", property_prefix_, parent_category_ ); if( category.expired() ) { std::cerr << "Pointer expired..." << std::endl; return; } m_property_position = property_manager_->createProperty<rviz::StringProperty>( "Position: ", property_prefix_, boost::bind( &CButCobDisplay::getCameraPositionString, this), boost::bind( &CButCobDisplay::setCameraPositionString, this, _1), parent_category_ ); //m_property_position.lock(); if( m_property_position.expired() ) { std::cerr << "Property expired... " << std::endl; } // Set help text setPropertyHelpText(m_property_position, "Current camera position."); }
void AxesDisplay::createProperties() { frame_property_ = property_manager_->createProperty<TFFrameProperty>("Reference Frame", property_prefix_, boost::bind(&AxesDisplay::getFrame, this), boost::bind(&AxesDisplay::setFrame, this, _1), parent_category_, this); setPropertyHelpText(frame_property_, "The TF frame these axes will use for their origin."); length_property_ = property_manager_->createProperty<FloatProperty>( "Length", property_prefix_, boost::bind( &AxesDisplay::getLength, this ), boost::bind( &AxesDisplay::setLength, this, _1 ), parent_category_, this ); FloatPropertyPtr float_prop = length_property_.lock(); float_prop->setMin( 0.0001 ); setPropertyHelpText(length_property_, "Length of each axis, in meters."); radius_property_ = property_manager_->createProperty<FloatProperty>( "Radius", property_prefix_, boost::bind( &AxesDisplay::getRadius, this ), boost::bind( &AxesDisplay::setRadius, this, _1 ), parent_category_, this ); float_prop = radius_property_.lock(); float_prop->setMin( 0.0001 ); setPropertyHelpText(radius_property_, "Width of each axis, in meters."); }
void CameraDisplaySave::createProperties() { topic_property_ = property_manager_->createProperty<ROSTopicStringProperty>( "Image Topic", property_prefix_, boost::bind( &CameraDisplaySave::getTopic, this ), boost::bind( &CameraDisplaySave::setTopic, this, _1 ), parent_category_, this ); setPropertyHelpText(topic_property_, "sensor_msgs::Image topic to subscribe to. The topic must be a well-formed <strong>camera</strong> topic, and in order to work properly must have a matching <strong>camera_info<strong> topic."); ROSTopicStringPropertyPtr topic_prop = topic_property_.lock(); topic_prop->setMessageType(ros::message_traits::datatype<sensor_msgs::Image>()); alpha_property_ = property_manager_->createProperty<FloatProperty>( "Alpha", property_prefix_, boost::bind( &CameraDisplaySave::getAlpha, this ), boost::bind( &CameraDisplaySave::setAlpha, this, _1 ), parent_category_, this ); setPropertyHelpText(alpha_property_, "The amount of transparency to apply to the camera image."); transport_property_ = property_manager_->createProperty<EditEnumProperty>("Transport Hint", property_prefix_, boost::bind(&CameraDisplaySave::getTransport, this), boost::bind(&CameraDisplaySave::setTransport, this, _1), parent_category_, this); EditEnumPropertyPtr ee_prop = transport_property_.lock(); ee_prop->setOptionCallback(boost::bind(&CameraDisplaySave::onTransportEnumOptions, this, _1)); }
void ShapeDisplay::createProperties() { marker_topic_property_ = property_manager_->createProperty<ROSTopicStringProperty>( "Marker Topic", property_prefix_, boost::bind( &ShapeDisplay::getMarkerTopic, this ), boost::bind( &ShapeDisplay::setMarkerTopic, this, _1 ), parent_category_, this ); setPropertyHelpText(marker_topic_property_, "cob_3d_mapping_msgs::Shape topic to subscribe to. <topic>_array will also automatically be subscribed with type cob_3d_mapping_msgs::ShapeArray."); ROSTopicStringPropertyPtr topic_prop = marker_topic_property_.lock(); topic_prop->setMessageType(ros::message_traits::datatype<cob_3d_mapping_msgs::Shape>()); namespaces_category_ = property_manager_->createCategory("Namespaces", property_prefix_, parent_category_, this); }
void PointCloud2Display::createProperties() { topic_property_ = property_manager_->createProperty<ROSTopicStringProperty>( "Topic", property_prefix_, boost::bind( &PointCloud2Display::getTopic, this ), boost::bind( &PointCloud2Display::setTopic, this, _1 ), parent_category_, this ); setPropertyHelpText(topic_property_, "sensor_msgs::PointCloud2 topic to subscribe to."); ROSTopicStringPropertyPtr topic_prop = topic_property_.lock(); topic_prop->setMessageType(ros::message_traits::datatype<sensor_msgs::PointCloud2>()); PointCloudBase::createProperties(); }
void CButContextManager::createProperties() { rviz::CategoryPropertyWPtr category_context = property_manager_->createCategory("Context", property_prefix_, parent_category_); m_property_status_ = property_manager_->createProperty<rviz::EnumProperty>( "Context status", property_prefix_, boost::bind(&CButContextManager::getContextStatus, this), boost::bind(&CButContextManager::setContextStatus, this, _1), category_context, this); setPropertyHelpText(m_property_status_, "Status"); rviz::EnumPropertyPtr enum_prop_s = m_property_status_.lock(); enum_prop_s->addOption("OK", srs_env_model::Context::OK); enum_prop_s->addOption("Emergency", srs_env_model::Context::EMERGENCY); m_property_action_ = property_manager_->createProperty<rviz::EnumProperty>( "Action", property_prefix_, boost::bind(&CButContextManager::getContextAction, this), boost::bind(&CButContextManager::setContextAction, this, _1), category_context, this); setPropertyHelpText(m_property_action_, "Action"); rviz::EnumPropertyPtr enum_prop_a = m_property_action_.lock(); enum_prop_a->addOption("Default", srs_env_model::Context::DEFAULT); enum_prop_a->addOption("Grasping", srs_env_model::Context::GRASPING); enum_prop_a->addOption("Moving", srs_env_model::Context::MOVING); m_property_connection_ = property_manager_->createProperty<rviz::EnumProperty>( "Connection", property_prefix_, boost::bind(&CButContextManager::getContextConnection, this), boost::bind(&CButContextManager::setContextConnection, this, _1), category_context, this); setPropertyHelpText(m_property_connection_, "Connection"); rviz::EnumPropertyPtr enum_prop_c = m_property_connection_.lock(); enum_prop_c->addOption("Unknown", srs_env_model::Context::UNKNOWN); enum_prop_c->addOption("LAN", srs_env_model::Context::LAN); enum_prop_c->addOption("Wifi", srs_env_model::Context::WIFI); m_property_collision_hazard_ = property_manager_->createProperty<rviz::EnumProperty>( "Collision hazard", property_prefix_, boost::bind(&CButContextManager::getContextCollisionHazard, this), boost::bind(&CButContextManager::setContextCollisionHazard, this, _1), category_context, this); setPropertyHelpText(m_property_connection_, "Collision hazard"); rviz::EnumPropertyPtr enum_prop_ch = m_property_collision_hazard_.lock(); enum_prop_ch->addOption("None", srs_env_model::Context::NONE); enum_prop_ch->addOption("Low", srs_env_model::Context::LOW); enum_prop_ch->addOption("Medium", srs_env_model::Context::MEDIUM); enum_prop_ch->addOption("High", srs_env_model::Context::HIGH); enum_prop_ch->addOption("Collision", srs_env_model::Context::COLLISION); }
/*! Override createProperties() to build and configure a Property object for each user-editable property. ``property_manager_``, ``property_prefix_``, and ``parent_category_`` are all initialized before this is called. */ void ImageMapDisplay::createProperties(){ relPoseTopicProperty = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "RelativePoseTopic", property_prefix_, boost::bind(&ImageMapDisplay::getRelPoseTopic, this), boost::bind(&ImageMapDisplay::setRelPoseTopic, this, _1), parent_category_, this ); absPoseTopicProperty = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "AbsolutePoseTopic", property_prefix_, boost::bind(&ImageMapDisplay::getAbsPoseTopic, this), boost::bind(&ImageMapDisplay::setAbsPoseTopic, this, _1), parent_category_, this ); imageStoreTopicProperty = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "ImageStoreTopic", property_prefix_, boost::bind(&ImageMapDisplay::getImageStoreTopic, this), boost::bind(&ImageMapDisplay::setImageStoreTopic, this, _1), parent_category_, this ); mobotPoseCountProperty = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "MobotPoseCount", property_prefix_, boost::bind(&ImageMapDisplay::getMobotPoseCount, this), boost::bind(&ImageMapDisplay::setMobotPoseCount, this, _1), parent_category_, this ); setPropertyHelpText(relPoseTopicProperty, "Relative pose topic to subscribe to."); setPropertyHelpText(absPoseTopicProperty, "Absolute pose topic to subscribe to."); setPropertyHelpText(imageStoreTopicProperty, "Image Store topic to connect to."); setPropertyHelpText(mobotPoseCountProperty, "Number of mobots to connect to and display thier poses."); rviz::ROSTopicStringPropertyPtr relPoseTopicProp = relPoseTopicProperty.lock(); rviz::ROSTopicStringPropertyPtr absPoseTopicProp = absPoseTopicProperty.lock(); //rviz::ROSTopicStringPropertyPtr imageStoreTopicProp = imageStoreTopicProperty.lock(); relPoseTopicProp->setMessageType (ros::message_traits::datatype<mobots_msgs::ImageWithPoseAndID>()); absPoseTopicProp->setMessageType (ros::message_traits::datatype<mobots_msgs::PoseAndID>()); // imageStoreTopicProp->setMessageType // (ros::message_traits::datatype<map_visualization::GetImageWithPose>()); }
void CButDistanceLinearVisualizer::createProperties() { m_property_distance_ = property_manager_->createProperty<rviz::StringProperty>( "Distance: ", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getDistance, this), rviz::StringProperty::Setter(), parent_category_); setPropertyHelpText(m_property_distance_, "Distance between link and closest surface."); rviz::CategoryPropertyWPtr category = property_manager_->createCategory("Options", property_prefix_, parent_category_); // Add subscribed topic property m_property_topic_ = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "Topic", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getTopic, this), boost::bind(&CButDistanceLinearVisualizer::setTopic, this, _1), category, this); // Add helper text setPropertyHelpText(m_property_topic_, "sensor_msgs::PointCloud2 topic to subscribe to."); rviz::ROSTopicStringPropertyPtr topic_prop = m_property_topic_.lock(); topic_prop->setMessageType(ros::message_traits::datatype<sensor_msgs::PointCloud2>()); m_property_link_ = property_manager_->createProperty<rviz::TFFrameProperty>( "Link", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getLinkString, this), boost::bind(&CButDistanceLinearVisualizer::setLinkString, this, _1), category, this); setPropertyHelpText(m_property_link_, "Link from which to measure distance"); m_property_color_ = property_manager_->createProperty<rviz::ColorProperty>( "Color", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getColor, this), boost::bind(&CButDistanceLinearVisualizer::setColor, this, _1), category, this); setPropertyHelpText(m_property_color_, "Line and text color."); m_property_alpha_ = property_manager_->createProperty<rviz::FloatProperty>( "Alpha", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getAlpha, this), boost::bind(&CButDistanceLinearVisualizer::setAlpha, this, _1), category, this); setPropertyHelpText(m_property_alpha_, "Alpha channel."); m_property_thickness_ = property_manager_->createProperty<rviz::FloatProperty>( "Line Thickness", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getThickness, this), boost::bind(&CButDistanceLinearVisualizer::setThickness, this, _1), category, this); setPropertyHelpText(m_property_thickness_, "Line thickness (maximum value is 0,5)."); m_show_distance_property_ = property_manager_->createProperty<rviz::BoolProperty>( "Show distance", property_prefix_, boost::bind(&CButDistanceLinearVisualizer::getShowDistance, this), boost::bind(&CButDistanceLinearVisualizer::setShowDistance, this, _1), category, this); setPropertyHelpText(m_show_distance_property_, "Draw text with distance into the scene."); }
/** * Create properties */ void srs_ui_but::CButProjection::createProperties() { m_rgb_topic_property = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "RGB image Topic", property_prefix_, boost::bind( &CButProjection::getRgbTopic, this ), boost::bind( &CButProjection::setRgbTopic, this, _1 ), parent_category_, this ); m_depth_topic_property = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "Depth image Topic", property_prefix_, boost::bind( &CButProjection::getDepthTopic, this ), boost::bind( &CButProjection::setDepthTopic, this, _1 ), parent_category_, this ); m_distance_property = property_manager_->createProperty<rviz::FloatProperty>( "Tested distance", property_prefix_, boost::bind( &CButProjection::getTestedDistance, this ), boost::bind( &CButProjection::setTestedDistance, this, _1), parent_category_, this ); // Set distance limits rviz::FloatPropertyPtr distp( m_distance_property.lock()); distp->setMin( 0.0 ); distp->setMax( 10.0 ); setPropertyHelpText(m_rgb_topic_property, "sensor_msgs::Image topic to subscribe to."); rviz::ROSTopicStringPropertyPtr topic_prop = m_rgb_topic_property.lock(); topic_prop->setMessageType(ros::message_traits::datatype<sensor_msgs::Image>()); // Set topics setRgbTopic( m_imageRGBInputTopicName ); setDepthTopic( m_imageDepthInputTopicName ); }
// Override createProperties() to build and configure a Property // object for each user-editable property. ``property_manager_``, // ``property_prefix_``, and ``parent_category_`` are all initialized before // this is called. void AmbientSoundDisplay::createProperties()/*{{{*/ { topic_property_ = property_manager_->createProperty<rviz::ROSTopicStringProperty>( "Topic", property_prefix_, boost::bind( &AmbientSoundDisplay::getTopic, this ), boost::bind( &AmbientSoundDisplay::setTopic, this, _1 ), parent_category_, this ); setPropertyHelpText( topic_property_, "jsk_hark_msgs::HarkPower topic to subscribe to." ); rviz::ROSTopicStringPropertyPtr topic_prop = topic_property_.lock(); topic_prop->setMessageType( ros::message_traits::datatype<jsk_hark_msgs::HarkPower>() ); color_property_ = property_manager_->createProperty<rviz::ColorProperty>( "Color", property_prefix_, boost::bind( &AmbientSoundDisplay::getColor, this ), boost::bind( &AmbientSoundDisplay::setColor, this, _1 ), parent_category_, this ); setPropertyHelpText( color_property_, "Color to draw the acceleration arrows." ); alpha_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Alpha", property_prefix_, boost::bind( &AmbientSoundDisplay::getAlpha, this ), boost::bind( &AmbientSoundDisplay::setAlpha, this, _1 ), parent_category_, this ); setPropertyHelpText( alpha_property_, "0 is fully transparent, 1.0 is fully opaque." ); history_length_property_ = property_manager_->createProperty<rviz::IntProperty>( "History Length", property_prefix_, boost::bind( &AmbientSoundDisplay::getHistoryLength, this ), boost::bind( &AmbientSoundDisplay::setHistoryLength, this, _1 ), parent_category_, this ); setPropertyHelpText( history_length_property_, "Number of prior measurements to display." ); width_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Width", property_prefix_, boost::bind( &AmbientSoundDisplay::getWidth, this ), boost::bind( &AmbientSoundDisplay::setWidth, this, _1 ), parent_category_, this ); setPropertyHelpText( width_property_, "Width of line" ); scale_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Scale", property_prefix_, boost::bind( &AmbientSoundDisplay::getScale, this ), boost::bind( &AmbientSoundDisplay::setScale, this, _1 ), parent_category_, this ); setPropertyHelpText( scale_property_, "Scale of line" ); grad_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Grad", property_prefix_, boost::bind( &AmbientSoundDisplay::getGrad, this ), boost::bind( &AmbientSoundDisplay::setGrad, this, _1 ), parent_category_, this ); setPropertyHelpText( grad_property_, "Graduation" ); bias_property_ = property_manager_->createProperty<rviz::FloatProperty>( "Bias", property_prefix_, boost::bind( &AmbientSoundDisplay::getBias, this ), boost::bind( &AmbientSoundDisplay::setBias, this, _1 ), parent_category_, this ); setPropertyHelpText( bias_property_, "Bias to subtract" ); }/*}}}*/