Skip to content

caiotoledo/imu-rpc

Repository files navigation

Server and Client IMU based on RPC Communication

Runtime Tests Stability Tests Static Analysis Unit Test

codecov.io

License

Provides a library to interface with IMU using Industrial IO as a Daemon distributing it via dbus-cxx (a DBus C++ Wrapper) to its clients.

System Diagram

graph TD
  subgraph Server Daemon
    IMUDaemon---id2[Server dbus-cxx]
  end
  subgraph Application Client
    LibIMUClient---id3[Client dbus-cxx]
    ClientApplication---LibIMUClient
  end
  subgraph Linux System
    IMUDaemon-.->|Via FileSystem|id4[[Linux IIO Driver]]
    subgraph DBus
      id2-.->|IPC|id1[[DBus Daemon]]
      id3-.->|IPC|id1[[DBus Daemon]]
    end
  end
Loading

Code Documentation

https://caiotoledo.github.io/imu-rpc/

Dependencies

Build and Install Project

cd <path_project>
mkdir .build
cd .build
cmake ../
make
sudo make install

Default File Location Install:

  • Binaries: /usr/bin/
  • Headers Libraries: /usr/include/
  • Shared Libraries: /usr/lib/

Running System

After Building and Installing binaries it's possible to start the imu daemon and test with the sample applications:

Start Daemon

Start IMU Daemon running:

imu-daemon -d

Check the default configuration values using

imu-daemon --help

Execute Clients

IMU Command Line Interface

Receive IMU data in command line:

imu-cli -a -c -g -e -t<TIMEOUT>

Show Raw Accelerometer (-a), Raw Gyroscope (-g), Euler Angle (-e) and Complementary Filter Euler Angle (-g) for <TIMEOUT> seconds (-t).

IMU Socket Interface

Send IMU Data via TCP/UDP socket:

imu-socket -d -p<PORT> -tu

Run application as daemon (-d) to provide IMU Data via TCP (-t) and UDP (-u) socket in port number <PORT> (-p).

Receive IMU Data via TCP/UDP socket:

python3 <PROJECT_PATH>/script/imu-dbus.py -a<IP> -p<PORT> -s<SOCKTYPE> -m -d

Show IMU Data received by <SOCKTYPE> socket (-s) from <IP> (-a) and <PORT> (-p) and display it in a MathPlot (-m) and in console (-d).

Build and Execute Unit Test

Same steps as Build and Install Project but adding -DBUILD_UNITTEST=1 in cmake command:

cd <path_project>
mkdir .build
cd .build
cmake -DBUILD_UNITTEST=1 ../
make
make test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published