[ros-users] [rviz] Displaying informations

Nicolas nicolas at shadowrobot.com
Mon May 17 16:28:04 UTC 2010


Thank you for your help, my program is now running for the basic shapes
(Arrow, Cube, Sphere, Cylinder, as in the tutorial), but troubles come
when I want to use the TEXT_VIEW_FACING marker.

in my basic_shapes.cpp file, I replaced uint32_t shape =
visualization_msgs::Marker::CUBE by uint32_t shape =
visualization_msgs::Marker::TEXT_VIEW_FACING, and with the other
settings I added a line: marker.text="blablabla"; just to see the
result.

During the compilation, I get that kind of error: 

/.../using_markers/src/basic_shapes.cpp: In function ‘int main(int,
char**)’:
  /.../using_markers/src/using_markers/src/basic_shapes.cpp:12: error:
‘TEXT_VIEW_FACING’ is not a member of ‘visualization_msgs::Marker
  /.../using_markers/src/basic_shapes.cpp:40: error: ‘class
visualization_msgs::Marker’ has no member named ‘text’

It seems like the TEXT_VIEW_FACING is not recognized. Is it normal ? Did
I do something wrong ? Is there something to add ? Or is it just a bug ?

TIA, 

Nicolas


Le vendredi 14 mai 2010 à 10:01 -0700, Josh Faust a écrit :
> Looks like there was a bug in the example.  ros::Time() should have
> been ros::Time::now().  Depending on where you want to display the
> marker, and what setup you're using, the "/my_frame" frame id may need
> to be changed as well.
> 
> Josh
> 
> On Fri, May 14, 2010 at 7:30 AM, Nicolas <nicolas at shadowrobot.com>
> wrote:
>         Hi Josh and thank you for your answers.
>         
>         To display TEXT_VIEW_FACING markers, I thought that it would
>         be a good
>         idea to start with the "basic shapes" tutorial on the wiki,
>         and then to
>         adapt the C++ file to get "dynamic" text instead of shapes
>         shifting
>         every second. Unfortunately for me I was right :(
>         
>         I followed step by step the tutorial, creating my package,
>         implementing
>         basic_shapes.cpp, building and running the code. Everything
>         went
>         perfectly well, but my rviz does not display any shape. I
>         checked with
>         rxgraph that everything was connected and I echoed the
>         visualization_marker node to check the informations that rviz
>         receives.
>         Here is an exemple of the echo result:
>         
>         header:
>          seq: 176
>          stamp: 0
>          frame_id: /my_frame
>         ns: basic_shapes
>         id: 0
>         type: 3
>         action: 0
>         pose:
>          position:
>            x: 0.0
>            y: 0.0
>            z: 0.0
>          orientation:
>            x: 0.0
>            y: 0.0
>            z: 0.0
>            w: 1.0
>         scale:
>          x: 1.0
>          y: 1.0
>          z: 1.0
>         color:
>          r: 0.5
>          g: 0.5
>          b: 0.5
>          a: 0.5
>         lifetime: 0
>         points: []
>         
>         
>         Is everything OK ? I cannot figure what the error is, and my
>         rviz still
>         doesn't display any shape.
>         
>         TIA,
>         
>         Nicolas
>         
>         Le jeudi 13 mai 2010 à 10:35 -0700, Josh Faust a écrit :
>         
>         > Hi Nicolas,
>         >
>         > rviz 1.1 includes a TEXT_VIEW_FACING marker, as well as an
>         option to
>         > keep a marker relative to a frame (frame_locked).
>         >
>         > Do you mean dynamically change the color of one of the robot
>         model
>         > links?  No, there is currently no way of doing that.
>          Another option
>         > is that 1.1 also contains a MESH_RESOURCE marker, so you
>         could create
>         > a mesh of the same type as that link, make it slightly
>         larger and
>         > possibly transparent, and set its color.
>         >
>         > Josh
>         >
>         > On Thu, May 13, 2010 at 8:25 AM, Nicolas
>         <nicolas at shadowrobot.com>
>         > wrote:
>         >         Hello ROS community,
>         >
>         >         I am currently trying to display through rviz some
>         >         informations about my
>         >         robot model (a too high temperature for instance),
>         and I don't
>         >         really
>         >         find a good way to do it. Is there a possibility to
>         display
>         >         informations
>         >         as a floating text next to the <link> the
>         informations are
>         >         about ? Or a
>         >         way to dynamically change the color of a texture ?
>         And if it
>         >         is not
>         >         possible yet, is it planned to be possible in a
>         future
>         >         release ?
>         >
>         >         Thanks in advance,
>         >
>         >         Nicolas
>         >
>         >         _______________________________________________
>         >         ros-users mailing list
>         >         ros-users at code.ros.org
>         >         https://code.ros.org/mailman/listinfo/ros-users
>         >
>         > _______________________________________________
>         > ros-users mailing list
>         > ros-users at code.ros.org
>         > https://code.ros.org/mailman/listinfo/ros-users
>         
>         
>         _______________________________________________
>         ros-users mailing list
>         ros-users at code.ros.org
>         https://code.ros.org/mailman/listinfo/ros-users
>         
> 
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users





More information about the ros-users mailing list