30 #include <OgreSceneNode.h> 31 #include <OgreSceneManager.h> 53 "Advanced: set the size of the incoming LaserScan message queue. " 54 " Increasing this is useful if your incoming TF data is delayed significantly " 55 "from your LaserScan data, but it can greatly increase memory usage if the messages are big.",
85 "Laser scan time, computed from time_increment * len(ranges), is rather large: %1s.\n" 86 "The display of any message will be delayed by this amount of time!")
92 sensor_msgs::PointCloudPtr cloud(
new sensor_msgs::PointCloud);
94 std::string frame_id = scan->header.frame_id;
97 ros::Duration tolerance(scan->time_increment * scan->ranges.size());
109 #pragma GCC diagnostic push 110 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 116 #pragma GCC diagnostic pop 123 ROS_DEBUG(
"LaserScan [%s]: failed to transform scan: %s. This message should not repeat (tolerance " 124 "should now be set on our tf::MessageFilter).",
125 qPrintable(
getName()), e.what());
tf2_ros::MessageFilter< sensor_msgs::LaserScan > * tf_filter_
virtual tf::TransformListener * getTFClient() const =0
Convenience function: returns getFrameManager()->getTFClient().
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz...
laser_geometry::LaserProjection * projector_
ros::NodeHandle update_nh_
A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).
void initialize(DisplayContext *context, Ogre::SceneNode *scene_node)
void processMessage(const sensor_msgs::LaserScanConstPtr &scan) override
Process a single message. Overridden from MessageFilterDisplay.
virtual void unsubscribe()
Property specialized to provide max/min enforcement for integers.
Ogre::SceneNode * scene_node_
The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
Displays a point cloud of type sensor_msgs::PointCloud.
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
void update(float wall_dt, float ros_dt) override
Called periodically by the visualization manager.
void checkTolerance(int tolerance)
void addMessage(const sensor_msgs::PointCloudConstPtr &cloud)
void setCallbackQueue(CallbackQueueInterface *queue)
void setTolerance(const ros::Duration &tolerance)
virtual QString getName() const
Return the name of this Property as a QString.
virtual void setQueueSize(uint32_t new_queue_size)
IntProperty * queue_size_property_
Visualizes a laser scan, received as a sensor_msgs::LaserScan.
virtual int getInt() const
Return the internal property value as an integer.
void reset() override
Called to tell the display to clear its state.
void onInitialize() override
void transformLaserScanToPointCloud(const std::string &target_frame, const sensor_msgs::LaserScan &scan_in, sensor_msgs::PointCloud &cloud_out, tf::Transformer &tf, double range_cutoff, int channel_options=channel_option::Default)
ros::Duration filter_tolerance_
~LaserScanDisplay() override
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
void onInitialize() override
Do initialization. Overridden from MessageFilterDisplay.
PointCloudCommon * point_cloud_common_
virtual ros::CallbackQueueInterface * getThreadedQueue()=0
Return a CallbackQueue using a different thread than the main GUI one.
void update(float wall_dt, float ros_dt)