Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No mapping for distance sensor #1071

Closed
RR2-IP2 opened this issue Aug 9, 2018 · 4 comments
Closed

No mapping for distance sensor #1071

RR2-IP2 opened this issue Aug 9, 2018 · 4 comments

Comments

@RR2-IP2
Copy link

RR2-IP2 commented Aug 9, 2018

Hi,

I am trying to access data from a distance sensor (Leddar One Range Finder) measuring height using MAVROS. I am able to view the data using QGroundControl (as my flight controller is PX4).

On the drone (with MAVROS installed), I tried the following commands:
$ roscore
$ rosrun mavros mavros_node _fcu_url:=tcp://127.0.0.1:5760 _system_id:=2

After this, I get the same error repeated:
DS: no mapping for sensor id: 0, type: 1, orientation: 25

I am able to check the ID, type and orientation in QGC which makes me sure that this is the Leddar One sensor.
I removed distance_sensor and rangefinder from the blacklist in px4_pluginlists.yaml.
I have also tried changing the distance_sensor information in px4_config.yaml file but have had no luck (tried various orientations: PITCH_270, NONE and 25).

I have found that the error is generated from line 205 in this code: distance_sensor.cpp but I can't figure out what is causing it.

I am only new to ROS so any help would be greatly appreciated.

@TSC21
Copy link
Member

TSC21 commented Aug 9, 2018

Have you checked the configuration for it on the px4_config.yaml? If you don't config the respective parameters to access the data, you won't be able to get the data properly. So you need to add a propper map for it on the yaml file (you already have examples there). Also, any reason for changing the sys_id to 2? You also don't need to remove rangfinder from blacklist because that's APM compatible only.

@RR2-IP2
Copy link
Author

RR2-IP2 commented Aug 9, 2018

Thanks for the quick response and for adding relevant labels!

Are you able to be a little bit more specific or point me towards the area of px4_config.yaml that needs to be changed? The only part I have change is under distance sensor: (line 133 in the source code)
leddar1_pub:
id: 0
frame_id: "leddar1_laser"
orientation: PITCH_270 # RPY:{0.0, 270.0, 0.0} - downward-facing
field_of_view: 0.0 # XXX TODO
send_tf: true
sensor_position: {x: 0.0, y: 0.0, z: -0.1}
And I removed the other sensors from id: 1 onwards

I followed the instructions on this page since we are using an Intel Aero RTF drone, which included changing sys_id to 2.
No problem, I will add rangefinder back to the blacklist.

I understand I may be asking too much. If there are any resources you know of that would help me with correcting px4_config.yaml rather than you needing to explain it, that may suffice.
Thanks

@RR2-IP2
Copy link
Author

RR2-IP2 commented Aug 14, 2018

I have resolved my issue. I created a launch file that specifically passed in "px4_config.yaml" as the config_yaml argument. This initialized distance sensor correctly and published the data to a ROS topic as desired.

This thread may be closed.

@vooon vooon closed this as completed Aug 17, 2018
@ashwinvk94
Copy link
Contributor

Just to clarify, I had to comment "- distance_sensor" from the "px4_pluginlists.yaml" for the lidar data to be published.

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

No branches or pull requests

4 participants