Robotics StackExchange | Archived questions

librviz ImageDisplay

Hi all,

I've been trying to simply add a ImageDisplay to the tutorial Libriz, but when I'm doing the same as for a GridDisplay, my image is not in the same window...

What I don't understand is that the function that permits me to add a display in my panel is

rviz::DisplayWrapper* wrapperImRGB = manager_->createDisplay( "rviz/Image", "Camera RGB", true );

I've tried to have another render with another manager but still my ImageDisplay is in another window... I really thought that I just had to have another render_panel and everything would be fine...

I know it's really easy, but I'm not used to use ros or qt... Sorry for the inconvenience...

Thanks for the help.

Brioche (using Ros Fuerte on ubuntu 12.04)

Asked by Brioche on 2012-07-03 20:03:10 UTC

Comments

Answers

Hi all, I just realised that I have several warning when I'm just compiling the tutorial librviz

In file included from /opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreAtomicWrappers.h:33:0,
                 from /opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreResource.h:35,
                 from /opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreMaterial.h:33,
                 from /opt/ros/fuerte/stacks/visualization/rviz/src/rviz/ogre_helpers/grid.h:38,
                 from /home/brieuc/ros_workspace/librviz_tutorial/src/myviz.cpp:46:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::UnimplementedException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<9>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:266:33: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::FileNotFoundException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<6>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:273:32: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::IOException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<0>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:280:22: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::InvalidStateException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<1>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:287:32: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::InvalidParametersException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<2>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:294:37: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::ItemIdentityException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<5>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:301:32: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::ItemIdentityException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<4>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:308:32: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::InternalErrorException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<7>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:315:33: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::RenderingAPIException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<3>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:322:32: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h: In static member function ‘static Ogre::RuntimeAssertionException Ogre::ExceptionFactory::create(Ogre::ExceptionCodeType<8>, const String&, const String&, const char*, long int)’:
/opt/ros/fuerte/stacks/visualization_common/ogre/ogre/include/OGRE/OgreException.h:329:36: warning: parameter ‘code’ set but not used [-Wunused-but-set-parameter]
Linking CXX executable ../bin/myviz

    make[3]: Leaving directory `/home/user/ros_workspace/librviz_tutorial/build'
    [100%] Built target myviz
    make[2]: Leaving directory `/home/user/ros_workspace/librviz_tutorial/build'
    make[1]: Leaving directory `/home/user/ros_workspace/librviz_tutorial/build'

I also tried to add a PointCloud2Display in my grid but whitout success. I suspect all the warning but here the code I wrote to add the point cloud in my grid

// Create a PointCloud display.
  rviz::DisplayWrapper* wrapperPC = manager_->createDisplay( "rviz/PointCloud2", "PointCloud Live", true );
  ROS_ASSERT( wrapperPC != NULL );
  // Unwrap it.
  rviz::Display* displayPC = wrapperPC->getDisplay();
  ROS_ASSERT( displayPC != NULL );
  // Downcast it to the type we think we know it is.
  pointcloud_ = dynamic_cast<rviz::PointCloud2Display*>( displayPC );
  ROS_ASSERT( pointcloud_ != NULL );
  // Configure the GridDisplay the way we like it.
  pointcloud_->setTopic("/voxel_grid/out_put");

where pointcloud_ is a member of Myviz and I can see the pointcloud when I'm running rviz. Anyone has already tried what I'm doing or I'm the first one to intend to use this pluggin?

Thanks

Asked by Brioche on 2012-07-10 18:59:02 UTC

Comments

I cant display pointcloud2s either! I use the same configuration file for RVIZ as I do for my rviz::VisualizationPanel (or rviz::VisualizationFrame).

Asked by omwdunkley on 2012-09-27 03:11:45 UTC