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.
Originally posted by Pitscho with karma: 36 on 2012-09-27
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by aldo85ita on 2012-09-28:
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?
Comment by Jakub on 2012-10-01:
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.
Comment by aldo85ita on 2012-10-01:
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?
Comment by Jakub on 2012-10-02:
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.
Comment by aldo85ita on 2012-10-03:
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?
Comment by Jakub on 2012-10-03:
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
Comment by Jakub on 2012-10-03:
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
Comment by aldo85ita on 2012-10-03:
@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
Comment by Jakub on 2012-10-03:
You can try to even replace your odometry_display.cpp with the new one and try to compile it. Then you should achieve to have length property in the gui editor. At minimum take a setLength function as an example how to apply setScale to arrows_
Comment by aldo85ita on 2012-10-04:
Thank you @Jakub, your answer is right: to fix the issue you can upgrade your Rviz or patch and recompile the sources (but this is not recommended) or otherwise you can also use "overlay" of rviz stack.Please add this in a new answer and I'll mark it as the right answer.