microstrain_inertial_examples
Simple examples using the microstrain_inertial_driver for MicroStrain sensors.
README
Description
Collection of simple examples to get started using the microstrain_inertial_driver
.
Table of Contents
Common Steps
For all the below examples, you should make sure you take the following steps before running them:
Install the udev rules (This should only be done once and if using the ROS package index, these will be installed automatically)
Connect your device.
Modify the
port
andbaudrate
parameters in the.yml
file for the example you are running to point to the port your device is connected to. This is especially important if using serial instead of USB.Install or build the
microstrain_inertial_examples
andmicrostrain_inertial_driver
packagesSource your
setup.bash
If building from source, run:
source install/setup.bash
after buildingIf installing from the ROS package index, run:
source /opt/ros/<ROS Version>/setup.bash
after installing
Device Examples
This package contains some example launch files to show users a simple starting configuration when using different devices.
CV7-INS / GV7-INS
NOTE: This example works for the 3DM-CV7-INS, and 3DM-GV7-INS
The CV7-INS example contains a simple example of outputting relative position data from a CV7-INS and displaying that data in rviz. This example also shows how one would input external position and velocity into the sensor.
To run this example, run the following command after doing the common steps:
ros2 launch microstrain_inertial_examples cv7_ins_launch.py
This example contains the following files:
CV7 / GV7
NOTE: This example works for the 3DM-CV7-AR, 3DM-CV7-AHRS, 3DM-GV7-AR, and 3DM-GV7-AHRS.
The CV7 example contains a simple example of outputting orientation, angular and linear velocity from a CV7 and displaying that data in rviz.
To run this example, run the following command after doing the common steps:
ros2 launch microstrain_inertial_examples cv7_launch.py
This example contains the following files:
GQ7
NOTE: This example works for the 3DM-GQ7
The GQ7 example contains a simple example of outputting global and relative position data from a GQ7 and displaying that data in rviz. This example also assumes that the user will be using a 3DM-RTK connected to the GQ7 aux port, but can be tweaked to not require the 3DM-RTK.
To run this example
Do the common steps
Ensure that your GQ7 has both antennas connected. See the microstrain Antenna Installation page for more help with this.
Update
gnss1_antenna_offset
andgnss2_antenna_offset
inconfig/gq7/gq7.yml
to your antenna offsetsRun the following command:
ros2 launch microstrain_inertial_examples gq7_launch.py
This example contains the following files:
GX5-GNSS / CX5-GNSS
NOTE: This example works for the 3DM-GX5-GNSS (3DM-GX5-45), and 3DM-CX5-45 (3DM-CX5-45)
The GX5-GNSS example contains a simple example of outputting global and relative position data from a GX5-GNSS and displaying that data in rviz.
Do the common steps
Ensure that your GX5-GNSS has it’s antenna connected. See the microstrain Antenna Installation page for more help with this.
Update
gnss1_antenna_offset
inconfig/gx5_45/gx5_45.yml
to your antenna offsetRun the following command:
ros2 launch microstrain_inertial_examples gx5_45_launch.py
GX5-AHRS / CX5-AHRS
NOTE: This example works for the 3DM-GX5-AHRS (3DM-GX5-25), and 3DM-CX5-AHRS (3DM-CX5-25)
The GX5-AHRS example contains a simple example of outputting orientation, angular and linear velocity from a GX5-AHRS and displaying that data in rviz.
To run this example, run the following command after doing the common steps:
ros2 launch microstrain_inertial_examples gx5_25_launch.py
This example contains the following files:
GX5-AR / CX5-AR
NOTE: This example works for the 3DM-GX5-AR (3DM-GX5-15), and 3DM-CX5-AR (3DM-CX5-15)
The GX5-AR example contains a simple example of outputting orientation, angular and linear velocity from a GX5-AR and displaying that data in rviz.
To run this example, run the following command after doing the common steps:
ros2 launch microstrain_inertial_examples gx5_15_launch.py
This example contains the following files:
Other Examples
Other assorted examples users may find useful
CV7-INS / GV7-INS with NMEA over aux port
NOTE: This example works for the 3DM-CV7-INS, and 3DM-GV7-INS and requires an external GNSS receiver such as the SparkFun ZED-F9P
This example is similar to the CV7-INS / GV7-INS, but instead of getting the data over the ROS network, the data will be provided by GPIO pins setup as an “aux” port on the device. This example follows the wiring setup provided in the NMEA Input page on the MicroStrain manual.
To run this example, run the following command after doing the common steps:
ros2 launch microstrain_inertial_examples cv7_ins_nmea_aux_launch.py
This example contains the following files: