Skip to content

teddyluo/hipnuc_imu_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hipnuc_imu_ros

Description

A ROS wrapper for HiPNUC HI216 IMU Device.

The HiPNUC HI216 is a 6 DoF (Degree of Freedom) IMU device which consists of 2 sensors: gyro and acceleration sensor. More information about this sensor can be found in the official HiPNUC website: http://www.hipnuc.com.

Install Linux Driver for HiPNUC HI216

  1. Install dependencies:
$ sudo apt install libelf-dev
  1. Download code and compile linux driver:
$ cd ~/catkin_ws/src
$ git clone https://github.com/teddyluo/hipnuc_imu_ros.git
$ cd ~/catkin_ws/src/hipnuc_imu_ros/driver
$ make all

where catkin_ws is your catkin workspace.

  1. Copy cp210x.ko to the kernel folder:
sudo cp ./cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/serial
sudo insmod /lib/modules/$(uname -r)/kernel/drivers/usb/serial/usbserial.ko
sudo insmod ./cp210x.ko
  1. (Optional) Clean the redundant files:
make clean
  1. (Optional) Test IMU device:
$ cd ~/catkin_ws/src/hipnuc_imu_ros/driver-test
$ gcc ./imu_data_decode.c ./packet.c ./serial.c -o ./imu-test

Connect HI216 device via a USB cable, then verify the output:

./imu-test

Configure ROS Package

  1. Compile ROS package:
$ cd ~/catkin_ws
$ catkin_make -DCATKIN_WHITELIST_PACKAGES="hipnuc_imu_ros" -j1
  1. Connect HI216 device via a USB cable, then test the device according to the following commands :
#The 1st terminal:
$ roscore
#The 2nd terminal:
$ roslaunch hipnuc_imu_ros imu.launch

Now you should see the received IMU data in the terminal. Enjoy!

Note:

  1. If the permission problem is encountered, please run the following command:
$ sudo chmod 666 /dev/ttyUSB0

About

A ROS wrapper for HiPNUC HI216.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published