NeuronRobotics / java-bowler

A library for controlling Bowler devices with Java
GNU Lesser General Public License v3.0
12 stars 5 forks source link

Are Hardware Index, Index, and Group just different names for the same thing? #1

Closed DrVulpinus closed 10 years ago

DrVulpinus commented 10 years ago

Based on my observations it appears that the value referenced by "com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration.getHardwareIndex()" and "com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration.setIndex(int index)" and "com.neuronrobotics.sdk.pid.PIDChannel.getGroup()" are all referencing the physical PID channel number on the hardware. Is this correct, and if it is can these be named the same thing?

madhephaestus commented 10 years ago

Hardware index and index are different. The index is the number in the kinematic chain the link number. Hardware index is the mapping of the physical layer into the kinematic chain. For example link 0 could map to hardware index of 6.

When a link is a PID link, the Hardware index refers to the PID group. The distinct term is uses since on the DyIO the channel index for the input and output were "grouped" together to form a PID channel. Since the Kinematic chain can also use the analog inputs from the DyIO as valid link hardware, it would not be appropriate to call the hardware index a "group". Also, the standard convention is to refer to this sort of thing as an index.

changing getHardwareIndex would be a reasonable way of dealing with this confusion, but these are not all the same thing.

DrVulpinus commented 10 years ago

I looked further and found that getHardwareIndex and setIndex both edit the same variable. I also see there is something called “linkIndex” which is separate and has its own getter and setter.

From: Kevin Harrington [mailto:notifications@github.com] Sent: Wednesday, July 23, 2014 23:07 To: NeuronRobotics/java-bowler Cc: DrVulpinus Subject: Re: [java-bowler] Are Hardware Index, Index, and Group just different names for the same thing? (#1)

Hardware index and index are different. The index is the number in the kinematic chain the link number. Hardware index is the mapping of the physical layer into the kinematic chain. For example link 0 could map to hardware index of 6.

When a link is a PID link, the Hardware index refers to the PID group. The distinct term is uses since on the DyIO the channel index for the input and output were "grouped" together to form a PID channel. Since the Kinematic chain can also use the analog inputs from the DyIO as valid link hardware, it would not be appropriate to call the hardware index a "group". Also, the standard convention is to refer to this sort of thing as an index.

changing getHardwareIndex would be a reasonable way of dealing with this confusion, but these are not all the same thing.

— Reply to this email directly or view it on GitHub https://github.com/NeuronRobotics/java-bowler/issues/1#issuecomment-49962773 . https://github.com/notifications/beacon/7728147__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMTc5MDQ0NywiZGF0YSI6eyJpZCI6Mzc4MTgwNDF9fQ==--7123edbde9d2a1fbd4b06db2b5f72dbc9e4397c4.gif