microstrain_inertial repository

Repository Summary

Checkout URI https://github.com/LORD-MicroStrain/microstrain_inertial.git
VCS Type git
VCS Version ros2
Last Updated 2021-12-03
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

Description

Interface (driver) software, including ROS node, for inertial sensors compatible with the Microstrain Communication Library (MSCL).

MSCL is developed by LORD Sensing - Microstrain in Williston, VT.

Different Codebases

This repo is now structured differently as of 2.0.0.

Important Branches

There are three important branches that you may want to checkout:

  • ros -- Contains ROS1 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • ros2 -- Contains ROS2 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • master -- Contains the most recent ROS1 changes before the transition to 2.0.0. Kept for backwards compatibility, but no longer updated or supported

Both the ros and ros2 branches share most of their code by using gis submodules. The following submodules contain most of the actual implementations:

Different Package Names

Prior to version 2.0.0, this repo contained the following ROS packages: * ros_mscl -- ROS node that will communicate with the devices * mscl_msgs -- Collection of messages produced by the ros_mscl node * ros_mscl_cpp_example -- Simple subscriber written in C++ that will consume a message produced by ros_mscl * ros_mscl_py_example -- Simple subscriber written in Python that will consume a message produced by ros_mscl

Due to requirements laid out by the ROS maintainers here, as of version 2.0.0, this repo contains the following ROS packages: * microstrain_inertial_driver -- ROS node that will communicate with the devices * microstrain_inertial_msgs -- Collection of messages produced by the microstrain_inertial_driver node * microstrain_inertial_examples -- Collection of examples that show how to interact with the microstrain_inertial_driver node. Currently contains one simple C++ and python subscriber node

Build Instructions

Buildfarm

As of v2.0.6 this package is being built and distributed by the ROS build farm. If you do not need to modify the source, it is recommended to install directly from the buildfarm by running the following commands where ROS_DISTRO is the version of ROS you are using such as foxy or galactic:

sudo apt-get update && sudo apt-get install ros-ROS_DISTRO-microstrain-inertial-driver

For more information on the ROS distros and platforms we support, please see index.ros.org

Source

If you need to modify the source of this repository, or are running on a platform that we do not support, you can build from source by following these instructions

Submoduels

This repo now takes advantage of git submodules in order to share code between ROS versions. When cloning the repo, you should clone with the --recursive flag to get all of the submodules.

If you have already cloned the repo, you can checkout the submodules by running git submodule init && git submodule update --recursive from the project directory

The CMakeLists.txt will automatically checkout the submodule if it does not exist, but it will not keep it up to date. In order to keep up to date, every time you pull changes you should pull with the --recurse-submodules flag, or alternatively run git submodule update --recursive after you have pulled changes

MSCL

MSCL is now installed in the CMakeLists.txt. The version installed can be changed by passing the flag -DMSCL_VERSION="62.1.2"

If you already have MSCL installed and want to use your installed version instead of the one automatically downloaded, you can specify the location by passing the flag -DMSCL_DIR=/usr/share/c++-mscl

We do our best to keep ROS-MSCL up-to-date with the latest MSCL changes, but sometimes there is a delay. The currently supported version of MSCL is v62.1.2

Building from source

  1. Install ROS2 and create a workspace: Configuring Your ROS2 Environment

  2. Move the entire microstrain_inertial folder (microstrain_inertial_driver, and microstrain_inertial_msgs) to the your_workspace/src directory.

  3. Locate and register the microstrain_inertial_driver package: rospack find microstrain_inertial_driver

  4. Install rosdeps for this package: rosdep install --from-paths ~/your_workspace/src --ignore-src -r -y

  5. Build your workspace:

    cd ~/your_workspace
    colcon build
    source ~/your_workspace/install/setup.bash
    

    The source command may need to be run in each terminal prior to launching a ROS node.

    Launch the node and publish data

    The following command will launch the driver. Keep in mind each instance needs to be run in a separate terminal.

    ros2 launch microstrain_inertial_driver microstrain_launch.py
    

This driver is implemented as a lifecycle node. Upon running, the node will be in the unconfigured state and no interaction has occurred with the device. The node must be transitioned as follows for data to be available:

  • transition to configure state:

    ros2 lifecycle set /gx5/microstrain_inertial_driver_node configure

  • transition to active state:

    ros2 lifecycle set /gx5/microstrain_inertial_driver_node activate

You can stop data from streaming by putting the device into the "deactivate" state. Both the "cleanup" and "shutdown" states will disconnect from the device and close the raw data log file (if enabled.)

To check published topics:

ros2 topic list

Example: Connect to and publish data from two devices simultaneously
In two different terminals:

ros2 launch microstrain_inertial_driver microstrain.launch name:=sensor1234

ros2 launch microstrain_inertial_driver microstrain.launch name:=bestSensor port:=/dev/ttyACM1

This will launch two nodes that publish data to different namespaces: - sensor1234, connected over port: /dev/ttyACM0 - bestSensor, connected over port: /dev/ttyACM1

An example subscriber node can be found here: Microstrain Examples

Docker Integration

VSCode

The easiest way to use docker while still using an IDE is to use VSCode as an IDE. Follow the steps below to develop on this repo in a docker container

  1. Install the following dependencies:
    1. VSCode
    2. Docker
  2. Open VSCode and install the following plugins:
    1. VSCode Docker plugin
    2. VSCode Remote Containers plugin
  3. Open this directory in a container by following this guide
    1. Due to a bug in the remote container plugin, you will need to refresh the window once it comes up. To do this, type Ctrl+Shift+p and type Reload Window and hit enter. Note that this will have to be repeated every time the container is rebuilt
  4. Once the folder is open in VSCode, you can build the project by running Ctrl+Shift+B to trigger a build, or Ctrl+p to open quick open, then type task build and hit enter
  5. You can run the project by following this guide

Make

If you are comfortable working from the command line, or want to produce runtime images, the Makefile in the .devcontainer directory can be used to build docker images, run a shell inside the docker images and produce a runtime image. Follow the steps below to setup your environment to use the Makefile

  1. Install the following dependencies:
    1. Make
    2. Docker
    3. qemu-user-static (for multiarch builds)
      1. Run the following command to register the qemu binaries with docker: docker run --rm --privileged multiarch/qemu-user-static:register

The Makefile exposes the following tasks. They can all be run from the .devcontainer directory: * make build-shell - Builds the docker image and starts a shell session in the image allowing the user to develop and build the ROS project using common commands such as catkin_make * make image - Builds the runtim image that contains only the required dependencies and the ROS node. The resulting image is names ros-mscl * make clean - Cleans up after the above two tasks

License

microstrain_inertial is released under the MIT License - see the LICENSE file in the source distribution.

Copyright (c) 2021, Parker Hannifin Corp.

CONTRIBUTING

No CONTRIBUTING.md found.

Repository Summary

Checkout URI https://github.com/LORD-MicroStrain/microstrain_inertial.git
VCS Type git
VCS Version ros2
Last Updated 2021-12-03
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

Description

Interface (driver) software, including ROS node, for inertial sensors compatible with the Microstrain Communication Library (MSCL).

MSCL is developed by LORD Sensing - Microstrain in Williston, VT.

Different Codebases

This repo is now structured differently as of 2.0.0.

Important Branches

There are three important branches that you may want to checkout:

  • ros -- Contains ROS1 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • ros2 -- Contains ROS2 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • master -- Contains the most recent ROS1 changes before the transition to 2.0.0. Kept for backwards compatibility, but no longer updated or supported

Both the ros and ros2 branches share most of their code by using gis submodules. The following submodules contain most of the actual implementations:

Different Package Names

Prior to version 2.0.0, this repo contained the following ROS packages: * ros_mscl -- ROS node that will communicate with the devices * mscl_msgs -- Collection of messages produced by the ros_mscl node * ros_mscl_cpp_example -- Simple subscriber written in C++ that will consume a message produced by ros_mscl * ros_mscl_py_example -- Simple subscriber written in Python that will consume a message produced by ros_mscl

Due to requirements laid out by the ROS maintainers here, as of version 2.0.0, this repo contains the following ROS packages: * microstrain_inertial_driver -- ROS node that will communicate with the devices * microstrain_inertial_msgs -- Collection of messages produced by the microstrain_inertial_driver node * microstrain_inertial_examples -- Collection of examples that show how to interact with the microstrain_inertial_driver node. Currently contains one simple C++ and python subscriber node

Build Instructions

Buildfarm

As of v2.0.6 this package is being built and distributed by the ROS build farm. If you do not need to modify the source, it is recommended to install directly from the buildfarm by running the following commands where ROS_DISTRO is the version of ROS you are using such as foxy or galactic:

sudo apt-get update && sudo apt-get install ros-ROS_DISTRO-microstrain-inertial-driver

For more information on the ROS distros and platforms we support, please see index.ros.org

Source

If you need to modify the source of this repository, or are running on a platform that we do not support, you can build from source by following these instructions

Submoduels

This repo now takes advantage of git submodules in order to share code between ROS versions. When cloning the repo, you should clone with the --recursive flag to get all of the submodules.

If you have already cloned the repo, you can checkout the submodules by running git submodule init && git submodule update --recursive from the project directory

The CMakeLists.txt will automatically checkout the submodule if it does not exist, but it will not keep it up to date. In order to keep up to date, every time you pull changes you should pull with the --recurse-submodules flag, or alternatively run git submodule update --recursive after you have pulled changes

MSCL

MSCL is now installed in the CMakeLists.txt. The version installed can be changed by passing the flag -DMSCL_VERSION="62.1.2"

If you already have MSCL installed and want to use your installed version instead of the one automatically downloaded, you can specify the location by passing the flag -DMSCL_DIR=/usr/share/c++-mscl

We do our best to keep ROS-MSCL up-to-date with the latest MSCL changes, but sometimes there is a delay. The currently supported version of MSCL is v62.1.2

Building from source

  1. Install ROS2 and create a workspace: Configuring Your ROS2 Environment

  2. Move the entire microstrain_inertial folder (microstrain_inertial_driver, and microstrain_inertial_msgs) to the your_workspace/src directory.

  3. Locate and register the microstrain_inertial_driver package: rospack find microstrain_inertial_driver

  4. Install rosdeps for this package: rosdep install --from-paths ~/your_workspace/src --ignore-src -r -y

  5. Build your workspace:

    cd ~/your_workspace
    colcon build
    source ~/your_workspace/install/setup.bash
    

    The source command may need to be run in each terminal prior to launching a ROS node.

    Launch the node and publish data

    The following command will launch the driver. Keep in mind each instance needs to be run in a separate terminal.

    ros2 launch microstrain_inertial_driver microstrain_launch.py
    

This driver is implemented as a lifecycle node. Upon running, the node will be in the unconfigured state and no interaction has occurred with the device. The node must be transitioned as follows for data to be available:

  • transition to configure state:

    ros2 lifecycle set /gx5/microstrain_inertial_driver_node configure

  • transition to active state:

    ros2 lifecycle set /gx5/microstrain_inertial_driver_node activate

You can stop data from streaming by putting the device into the "deactivate" state. Both the "cleanup" and "shutdown" states will disconnect from the device and close the raw data log file (if enabled.)

To check published topics:

ros2 topic list

Example: Connect to and publish data from two devices simultaneously
In two different terminals:

ros2 launch microstrain_inertial_driver microstrain.launch name:=sensor1234

ros2 launch microstrain_inertial_driver microstrain.launch name:=bestSensor port:=/dev/ttyACM1

This will launch two nodes that publish data to different namespaces: - sensor1234, connected over port: /dev/ttyACM0 - bestSensor, connected over port: /dev/ttyACM1

An example subscriber node can be found here: Microstrain Examples

Docker Integration

VSCode

The easiest way to use docker while still using an IDE is to use VSCode as an IDE. Follow the steps below to develop on this repo in a docker container

  1. Install the following dependencies:
    1. VSCode
    2. Docker
  2. Open VSCode and install the following plugins:
    1. VSCode Docker plugin
    2. VSCode Remote Containers plugin
  3. Open this directory in a container by following this guide
    1. Due to a bug in the remote container plugin, you will need to refresh the window once it comes up. To do this, type Ctrl+Shift+p and type Reload Window and hit enter. Note that this will have to be repeated every time the container is rebuilt
  4. Once the folder is open in VSCode, you can build the project by running Ctrl+Shift+B to trigger a build, or Ctrl+p to open quick open, then type task build and hit enter
  5. You can run the project by following this guide

Make

If you are comfortable working from the command line, or want to produce runtime images, the Makefile in the .devcontainer directory can be used to build docker images, run a shell inside the docker images and produce a runtime image. Follow the steps below to setup your environment to use the Makefile

  1. Install the following dependencies:
    1. Make
    2. Docker
    3. qemu-user-static (for multiarch builds)
      1. Run the following command to register the qemu binaries with docker: docker run --rm --privileged multiarch/qemu-user-static:register

The Makefile exposes the following tasks. They can all be run from the .devcontainer directory: * make build-shell - Builds the docker image and starts a shell session in the image allowing the user to develop and build the ROS project using common commands such as catkin_make * make image - Builds the runtim image that contains only the required dependencies and the ROS node. The resulting image is names ros-mscl * make clean - Cleans up after the above two tasks

License

microstrain_inertial is released under the MIT License - see the LICENSE file in the source distribution.

Copyright (c) 2021, Parker Hannifin Corp.

CONTRIBUTING

No CONTRIBUTING.md found.

Repository Summary

Checkout URI https://github.com/LORD-MicroStrain/microstrain_inertial.git
VCS Type git
VCS Version ros
Last Updated 2021-12-03
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

Description

Interface (driver) software, including ROS node, for inertial sensors compatible with the Microstrain Communication Library (MSCL).

MSCL is developed by LORD Sensing - Microstrain in Williston, VT.

Different Codebases

This repo is now structured differently as of 2.0.0.

Important Branches

There are three important branches that you may want to checkout:

  • ros -- Contains ROS1 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • ros2 -- Contains ROS2 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • master -- Contains the most recent ROS1 changes before the transition to 2.0.0. Kept for backwards compatibility, but no longer updated or supported

Both the ros and ros2 branches share most of their code by using gis submodules. The following submodules contain most of the actual implementations:

Different Package Names

Prior to version 2.0.0, this repo contained the following ROS packages: * ros_mscl -- ROS node that will communicate with the devices * mscl_msgs -- Collection of messages produced by the ros_mscl node * ros_mscl_cpp_example -- Simple subscriber written in C++ that will consume a message produced by ros_mscl * ros_mscl_py_example -- Simple subscriber written in Python that will consume a message produced by ros_mscl

Due to requirements laid out by the ROS maintainers here, as of version 2.0.0, this repo contains the following ROS packages: * microstrain_inertial_driver -- ROS node that will communicate with the devices * microstrain_inertial_msgs -- Collection of messages produces by the microstrain_inertial_driver node * microstrain_inretial_examples -- Collection of examples that show how to interact with the microstrain_inertial_driver node. Currently contains one simple C++ and python subscriber node

Build Instructions

Buildfarm

As of v2.0.5 this package is being built and distributed by the ROS build farm. If you do not need to modify the source, it is recommended to install directly from the buildfarm by running the following commands where ROS_DISTRO is the version of ROS you are using such as melodic or noetic:

sudo apt-get update && sudo apt-get install ros-ROS_DISTRO-microstrain-inertial-driver

For more information on the ROS distros and platforms we support, please see index.ros.org

Source

If you need to modify the source of this repository, or are running on a platform that we do not support, you can build from source by following these instructions

Submodules

This repo now takes advantage of git submodules in order to share code between ROS versions. When cloning the repo, you should clone with the --recursive flag to get all of the submodules.

If you have already cloned the repo, you can checkout the submodules by running git submodule init && git submodule update --recursive from the project directory

The CMakeLists.txt will automatically checkout the submodule if it does not exist, but it will not keep it up to date. In order to keep up to date, every time you pull changes you should pull with the --recurse-submodules flag, or alternatively run git submodule update --recursive after you have pulled changes

MSCL

MSCL is now installed in the CMakeLists.txt. The version installed can be changed by passing the flag -DMSCL_VERSION="62.0.0"

If you already have MSCL installed and want to use your installed version instead of the one automatically downloaded, you can specify the location by passing the flag -DMSCL_DIR=/usr/share/c++-mscl

We do our best to keep ROS-MSCL up-to-date with the latest MSCL changes, but sometimes there is a delay. The currently supported version of MSCL is v62.1.2

Building from source

  1. Install ROS and create a workspace: Installing and Configuring Your ROS Environment

  2. Move the entire microstrain_inertial folder (microstrain_inertial_driver, microstrain_inertial_msgs , and microstrain_common for just source) to the your_workspace/src directory.

  3. Locate and register the ros_mscl package: rospack find microstrain_inertial_driver

  4. Install rosdeps for this package: rosdep install --from-paths ~/your_workspace/src --ignore-src -r -y

  5. Build your workspace:

    cd ~/your_workspace
    catkin_make
    source ~/your_workspace/devel/setup.bash
    

    The source command may need to be run in each terminal prior to launching a ROS node.

    Launch the node and publish data

    The following command will launch the driver. Keep in mind each instance needs to be run in a separate terminal.

    roslaunch microstrain_inertial_driver microstrain.launch
    

    Optional launch parameters:

  6. name: namespace the node will publish messages to, default: gx5

  7. port: serial port name to connect to the device over, default: /dev/ttyACM0

  8. baudrate: baud rate to open the connection with, default: 115200

  9. imu_rate: sample rate for IMU data (hz), default: 100

  10. debug: output debug info? default: false

  11. diagnostics: output diagnostic info? default: true

To check published topics:

rostopic list

Example: Connect to and publish data from two devices simultaneously
In two different terminals:

roslaunch microstrain_inertial_driver microstrain.launch name:=sensor1234

roslaunch microstrain_inertial_driver microstrain.launch name:=bestSensor port:=/dev/ttyACM1

This will launch two nodes that publish data to different namespaces: - sensor1234, connected over port: /dev/ttyACM0 - bestSensor, connected over port: /dev/ttyACM1

An example subscriber node can be found here: Microstrain Examples

Docker Integration

VSCode

The easiest way to use docker while still using an IDE is to use VSCode as an IDE. Follow the steps below to develop on this repo in a docker container

  1. Install the following dependencies:
    1. VSCode
    2. Docker
  2. Open VSCode and install the following plugins:
    1. VSCode Docker plugin
    2. VSCode Remote Containers plugin
  3. Open this directory in a container by following this guide
    1. Due to a bug in the remote container plugin, you will need to refresh the window once it comes up. To do this, type Ctrl+Shift+p and type Reload Window and hit enter. Note that this will have to be repeated every time the container is rebuilt
  4. Once the folder is open in VSCode, you can build the project by running Ctrl+Shift+B to trigger a build, or Ctrl+p to open quick open, then type task build and hit enter
  5. You can run the project by following this guide

Make

If you are comfortable working from the command line, or want to produce runtime images, the Makefile in the .devcontainer directory can be used to build docker images, run a shell inside the docker images and produce a runtime image. Follow the steps below to setup your environment to use the Makefile

  1. Install the following dependencies:
    1. Make
    2. Docker
    3. qemu-user-static (for multiarch builds)
      1. Run the following command to register the qemu binaries with docker: docker run --rm --privileged multiarch/qemu-user-static:register

The Makefile exposes the following tasks. They can all be run from the .devcontainer directory: * make build-shell - Builds the docker image and starts a shell session in the image allowing the user to develop and build the ROS project using common commands such as catkin_make * make image - Builds the runtim image that contains only the required dependencies and the ROS node. The resulting image is names ros-mscl * make clean - Cleans up after the above two tasks

License

microstrain_inertial is released under the MIT License - see the LICENSE file in the source distribution.

Copyright (c) 2021, Parker Hannifin Corp.

CONTRIBUTING

No CONTRIBUTING.md found.

Repository Summary

Checkout URI https://github.com/LORD-MicroStrain/microstrain_inertial.git
VCS Type git
VCS Version ros
Last Updated 2021-12-03
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

Description

Interface (driver) software, including ROS node, for inertial sensors compatible with the Microstrain Communication Library (MSCL).

MSCL is developed by LORD Sensing - Microstrain in Williston, VT.

Different Codebases

This repo is now structured differently as of 2.0.0.

Important Branches

There are three important branches that you may want to checkout:

  • ros -- Contains ROS1 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • ros2 -- Contains ROS2 implementation for this node as of 2.0.0. This version is being actively updated and supported
  • master -- Contains the most recent ROS1 changes before the transition to 2.0.0. Kept for backwards compatibility, but no longer updated or supported

Both the ros and ros2 branches share most of their code by using gis submodules. The following submodules contain most of the actual implementations:

Different Package Names

Prior to version 2.0.0, this repo contained the following ROS packages: * ros_mscl -- ROS node that will communicate with the devices * mscl_msgs -- Collection of messages produced by the ros_mscl node * ros_mscl_cpp_example -- Simple subscriber written in C++ that will consume a message produced by ros_mscl * ros_mscl_py_example -- Simple subscriber written in Python that will consume a message produced by ros_mscl

Due to requirements laid out by the ROS maintainers here, as of version 2.0.0, this repo contains the following ROS packages: * microstrain_inertial_driver -- ROS node that will communicate with the devices * microstrain_inertial_msgs -- Collection of messages produces by the microstrain_inertial_driver node * microstrain_inretial_examples -- Collection of examples that show how to interact with the microstrain_inertial_driver node. Currently contains one simple C++ and python subscriber node

Build Instructions

Buildfarm

As of v2.0.5 this package is being built and distributed by the ROS build farm. If you do not need to modify the source, it is recommended to install directly from the buildfarm by running the following commands where ROS_DISTRO is the version of ROS you are using such as melodic or noetic:

sudo apt-get update && sudo apt-get install ros-ROS_DISTRO-microstrain-inertial-driver

For more information on the ROS distros and platforms we support, please see index.ros.org

Source

If you need to modify the source of this repository, or are running on a platform that we do not support, you can build from source by following these instructions

Submodules

This repo now takes advantage of git submodules in order to share code between ROS versions. When cloning the repo, you should clone with the --recursive flag to get all of the submodules.

If you have already cloned the repo, you can checkout the submodules by running git submodule init && git submodule update --recursive from the project directory

The CMakeLists.txt will automatically checkout the submodule if it does not exist, but it will not keep it up to date. In order to keep up to date, every time you pull changes you should pull with the --recurse-submodules flag, or alternatively run git submodule update --recursive after you have pulled changes

MSCL

MSCL is now installed in the CMakeLists.txt. The version installed can be changed by passing the flag -DMSCL_VERSION="62.0.0"

If you already have MSCL installed and want to use your installed version instead of the one automatically downloaded, you can specify the location by passing the flag -DMSCL_DIR=/usr/share/c++-mscl

We do our best to keep ROS-MSCL up-to-date with the latest MSCL changes, but sometimes there is a delay. The currently supported version of MSCL is v62.1.2

Building from source

  1. Install ROS and create a workspace: Installing and Configuring Your ROS Environment

  2. Move the entire microstrain_inertial folder (microstrain_inertial_driver, microstrain_inertial_msgs , and microstrain_common for just source) to the your_workspace/src directory.

  3. Locate and register the ros_mscl package: rospack find microstrain_inertial_driver

  4. Install rosdeps for this package: rosdep install --from-paths ~/your_workspace/src --ignore-src -r -y

  5. Build your workspace:

    cd ~/your_workspace
    catkin_make
    source ~/your_workspace/devel/setup.bash
    

    The source command may need to be run in each terminal prior to launching a ROS node.

    Launch the node and publish data

    The following command will launch the driver. Keep in mind each instance needs to be run in a separate terminal.

    roslaunch microstrain_inertial_driver microstrain.launch
    

    Optional launch parameters:

  6. name: namespace the node will publish messages to, default: gx5

  7. port: serial port name to connect to the device over, default: /dev/ttyACM0

  8. baudrate: baud rate to open the connection with, default: 115200

  9. imu_rate: sample rate for IMU data (hz), default: 100

  10. debug: output debug info? default: false

  11. diagnostics: output diagnostic info? default: true

To check published topics:

rostopic list

Example: Connect to and publish data from two devices simultaneously
In two different terminals:

roslaunch microstrain_inertial_driver microstrain.launch name:=sensor1234

roslaunch microstrain_inertial_driver microstrain.launch name:=bestSensor port:=/dev/ttyACM1

This will launch two nodes that publish data to different namespaces: - sensor1234, connected over port: /dev/ttyACM0 - bestSensor, connected over port: /dev/ttyACM1

An example subscriber node can be found here: Microstrain Examples

Docker Integration

VSCode

The easiest way to use docker while still using an IDE is to use VSCode as an IDE. Follow the steps below to develop on this repo in a docker container

  1. Install the following dependencies:
    1. VSCode
    2. Docker
  2. Open VSCode and install the following plugins:
    1. VSCode Docker plugin
    2. VSCode Remote Containers plugin
  3. Open this directory in a container by following this guide
    1. Due to a bug in the remote container plugin, you will need to refresh the window once it comes up. To do this, type Ctrl+Shift+p and type Reload Window and hit enter. Note that this will have to be repeated every time the container is rebuilt
  4. Once the folder is open in VSCode, you can build the project by running Ctrl+Shift+B to trigger a build, or Ctrl+p to open quick open, then type task build and hit enter
  5. You can run the project by following this guide

Make

If you are comfortable working from the command line, or want to produce runtime images, the Makefile in the .devcontainer directory can be used to build docker images, run a shell inside the docker images and produce a runtime image. Follow the steps below to setup your environment to use the Makefile

  1. Install the following dependencies:
    1. Make
    2. Docker
    3. qemu-user-static (for multiarch builds)
      1. Run the following command to register the qemu binaries with docker: docker run --rm --privileged multiarch/qemu-user-static:register

The Makefile exposes the following tasks. They can all be run from the .devcontainer directory: * make build-shell - Builds the docker image and starts a shell session in the image allowing the user to develop and build the ROS project using common commands such as catkin_make * make image - Builds the runtim image that contains only the required dependencies and the ROS node. The resulting image is names ros-mscl * make clean - Cleans up after the above two tasks

License

microstrain_inertial is released under the MIT License - see the LICENSE file in the source distribution.

Copyright (c) 2021, Parker Hannifin Corp.

CONTRIBUTING

No CONTRIBUTING.md found.