User Tools

Site Tools


training:software:coordinate_systems_and_units

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
training:software:coordinate_systems_and_units [2024/12/19 14:15] Jay Tarbottontraining:software:coordinate_systems_and_units [2024/12/19 14:19] (current) Jay Tarbotton
Line 3: Line 3:
 When software is used to get inputs from physical devices and send commands to physical devices, it is important to work in the coordinate systems and units that match the devices. At that same time there may be certain conventions that are more natural for human operators. The software needs to keep track of the different coordinate systems and units and do the necessary conversions. When software is used to get inputs from physical devices and send commands to physical devices, it is important to work in the coordinate systems and units that match the devices. At that same time there may be certain conventions that are more natural for human operators. The software needs to keep track of the different coordinate systems and units and do the necessary conversions.
  
-Some of the coordinate systems used in FRC and the WPILib software are shown in the figure below. The drive systems and chassis use a North-West-Up (NWU) system to designate the positive directions. The forward direction is aligned with "North" so it is positive. Likewise, the left direction is aligned with "West" so it is positive. Any rotation about an axis is counterclockwise (CCW) about the axis when looking into the +axis. That means that rotation about the Z axis which represents turning is + when turning left.+Some of the coordinate systems used in FRC and the WPILib software are shown in the figure below. The **drive systems and chassis** use a North-West-Up (NWU) system to designate the positive directions. The forward direction is aligned with "North" so it is positive. Likewise, the left direction is aligned with "West" so it is positive. Any rotation about an axis is counterclockwise (CCW) about the axis when looking into the +axis. That means that rotation about the Z axis which represents turning is + when turning left.
  
-Gyros and accelerometers __often__ use a North-East-Down (NED) coordinate system, but it is important __to check the documentation for the particular device__ and software libraries that provide the interface to make sure. Joysticks use angular rotations internally, but we usually think of moving forward-back and left-right, and the WPILib joystick and operator controller classes treat them this way. The conversion from angles to linear motion causes a swapping of axes and a reversal in direction that you need to be aware of.+**Gyros and accelerometers** __often__ use a North-East-Down (NED) coordinate system, but it is important __to check the documentation for the particular device__ and software libraries that provide the interface to make sure. **Joysticks** use angular rotations internally, but we usually think of moving forward-back and left-right, and the WPILib joystick and operator controller classes treat them this way. The conversion from angles to linear motion causes a swapping of axes and a reversal in direction that you need to be aware of.
  
 {{ :coordinate_systems.png?800 |}} {{ :coordinate_systems.png?800 |}}
training/software/coordinate_systems_and_units.txt · Last modified: by Jay Tarbotton

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki