PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.

Home Page:http://dev.px4.io/simulation-gazebo.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to read barometer sensor data

airsimdevdd opened this issue · comments

I have a gazebo in which i have many sensors like imu ,gps,magnetometer and their data is published in gazebo::msgs but barometer data is not publishing in gazebo::msgs it is publishing in sensor_msgs::msgs but unable to read the data any way to get barometer and other sensor data get published

Thanks in Advance

@airsimdevdd You can subscribe to the gazebo messages.

If you are not sure how to do this, here is some tutorial that you can follow: https://classic.gazebosim.org/tutorials?tut=topics_subscribed&cat=transport

@Jaeyoung-Lim barometer is being published in sensor_msgs::msgs im unable to read it getting error like unable to prase the data

@airsimdevdd what is the error?

unable to parse message of type [sensors_msgs.msgs.Pressure]

@airsimdevdd
It is really hard to provide any help with the limited information you are providing, and it discourages me to provide help

Please provide more context.( Where is that error occuring, how are you trying to parse the message, why are you trying yo parse the message, etc)

@Jaeyoung-Lim I'm using gazebo quad copter simulation without PX4 , I'm reading the gazebo sensors which are published in gazebo::msgs like IMU,Magnetometer,GPS but in gazebo barometer is not published in gazebo::msgs it is published in sensor_msgs::msgs ,like i cannot read them in gazebo Topic
window it shows the ### error unable to parse message of type [sensors_msgs.msgs.Pressure] is there any way to publish the barometer to gazebo::msgs or to read the barometer msgs ,I'm not parsing anything here. I'm reading all data into matlab

thank you in advance

@airsimdevdd You need to modify the plugin to publish the data to gazebo topics if you want to do that. The reason we don't use the standard message is that the standard message lacks a lot of essential data to simulate the barometer(e.g. temperature)

If you are not using PX4, why use the plugin in this repository?