This software establishes a connection with the NDI Aurora EM tracker to perform the following functions:
- Reads data from tool sensors and the base sensor, and publishes the position of the tool relative to the base frame.
- Performs landmark registration.
- Operates at the maximum sampling frequency ~66Hz - 'turbo mode'.
- For older device versions that do not support USB, adjust the baud rate in
ndi_api
(CombinedApi.cpp
) to a feasible value.
Ensure that the following libraries are installed on your system:
-
Identify connected USB ports:
ls /dev/tty*
-
Grant access permission to the port:
sudo chmod a+rw /dev/ttyUSB*
Replace
*
with the number of the connected USB port, usually0
.
To build the nodes, follow these instructions:
-
Build the packages:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select interfaces emtracker
-
Run the node: filtering frequnecy can be set from the launch file
ros2 launch emtracker launch.py
-
Adjust filtering frequency on the fly using ROS parameters:
ros2 param set emtracker_node cutoff_freq 1.0
To perform landmark registration:
- Use a pre-calibrated probe to touch the landmarks of the experimental setup.
- Save the true values of the landmarks in a
.csv
file in the config path. - Uncomment the 'landmark registration process section' under
setup_emtracker()
and copy the true landmarks tostd::string landmarks
. - Build and run the node, and follow the instructions in the terminal. Touch each landmark in the order mentioned in the truth
.csv
file and hold still. The code guides you to move to the next landmark once enough samples are collected. - Once all landmarks are collected, the transformation is calculated through an optimization process, and the results are saved in
registration_results.csv
in the config path. - Rename the transformation file and set the name in
config.yaml
so the node understands which registration file to load next time. - Comment out the landmark registration section and rebuild the node.