PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
http://dev.px4.io/simulation-gazebo.html
379 stars 798 forks source link

unable to read barometer sensor data #951

Open airsimdevdd opened 1 year ago

airsimdevdd commented 1 year ago

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

Jaeyoung-Lim commented 1 year ago

@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

airsimdevdd commented 1 year ago

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

Jaeyoung-Lim commented 1 year ago

@airsimdevdd what is the error?

airsimdevdd commented 1 year ago

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

Jaeyoung-Lim commented 1 year ago

@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)

airsimdevdd commented 1 year ago

@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

Jaeyoung-Lim commented 1 year ago

@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?