9 Commits

Autor SHA1 Mensagem Data
Mani Monajjemi ec87053f36 Bug fixes in macros 2013-10-22 21:00:20 -07:00
Mike Hamer 7b8a651067 fullspeed_navdata now affects publishing of /ardrone/navdata,imu,mag topics as well.
This update also includes a few speed improvements for the case where fullspeed_navdata==true.
2012-11-28 12:55:04 +01:00
Mike Hamer 7fdf268969 Saving time of navdata reception
Before, we were stamping the /ardrone/navdata,mag,imu messages with the time that they were processed in the main ros loop. This caused unnecessary delays in the timestamp. Now we save the time of navdata reception in the navdata handling loop, which is then used to stamp the output messages when processed by the loop.
2012-11-28 11:45:03 +01:00
Mike Hamer af03f2536e Moved navdata initialization to configureDrone() rather than happening the first time that navdata is sent 2012-11-27 13:51:32 +01:00
Mike Hamer d3249e151e Fixed a bug whereby all navdata messages with array-typed members would grow in size.
This bug was introduced when moving local scope message variables to class-level. This move meant that messages wouldn't be reset after being sent. This was not a problem for non-array type message members, which were reassigned before being sent. However for array-type message members, which are filled using .push_back, no reset occurred. This fix appropriately clears these members before re-filling them on every send-loop.
2012-11-27 12:57:29 +01:00
Mike Hamer 784df9925e Full-Speed Navdata & Loop-Rate
Two new parameters have been added:
* `fullspeed_navdata`, which controls whether new-style navdata is published when received, or at `looprate`
* `looprate`, which controls the speed of the internal ros-loop. Note that legacy navdata is always published at `looprate`

Also made various speed improvements to the navdata processing pipeline to enable this faster processing.

Also fixed a problem with `enable_legacy_navdata`, whereby it wasn't read correctly and thus had no effect. Also mentioning it here because I forgot to mention it when I added it ages ago.

Also updated and commented the launch file to reflect these changes.

Regarding testing, I've flown with this for three batteries, with `fullspeed_navdata=true`, `looprate=50`, while rosbagging everything and experienced no unusual behaviour.

Conflicts:

	src/ardrone_driver.h
2012-11-23 15:42:42 -08:00
Mike Hamer b3ef0f186d navdata_<packet>.header is now correctly filled
Header.stamp and header.frame_id are now correctly filled. Messages are
also now member variables rather than local to save initialization time.
2012-11-23 10:42:43 +01:00
Mike Hamer 1b7074de37 Added enable_legacy_navdata (true by default)
This flag allows us to turn off the legacy navdata/imu/mag topics,
favouring usage of the actual packets
2012-11-21 17:26:04 +01:00
Mike Hamer ca5fadf778 Added custom messages and handling code
We now have the ability to access any of the navdata structs which are
sent back by the drone. Still to do is to enable/disable the drone
sending based on whether we're interested in receiving the message.
2012-11-21 12:53:33 +01:00