117 Commits

Autor SHA1 Mensagem Data
Mani Monajjemi ec87053f36 Bug fixes in macros 2013-10-22 21:00:20 -07:00
Mani Monajjemi e8c4648e73 Motor PWM added to Navdata. README updated. 2013-02-13 19:17:03 -08:00
Sameer Parekh d0e54a56d0 support turning on and off usb stick recording 2013-01-15 09:44:21 -08:00
Mani Monajjemi cd4e81fc19 Minor edits for more informative information on startup 2013-01-09 15:13:31 -08:00
Mani Monajjemi 60dd3eee67 Support for flight animations added through setflightanimation
service.
2012-12-04 18:05:32 -08:00
Mike Hamer ead051af89 tags_xc no longer grows; cleared each round.
Should fix bug introduced in 5969064, where legacynavdata_msg was moved to a member variable. Because of this we need to clear vector datatypes, otherwise they accumulate over time through .push_back()
2012-12-04 10:42:27 +01:00
Mani Monajjemi 59690640d8 Legacy Navdata is now a class memeber. Minor text edits. 2012-11-28 17:55:13 -08:00
Mike Hamer c1bff2008b Renamed fullspeed_ to realtime_ ... because that's what it is! 2012-11-28 12:58:45 +01: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 9297e938c7 Added fullspeed_video
Will now publish video frames as soon as received if fullspeed_video=true.  Unfortunately to do this we needed to do a few dirty hacks, implying that our architecture is no longer so suitable for the future direction of the driver. We need to talk about an architectural redesign perhaps...
2012-11-28 12:53:25 +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 140f55e323 Added navdata_demo enabled/disabled ros_info output 2012-11-27 14:18:45 +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
Mani Monajjemi 4bfa20b278 Minor changes inside ROS loop. 2012-11-26 19:35:04 -08:00
Mani Monajjemi 30dc1b0feb Some thread-unsafe copies fixed. Initialization Info improved. 2012-11-26 19:00:35 -08:00
Mani Monajjemi 1ae6d4843f The initialization bug of the new navdata fixed. More information to be
printed on init.
2012-11-26 17:52:32 -08:00
Mani Monajjemi cf1cd64d8e Legacy navdata timestamp fix by @JakobEngel, addresses #39 2012-11-26 16:55:04 -08:00
Mani Monajjemi 2cc4fd9696 Minor changes. 2012-11-23 16:19:54 -08: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 8edc093b96 This comment doesn't seem to be valid any more? 2012-11-23 15:38:55 -08:00
Mani Monajjemi 39b5580296 Fixed bug in auto hover preventation #38. Also reversed the logic for
`hover` variable to make the logic correct.
2012-11-23 15:06:43 -08:00
Mani Monajjemi 837c4bcfb3 Merge pull request #38 from mikehamer/master
navdata_packet.header now filled, also using cmd_vel.angular.x/y != 0 for hover
2012-11-23 14:15:12 -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 01185e9788 cmd_vel.angular.x/y != 0 will disable hover mode
Removed ros params command_disable_hover and command_always_send, in
favour of disabling hover manually by setting cmd_vel.angular.x=1 or
cmd_vel.angular.y=1
2012-11-23 10:36:12 +01:00
Mani Monajjemi 8766a2a1ea Some comments added for future reference. 2012-11-22 16:14:26 -08:00
Mani Monajjemi c68b96f390 Minor bug that prevented build on groovy, fixes #35 @overbit 2012-11-22 15:51:37 -08: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 24529cd596 Added the ability to disable hover mode and constantly send commands
As per parcon's suggestion, I'm adding the ability to disable the hover
mode to allow for more predictable and thus modellable drone dynamics.
This should also be useful for my purposes.
2012-11-21 12:55:45 +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
Mike Hamer 2fc267c869 Revert "NOT FINISHED: Incorporating custom messages into code"
This reverts commit f46a7adf89.
2012-11-16 13:54:08 +01:00
Mike Hamer f46a7adf89 NOT FINISHED: Incorporating custom messages into code
Sorry for the commit, I wanted to switch back to the main branch for a
while
2012-11-14 14:37:02 +01:00
Mike Hamer efaa64c047 Added custom navdata messages and message generator 2012-11-14 14:36:24 +01:00
Mike Hamer b72793b89f Will now only read rosparams for writeable drone parameters
I put a further check on the parameter parsing code, which checks the
parameter definition to see if it is writeable before trying to find a
ros parameter
2012-11-12 16:45:01 +01:00
Mike Hamer 699fa5a3b6 Revert "will now only read rosparams for writeable drone parameters"
This reverts commit 3ec0db04aa.
2012-11-12 16:42:53 +01:00
= 3ec0db04aa will now only read rosparams for writeable drone parameters 2012-11-12 16:21:48 +01:00
Mani Monajjemi 0dc6a2a84b Manually merging #25 to add magnetometer topic (by @sameerparekh) 2012-11-09 18:37:23 -08:00
Mani Monajjemi 0b58364a5c Add backward compatibilty support for -ip command line argument 2012-11-09 17:43:53 -08:00
Mike Hamer 4f568c100c Bug Fix
I've fixed the bug causing parameter changes to have no effect on the
drone. Now we do a proper setup of the drone tool (rather than using
the factory default), which includes setting up application and user
profiles on the drone to hold our settings. We then actually send the
parameters to the drone, rather than doing nothing. The parameters
system has been extended to allow all user-modifyable parameters to be
changed (see AR.Drone SDK manual).
2012-11-09 10:14:14 +01:00
Mani Monajjemi 6bab013d70 Added flattrim service (fixes #18). Updated documentation. Some minor
files/functions cleanup.
2012-10-30 16:53:53 -07:00
Tom Howe 9efbd40019 ardrone_driver.cpp: ensure timestamps are consistent
Calling ros::Time::now() doesn't guarantee timestamps are matched as
ros::Time::now() can change between calls. This fix sets the timestamps to be
equal, to ensure consistency.

This addresses issue #13.
2012-10-11 15:16:01 +01:00
Mani Monajjemi 60f858e36f Mutex added for twist commands. 2012-09-13 17:23:34 -07:00
Mani Monajjemi 25ac4a9f8a Automatic IMU caliberation can now be disabled using
`do_imu_caliberation` rosparam and reset using `imu_recalib` service.
The `cmd_vel` queue size resized to 1.
2012-09-05 17:22:59 -07:00
Mani Monajjemi 337555f43b UINT64_C macro definition in case it is not defined by stdint.h. fixes 2012-08-29 17:15:13 -07:00
Mani Monajjemi dddaeb7b1f Minor edit. Fixes #6 2012-08-28 18:16:31 -07:00
Mani Monajjemi 18d80c97ee Navdata & Video handling callbacks from SDK are now being protected by
locks. Frequencies are now synchronized with actual data receive rate.
2012-08-27 18:21:41 -07:00
Mani Monajjemi 370cdc2bcb Freq back to 30hz. 2012-08-26 20:57:04 -07:00
Mani Monajjemi f3d23c8d4f Manual caliberation added for IMU data. CRITICAL bug in navdata handling
found. Not fixed yet.
2012-08-26 20:56:34 -07:00
Mani Monajjemi 997ab0acaa Covariance values for Imu data moved to rosparam under ardrone/cov
dictinary.
2012-08-26 12:55:23 -07:00
Mani Monajjemi 794121c07b Navdata, video & TF update frequencies changed to 50hz, 1/fps and 10Hz.
Sanity check added for Firmware number to detect awkward network
problems.Some experimental (nonsense) covariance values for IMU data.
2012-08-24 16:46:12 -07:00