Ask Your Question
1

Odometry arrows displayed in RViz are too small

asked 2012-09-27 05:14:13 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi everybody, as you can see in the following image, odometry arrows are too small (in the circle you can see a displayed arrows, in the rectangle I painted an enlarged arrow):

image description

I would like to grow up arrow size but I don't know how do it because Odometry type seems to not have a option that allow it: http://www.ros.org/wiki/rviz/DisplayTypes/Odometry

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-09-27 10:54:10 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi

You can set the length of the arrows in rviz.

Go to the odometry tree on the left and change the length value to whatever you want.

edit flag offensive delete link more

Comments

Sorry,in the odometry tree I can find only Color,Topic,Position Tolerance, Angle Tolerance and Keep properties. You see also: http://www.ros.org/wiki/rviz/DisplayTypes/Odometry. Where is the desidered property?

aldo85ita gravatar image aldo85ita  ( 2012-09-28 01:09:36 -0500 )edit

Which ROS distro do you use? electric/fuerte? Which version of RVIZ? I have RVIZ 1.8 on fuerte and there is LENGTH property in odometry tree.

Jakub gravatar image Jakub  ( 2012-10-01 19:29:30 -0500 )edit

I'm using rviz revision number 1.6.7 with ROS electric. I run "sudo apt-get install ros-electric-visualization", but I got "ros-electric-visualization is already the newest version". I could remove ros-electric-visualization and install latest rviz version from src, but it's a boring work, any idea?

aldo85ita gravatar image aldo85ita  ( 2012-10-01 22:08:22 -0500 )edit

You can hack the rviz code i.e.. rviz/src/rviz/default_plugin/odometry_display.cpp. You can iterate the arrows_ member and call setScale() for each arrow. But better approach is to install latest version of rviz from source as there are lots of other improvement as well.

Jakub gravatar image Jakub  ( 2012-10-02 23:50:47 -0500 )edit

Tahnk you Jakub!! I'm followed your suggestion. I modified odometry_display.cpp adding arrows_.setScale(10). But ho to compile it? I run: roscd rviz and rosmake , but recompilation doesn't process the modified file. Any suggestion?

aldo85ita gravatar image aldo85ita  ( 2012-10-03 06:45:55 -0500 )edit

It's not like that. arrows_ is a vector containing markers. You have to iterate through out it using iterator. Try to find a source code of new rviz and copy the OdometryDisplay::setLength function. For compilation you should make an overlay of rviz stack and compile it outside of /opt/ros directory

Jakub gravatar image Jakub  ( 2012-10-03 08:45:29 -0500 )edit

I've been already punished for suggesting compilation inside /opt/ros, so don't do this. ;) See: http://answers.ros.org/question/44257/install-a-patch Anyway the code of rviz you can find here: https://github.com/ros-visualization/rviz/blob/master/src/rviz/default_plugin/odometry_display.cpp

Jakub gravatar image Jakub  ( 2012-10-03 08:48:31 -0500 )edit

@Jacub So... are u suggesting me to make a diff between your rviz linked source and my rviz source, create a patch, apply it and recompile? if not, what instead? Thank you again

aldo85ita gravatar image aldo85ita  ( 2012-10-03 11:40:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-09-27 05:14:13 -0500

Seen: 369 times

Last updated: Oct 03 '12