IMU services, tamplete for server and client node

asked 2021-09-08 08:33:15 -0600

Astronaut gravatar image

updated 2021-09-09 03:50:29 -0600

HI

I would like to create IMU ROS services. I have a Server(in my case is a microcontroller ESC32) that can obtain IMU reading and should pass to the Client (in my case is Raspberry PI 4B) the IMU data when requested for further processing.So I just need to pass the raw IMU data. I would like to start with some ros services template for the IMU server and client node. And my IMU ROS topic is

header: 
  seq: 45672
  stamp: 
    secs: 956
    nsecs: 962000000
  frame_id: "thrbot/imu_link"
orientation: 
  x: 0.0697171053094
  y: 0.00825242210747
  z: 0.920964387685
  w: -0.383270164991
orientation_covariance: [0.0001, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0001]
angular_velocity: 
  x: 0.00156996015527
  y: 0.0263644782572
  z: -0.0617661883137
angular_velocity_covariance: [1.1519236000000001e-07, 0.0, 0.0, 0.0, 1.1519236000000001e-07, 0.0, 0.0, 0.0, 1.1519236000000001e-07]
linear_acceleration: 
  x: 1.32039048367
  y: -0.376341478938
  z: 9.70643773249
linear_acceleration_covariance: [1.6e-05, 0.0, 0.0, 0.0, 1.6e-05, 0.0, 0.0, 0.0, 1.6e-05]

Thanks

edit retag flag offensive close merge delete

Comments

The official ROS tutorials have examples/templates for services in both C++ and Python.

Akhil Kurup gravatar image Akhil Kurup  ( 2021-09-08 12:43:14 -0600 )edit

yes. Im following. I have one question. I add the ROS IMU topic in the question. So taking into account that what would be the .msg and .srv files?

Astronaut gravatar image Astronaut  ( 2021-09-09 03:50:31 -0600 )edit