The Magnetometer Visualizer Plugin is an RQT plugin for ROS1 that provides visualization and monitoring of magnetic field data published as sensor_msgs/MagneticField messages.
The plugin displays a live graph of X, Y, and Z magnetic field components and provides configurable thresholds and scaling.
Works perfectly with our magnetometer package
Install required ROS packages:
sudo apt install ros-noetic-rqt ros-noetic-rqt-common-pluginsMake sure the following Python packages are installed:
pip3 install numpy matplotlibClone the repository into your Catkin workspace:
cd ~/catkin_ws/src
git clone git@github.com:CJT-Robotics/magnetometer_visualizer_plugin.gitBuild the workspace:
cd ~/catkin_ws
catkin_makeSource your workspace:
source devel/setup.bashRun your node that publishes sensor_msgs/MagneticField.
Launch RQT:
rqt --force-discover # After first run, --force-discover is unnecessaryLoad the plugin: Plugins → CJT-Robotics → Magnetic Field Monitor
- Automatically lists all topics of type
sensor_msgs/MagneticField - Or type in manually a topic name
- Unit Scaling: Convert Tesla values to mT, µT, or nT
- Buffer: Number of stored data points (history length)
- Threshold: Detection threshold for highlighting anomalies
- Y-Axis: Controls zoom level of the graph
-
Red: X-axis
-
Green: Y-axis
-
Blue: Z-axis
-
Yellow highlight: Values exceeding threshold
-
Status box:
MONITORING: Normal operationDETECTION: Threshold exceeded
- Make sure the workspace is sourced:
source ~/catkin_ws/devel/setup.bash- Ensure a node is publishing
sensor_msgs/MagneticField - Check with:
rostopic list- Verify message content:
rostopic echo /your_topic