Epson IMU ROS1 Node SPI ** Deprecated **

*** NOTE: This package has been superceded by Epson IMU ROS1 Driver Node***

*** This webpage will no longer be updated ***


ess_sensors/g552.jpg ess_sensors/g370.jpg ess_sensors/g365.jpg

Overview


  • The Epson IMU ROS software is C++ wrapper around a Linux C driver for communicating on a ROS system

  • This code assumes that the user is familiar with building ROS1 packages using the catkin build process
  • This is *NOT* detailed step by step instructions describing how to build and install this ROS driver
  • Refer to the README.md inside the package for more detailed up-to-date technical info on usage or Github repository

SPI Connection & Configuration


  • Since SPI interfaces are non-standard on PCs, typically IMU SPI interfacing is applicable only to embedded Linux platforms
  • When connecting the Epson device to a ROS system using the SPI interface:
  • This ROS driver uses the external library Unofficial wiringPi library to generate low level SPI communication & accurate time delays

    • Other libraries can be used to generate timer delays and SPI messages but requires minor changes to redirect the low-level function calls (i.e. bcm2835 C library, etc)
  • Accurate timing delays are necessary to optimize throughput for high dout_rate when using the SPI interface (refer to IMU datasheets for timing specifications)

Below is an example IMU SPI connection when using a Raspberry Pi:

  • Epson IMU

    Raspberry Pi

    EPSON_RESET Input

    RPI_GPIO_P1_15 (GPIO22) Output

    EPSON_DRDY Output

    RPI_GPIO_P1_18 (GPIO24) Input

    EPSON_CS Input

    RPI_GPIO_P1_16 (GPIO23) Output

    EPSON_SCLK Input

    RPI_GPIO_P1_23 (GPIO11) Output

    EPSON_DOUT Output

    RPI_GPIO_P1_19 (GPIO10) Input

    EPSON_DIN Input

    RPI_GPIO_P1_21 (GPIO9) Output

Support for Timer Delays

  • There are wrapper functions for time delays in millisecond and microseconds using seDelayMS() and seDelayMicroSecs(), respectively.
  • On embedded Linux platforms, these may need to be redirected to platform-specific HW delay routines if not using a RaspberryPi

  • For example on RaspberryPi, the time delay functions for millisecond and microseconds is redirected to WiringPi library delay() and delayMicroseconds() function calls, respectively.

  • If a hardware delay is not available from a library, then a software delay loop is possible, but not preferred

Support for GPIO Control

  • 3 GPIO pins on the host are designated used and should be connected to the IMU
    • GPIO output for asserting CS# on the IMU (NOTE: Not using pin SPI0_CE0)
    • GPIO output for asserting RESET# on the IMU
    • GPIO input for reading the logic status on the IMU DRDY (GPIO1) pin
  • The use of GPIO pins for connecting to the IMU CS# and DRDY is mandatory
  • RESET# is recommended to force Hardware Reset during every IMU initialization for better robustness.

ROS1 Node


Published Topics

  • For IMU models that support quaternion output function the orientation field in sensor_msgs/Imu can update with valid data and publish on imu/data

  • For IMU models that do not support quaternion output function the orientation field in sensor_msgs/Imu will not update with valid data and publish on imu/data_raw

Launch File

  • The roslaunch/XML in the launch folder of this package is used to pass the init parameters to configure the IMU at runtime using roslaunch

  • Changes to init parameters is made by editing the launch file which does not require rebuilding with catkin_make

  • Typically, the user only needs to modify imu_dout_rate & imu_filter_sel as needed based on system requirements

  • Only use the specific IMU model launch file associated with the same IMU model built using catkin_make

Timestamping With EXT Signal

  • The G3xx series Epson IMU has 3.3V I/O EXT (GPIO2) pin which can be connected to a cyclic external sync signal such as a GNSS 1PPS signal
  • When the init parameter time_correction is enabled in unison with ext_sel set to reset counter & count_out enabled

    • The ROS driver attempts to correct the time stamp field in sensor_msgs/Imu based on the reset counter value (measured delay since latest GNSS 1PPS)

    • This should give a more accurate timestamp of the inertial data by minimizing the effects of link delays or host processing overhead delays

Building & Installing ROS1 Node


1. Place this package (including folders) into a new folder within your catkin workspace "src" folder.

2. Modify the CMakeLists.txt to select the desired Epson IMU model that is being used in the ROS system.

  • NOTE: You *MUST* re-build using catkin_make when changing IMU models or any changes in the CMakeLists.txt

3. From the catkin workspace folder run "catkin_make" to build all changed ROS1 packages located in the <catkin_workspace>/src/ folder. 4. Reload the current ROS1 environment variables that may have changed after the catkin build process.

<catkin_workspace>/source devel/setup.bash

5. Modify the appropriate roslaunch/XML to set your desired IMU init parameters for the specific IMU model in the launch folder that you selected and built

  • Typically, only the dout_rate & filter_sel needs to be edited

Running the ROS1 Node


  • To start the Epson IMU ROS1 driver use the appropriate launch file (located in launch/) with roslaunch

  • For example:

<catkin_workspace>/roslaunch ess_imu_ros1_spi_driver epson_g370.launch

Technical Support


Wiki: ess_imu_ros1_spi_driver (last edited 2023-12-12 00:44:01 by RChow)