Last week we ran a full system test of the FluxGrip (yes, the name has changed). The test was a success:
In this blog, I will offer a detailed description of how we conducted the test, in case some of our customers want to replicate it.
The test went as follows:
fluxgrip
foldermkdir ~/fluxgrip
pip install yakut
cd ~/fluxgrip
git clone https://github.com/OpenCyphal/public_regulated_data_types/ # Standard Cyphal DSDL types
git clone https://github.com/Zubax/zubax_dsdl/ # Zubax-specific DSDL types
setup_slcan
and configure SocketCAN interfacecd ~/fluxgrip
# The following command will download the setup_slcan script:
wget https://gist.github.com/pavel-kirienko/32e395683e8b7f49e71413aebf5e1a89/raw/f08e426e6c963a5d68868084cd2fab2a469bf76f/setup_slcan
chmod +x ./setup_slcan
# Optional:
# (script will be accessible from anywhere, not just ~/fluxgrip)
# sudo mv ./setup_slcan /usr/local/bin
# This will set up the SocketCAN interface:
sudo setup_slcan --remove-all -r /dev/serial/by-id/usb-*Zubax*Babel*
The SocketCAN interfaces appear as follows:
(I have 2, since I’m using CF2)
~/fluxgrip/env.sh
export CYPHAL_PATH="$HOME/fluxgrip/zubax_dsdl:$HOME/fluxgrip/public_regulated_data_types"
export UAVCAN__CAN__IFACE='socketcan:slcan0'
export UAVCAN__CAN__MTU=8
export UAVCAN__NODE__ID=$(yakut accommodate)
echo "Auto-selected node-ID for this session: $UAVCAN__NODE__ID"
source ~/fluxgrip/env.sh
yakut monitor --plug-and-play ./pnp
, we should see our FluxGrip appear as one of the Cyphal nodes:Assume the ports are configured as follows:
1000 → magnet command topic
1001 → magnet state feedback topic
source ~/fluxgrip/env.sh
yakut sub 1001:zubax.fluxgrip.Feedback --redraw +M
It should appear as follows:
source ~/fluxgrip/env.sh
yakut pub -N1 1000:uavcan.primitive.scalar.integer8 0 # Turn FluxGrip off
yakut pub -N1 1000:uavcan.primitive.scalar.integer8 1 # Turn FluxGrip on
yakut pub -N1 1000:uavcan.primitive.scalar.integer8 2 # Force FluxGrip on
The last command (Force) is meant to be used when you want to execute a magnetization cycle, regardless whether it is currently magnetized or not. (If FluxGrip is magnetized it will ignore an ON command.)
The “1” indicates that the magnet has been turned on 1 time (makes sense).
If you have any questions, feel free to post them below.