35 #define BOOST_PARAMETER_MAX_ARITY 7 37 #include <Eigen/Geometry> 54 "Amount of transparency to apply to the polygon.",
79 for (
size_t i =
clouds_.size(); i < num; i++) {
80 Ogre::SceneNode* node =
scene_node_->createChildSceneNode();
85 node->attachObject(cloud);
92 for (
size_t i = num; i <
clouds_.size(); i++) {
109 const jsk_recognition_msgs::SimpleOccupancyGridArray::ConstPtr& msg)
111 Ogre::ColourValue white(1, 1, 1, 1);
113 for (
size_t i = 0; i < msg->grids.size(); i++) {
114 Ogre::SceneNode* node =
nodes_[i];
116 const jsk_recognition_msgs::SimpleOccupancyGrid grid = msg->grids[i];
117 Ogre::Vector3 position;
118 Ogre::Quaternion quaternion;
121 geometry_msgs::Pose plane_pose;
123 Eigen::Affine3f plane_pose_eigen = plane->coordinates();
128 std::ostringstream oss;
129 oss <<
"Error transforming pose";
130 oss <<
" from frame '" << grid.header.frame_id <<
"'";
131 oss <<
" to frame '" << qPrintable(
fixed_frame_) <<
"'";
136 node->setPosition(position);
137 node->setOrientation(quaternion);
139 std::vector<rviz::PointCloud::Point> points;
140 for (
size_t ci = 0; ci < grid.cells.size(); ci++) {
141 const geometry_msgs::Point
p = grid.cells[ci];
152 points.push_back(point);
156 if (!points.empty()) {
157 cloud->
addPoints(&points.front(), points.size());
void addPoints(Point *points, uint32_t num_points)
virtual void onInitialize()
rviz::FloatProperty * alpha_property_
void setRenderMode(RenderMode mode)
void poseEigenToMsg(const Eigen::Affine3d &e, geometry_msgs::Pose &m)
PLUGINLIB_EXPORT_CLASS(jsk_rviz_plugins::PictogramArrayDisplay, rviz::Display)
DisplayContext * context_
rviz::BoolProperty * auto_color_property_
std::vector< Ogre::SceneNode * > nodes_
Ogre::SceneNode * scene_node_
Ogre::ColourValue colorMsgToOgre(const std_msgs::ColorRGBA &c)
void setCommonUpVector(const Ogre::Vector3 &vec)
void setDimensions(float width, float height, float depth)
bool transform(const Header &header, const geometry_msgs::Pose &pose, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
virtual FrameManager * getFrameManager() const=0
void setAlpha(float alpha, bool per_point_alpha=false)
Ogre::SceneManager * scene_manager_
void processMessage(const jsk_recognition_msgs::SimpleOccupancyGridArray::ConstPtr &msg)
virtual void allocateCloudsAndNodes(const size_t num)
virtual ~SimpleOccupancyGridArrayDisplay()
virtual void queueRender()=0
virtual float getFloat() const
void onInitialize() override
void setCommonDirection(const Ogre::Vector3 &vec)
#define ROS_ERROR_STREAM(args)
virtual bool getBool() const
std::vector< rviz::PointCloud * > clouds_
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
SimpleOccupancyGridArrayDisplay()