Skip to content

Visualize IMU data #8

Description

@Thinking-Dragon
  • Create a new component called inertial-measurements (run ng g c inertial-measurements --module app) ;
  • Inject the ROSService in the constructor of your component (constructor(ros: ROSService) {) ;
  • For each information in sensor_msgs/imu, add an attribute in your component (ex. linearAccelerationCovariance: Vector3) ;
  • Create a method which will be called every time a message is received (ex. private handleMessage(message: Imu) { ... }) ;
    This method should take every member of the message and put their values in the attributes of your component.
  • In the constructor, subscribe to the topic ;
    Ex. this.imuDataTopic = ros.getTopic( ... ).subscribe((message: Imu) => this.handleMessage(message)).
  • In the view (.html), display the inertial measurements you received (ex. {{ linearAccelerationCovariance }}).

* Reference for the sensor_msgs/imu ROS message type:
http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/Imu.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions