Comments (7)
This could be a result of the 'Tock' for REP 117 in Hokuyo_node:
ros-drivers/hokuyo_node@2218ce5
If the NaNs and Infs are not being filtered out correctly, the maps could be very large or have points in 'la la' land.
http://ros.org/wiki/rep_117/migration
Check to ensure that points are being filtered properly:
// Laserscans and Ranges
for(size_t i = 0; i < msg.ranges.size(); i++){
// NaNs and Infs will always return false on a comparison.
if(msg.min_range <= msg.ranges[i] && msg.ranges[i] <= msg.max_range){
// Accept this measurement
}
}
Even better... update the software to interpret -Inf and +Inf.
If this is the issue and becomes a time-critical blocker, you can set the 'use_rep_117' to false until Hydromedusa. The parameter is planned to stop working in Hydro.
from navigation.
Running the nav stack on the PR2 with use_rep_117 set to false doesn't seem to be helping.
from navigation.
I narrowed it down to change db18d56. Before that, motion was smooth. After that, very jerky.
It was not clear to me that the fuerte nav stack actually took 60-70% cpu. When I ran the fuerte nav stack in the groovy environment, it took similar CPU as the groovy version, like the 110% Austin mentioned, but the robot moved smoothly, worked fine.
I did a "git bisect" on the nav stack between fuerte and groovy versions and found that the above-mentioned commit was where the change occurred. It was not gradual... the revisions before that commit all ran smoothly with similar CPU usage and the revisions after were jerky-all-the-time.
I have not yet determined the mechanism causing the bug. The change itself looks like straightforward move of code from one place to another.
from navigation.
Well, I have discovered one major performance-related factor in the change.
That change introduces several calls to malloc() and free() during each call to lineCost(). The malloc() and free() are called because of the std::vector which is used to accumulate grid cell locations in FootprintHelper::getLineCells(). Looking into stl_vector.h you can see (eventually) that it starts at size 0, then goes to 1, then 2, then 4, 8, etc. Every time it re-allocates it has to copy all the previous contents into the new memory and then free the old memory.
from navigation.
I looked at the two uses and where vector is filled. It looks like the ideal data structure could just be iterable (the points are never accessed out of order.) That seems to be the only constraint, seeing as elements are never removed and you know the number of elements in the vector before assigning them (numpixels in FootprintHelper::getLineCells).
Does performance improve if you call reserve on the vector before the for loop?
http://www.cplusplus.com/reference/vector/vector/reserve/
pts.reserve(numpixels);
for (int curpixel = 0; curpixel <= numpixels; curpixel++){
...
}
If that does help, it's probably worth reserving space in the other 2 vectors in FootprintHelper. Line 123 and 188.
from navigation.
I am actively working on this. I've changed it to a LineIterator class which should have similar performance as the "before" code. First though I will test it with the change simply reverted. PRK is down right now so there's a bit of a delay in testing.
from navigation.
Fixed by 450ba60. Subsequent changes implement the LineIterator refactoring, which has also been tested on a PR2 and drives smoothly.
from navigation.
Related Issues (20)
- Global and local costmaps HOT 1
- DWA, TEB and DWB can not control with low acceleration HOT 1
- Trouble installing navigation / map-server HOT 4
- Problem installation from source, error: ros/package.h: No such file or directory HOT 2
- ryxen 9 5900hx or jetson orin for navigation stack? any recommendation which one would have better result? HOT 1
- MultiThreadedSpinner move base HOT 3
- Navnf capability on planning affected by the dimensions of the occupancy grid HOT 3
- discarded by cost function 1 with cost: -6.0 HOT 2
- local costmap with two inflation layers or inflation_radius HOT 1
- In A* algorithm, There seems to be a problem when putting neighboring nodes into heap
- [map server] Changing frame id HOT 1
- navigation/costmap_2d/plugins /static_layer.cpp StaticLayer::onInitialize can't return
- Amcl not working properly . HOT 3
- The robot stops suddenly at certain intervals
- Using Own Localization Method with Navigation HOT 1
- navfn (getPlanFromPotential or makePlan) is not using the last updated map form costmap_2d HOT 1
- Possibility of remapping tf publication of AMCL HOT 2
- The "global_planner/GlobalPlanner" plans paths through obstacles and unknown areas occasionally HOT 1
- #include error doesnt seem to be fixable HOT 1
- What is the right method to set recovery_behaviors param? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation.