-
Notifications
You must be signed in to change notification settings - Fork 226
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
Enables real-time publishing of new-style navdata #39
Conversation
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
Header.stamp and header.frame_id are now correctly filled. Messages are also now member variables rather than local to save initialization time.
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.
i just installed the package on a new pc, your last update from 11 days ago (the current master branch) broke the navdata_demo parameter. your code assumes the onboard-default is 0, while it acutally is 1, hence it cannot be set to 0 (= send full navdata) anymore. pls fix ;) |
That's very strange.... the default value for navdata_demo listed in I've also just tested it and I am able to set SEND: CAT_COMMON/navdata_demo = 1.000000 (DEFAULT = 0.000000) If you telnet into the drone, there are a few configuration files that contain the drone's current configuration:
Querying the value of # cat config.ini | grep navdata navdata_demo = FALSE And then in the situation above, where I set navdata_demo=1: # cat config.ini | grep navdata navdata_demo = TRUE What makes you suspect that In any case, I've just published a new branch, which will send all parameters to the drone, irrespective of whether they are default or not. Let me know if any of the above helps! |
I'm back home & don't have the drone here, but So with navdata_demo == false (and loop_rate set to 50), "rostopic hz /ardrone/navdata" should (and did) give 50Hz. After removing the if-check in ardrone_driver.cpp:189, it worked again. ("rosrun ardrone_autonomy ardrone_driver _navdata_demo:=0" => 50Hz). |
Ahh okay, now I understand. Thanks! So removing the check (ardrone_driver.cpp:176) if(ardrone_application_default_config.NAME!=DEFAULT) Worked for you? |
Thanks @mikehamer. I merged your previous pull request #38 to |
The changes are now in |
@JakobEngel Are you talking about this line: https://github.com/AutonomyLab/ardrone_autonomy/blob/master/src/ardrone_driver.cpp#L189 |
@JakobEngel I have problem reproducing the bug you reported. I am on the rosrun ardrone_autonomy ardrone_driver _navdata_demo:=0
...
rostopic hz /ardrone/navdata
>>> 50Hz While rosrun ardrone_autonomy ardrone_driver _navdata_demo:=1
...
rostopic hz /ardrone/navdata
>>> 15Hz |
strange, ill test it again on monday... but as I understand it, it has been fixed anyway ;) |
I tested this branch yesterday and have found some potential issues, the largest being that the new-style navdata now takes up a lot of space. Previously I had recorded (through an unpublished branch) 200Hz new-style data for 4 minutes and the bag-file was 180MB. Now a minute of flight is 2+GB and eventually will overflow the rosbag buffer. I'm still trying to understand the reason for this – a task for tomorrow. |
@JakobEngel I tested the latest I am really impressed by the autopilot's performance. I still need to test everything more to have a better understanding of the system. In the meantime, we can work together to make the driver and your code work flawlessly together. |
@mikehamer I did not test the rosbag file sizes, however I was not able to get update frequencies above 170Hz on a very descent PC. |
I did more tests on "realtime" and "legacy" publishing of "Navdata" and here are my thoughts:
In order to examine it more, I put a ROS_INFO inside this In summary, I suggest to remove the "Full Speed Navdata". Anyone who is interested in getting 200Hz navdata update, can increase the |
Actually, I'm fairly sure all the above is due to a bug which I introduced when making the change from a local message variable to a class message variable (to save allocation time): Some of the messages from the drone have arrays of data which need to be extracted from the struct and placed into a rosmessage. This in essence requires a: I'm fixing and testing this at the moment. |
Fixed the bug in the current dev-unstable branch and have submitted the changes as a new pull request #41. Note that the above two changes do fix the problem, but were for the private branch of mine (which I have now deleted). I then pulled your current dev-unstable branch and merged the above two changes, plus a few more improvements, into that. See #41 for more details. |
This pull request contains the improvements found in my last pull request #38, while adding the following two improvements:
Two new parameters have been added:
fullspeed_navdata
, which controls whether new-style navdata is published when received, or atlooprate
looprate
, which controls the speed of the internal ros-loop. Note that legacy navdata is always published atlooprate
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.