Skip to content

Commit ba24f22

Browse files
committed
Add fine_odometry.md
Signed-off-by: Gregory Mermet <g.mermet@ez-wheel.com>
1 parent aee459d commit ba24f22

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

fine_odometry.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Fine odometry function
3+
4+
The function **getFineOdometry()** allows to retrieve a more precise position distance of the SWD Core at low level speed.
5+
6+
> This position is non-safe. Safety relevant applications should rely with **getOdometryValue()**.
7+
8+
This function use the precise multiturn position value (**hall_encoder**), in units of motor mechanical degrees.
9+
10+
> The counter direction depends of the position polarity parameter.
11+
12+
## COMMISSIONING
13+
In order to switch from **position_value** to **hall_encoder** data in the PDO mapping , the commissioning of the both motors have to be modifed as follow:
14+
```
15+
commissioning.py:
16+
17+
# TPDO3 communication mapping
18+
19+
# - statusword
20+
# - position_value or hall_encoder
21+
22+
mapping = PDOMappingParameters()
23+
mapping.nb = 2
24+
mapping.items.append(0x6041_00_10)
25+
# mapping.items.append(0x6064_00_20) # position_value
26+
mapping.items.append(0x2305_06_20) # hall_encoder
27+
28+
communication_client.setTPDOMappingParameters(PDOId.PDO_3, mapping)
29+
check("setTPDOMappingParameters(PDOId.PDO_3)", error)
30+
```
31+
## ROS2
32+
The latest swd_diff_drive controller on github contains a parameter to indicate which odometry shall be used: `"fine_odometry": False.`By default, this parameter is set to false in order to continue using `position_value`data and `getOdometryValue()` function.
33+
34+
## ROS1
35+
Until **getFineOdometry()** is available, a possible workaround is to modif "**nbPolePair**" setting into `configuration.json` file :
36+
`"nbPolePair": 60.0` instead of `"nbPolePair": 5.0`
37+
38+
Thus, the formula used by "**getOdometryValue**" will compute the same value as "**getFineOdometryValue**" and all transparent to the swd_diff_drive_controller node.

0 commit comments

Comments
 (0)