[Rock-dev] Joystick and twice a std vector in RawCommand
Matthias Goldhoorn
matthias.goldhoorn at dfki.de
Tue Apr 8 14:36:38 CEST 2014
The reason is that each axis could control several sub-axes.
The idea behin is that one one-dimensional arrays does not scale very
whell with different kind of input-devices.
In the past it was one 1D array. We decided to change this.
If you have multiple input deviced, the mapping should be done by a
conversion component. There could be no generic rule how to apply
RawCommands to something else.
You joystick-driver should output the values from the Joysticks as they
are. The mapping for your rover's should be done in a specialized component.
So no i'm against a change here.
Best,
Matthias
On 08.04.2014 14:32, Javier Hidalgo Carrió wrote:
> Hi rocks!
>
> Is there any particular reason why the axisValue is a 2D array?
>
> /* Index 1: num-of input axis, //index 2: dimensions of this axis
> * If you have an gamepand which has 2 2Dknops you have an [2][2]
> * size'd array for an 3D Mouse you could have [1][6]
> */
> std::vector<std::vector<double> > axisValue;
>
> Why not to create a plain std::vector<double> instead?
>
> I am controlling with a joystick the ESA rover and there are several
> types of joysticks. They do not all have 4 axis in the main/principal
> joystick.
> Therefore, I do not see the benefit of having a std::vector inside
> another std::vector.
> My suggestion is to change it to a plain (1D array) std::vector and use
> the first 4 axis as it is now but without a 2D structure.
>
> Javier.
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
--
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 1
28359 Bremen, Germany
Zentrale: +49 421 178 45-6611
Besuchsadresse der Nebengeschäftstelle:
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Empfang: +49 421 178 45-6600
Fax: +49 421 178 45-4150
E-Mail: matthias.goldhoorn at informatik.uni-bremen.de
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
More information about the Rock-dev
mailing list