local_frame attribute returns none after vehicle is armed (ardurover-sitl) - dronekit-python

I'm using python-droneKit along with dronekit-sitl / rover-2.50, and when I try to acquire the vehicle.location.local_frame NED coordinates (after the vehicle has been armed) I only get None values.
I'd appreciate if you could help me in this matter, thanks.

Make sure that your parameter SR0_POSITION is higher than 0.

Related

Scorecard absolute comparison with % symbol

I am trying to make a comparison between two different dates in the GDS and present that information in a scorecard.
I have done this in the past with no problem, but this time I want to do an absolute comparison. Although I checked the box to make it an absolute comparison, the information appears with a % sign after it. I would like to see a "p.p." after it or nothing at all.
How can I achieve this result?
You can find below an image of what is happening.
Thanks in advance!
UPDATE:
I solved the issue by aligning all the elements of that scorecard to the right and adding a text box in front of the % sign. It is not perfect, but it works.
Not the answer you're looking for, but I don't think this is currently possible. I had to add a disclaimer below the scorecards to indicate the comparison values are absolute (despite the percentages). Not ideal, but at least it shows the info

pddl precondtion not working correctly in the plan

I am working on a project in pddl. The idea is to pick four balls and transfer them to the conveyer. (defined in the goal) The simple pickup, move and drop actions work fine but when I try to make it more complicated for eg. by adding different poses for the robot,detecting the item before picking, the plan does not follow the pre-condition. For e.g. focus on the pick action, The correct pose is not followed. Any ideas regarding the mistake in the code? The final plan should to have correct pose for the each action and detect the item one by one and not all at once
link below:
http://editor.planning.domains/#read_session=BzTaNrk4dQ
faulty output:
https://i.stack.imgur.com/ubWS8.png
Likely something missing/wrong in the precondition. You have this for the pickup action:
(exists (?f - pose ?g - gripper)
(at-pose robotarm pregrasppose))
Note that you don't use the variables ?f and ?g at all in the fluent.
Thanks haz for going through the code.
I was able to debug it. the assignment of preconditions was incorrect. the correct way of assigning a value to a parameter is the following:
(= ?p findshirt)
in the above line you assign findshirt type to 'p'

SpellCheck suggestion didn't populate the expect result

All. Forgive me I am a newbie in Solr, I am trying to add spell check in the Solr.
Currently I can say it works .But I got a problem which the suggestion is not showing up as I expected.
I tried to search with the keywords lu. and expect the suggestion lung in the result. But it doesn't show up.
the Url is http://10.2.21.38:7574/solr/gettingstarted_shard1_replica2/spell?q=lu&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
Only when I tried with lun. It can return suggestion lung.
Any idea to get it work? Thanks.
Updated
It seems it has something with the configuration <str name="accuracy">{number}</str> the original value is 0.7. When I changed it to smaller value like 0.001 . keywords lu can get the suggestion lung.
But I want to know what does it mean for the accuracy. The document only say a little about it .The accuracy setting defines the threshold for a valid
suggestion. That is it.
Could someone please tell me more about it for better understanding . and Is there any other configuration to affect the suggestion result ? Thanks.
The accuracy setting refers to the value that the active StringDistance calculator returns (which is between 0 and 1, depending on similarity). The standard distance measurer in Lucene is the LevensteinDistance (sic). I'll refer to the source to see how it works - I'm not intimately familiar with the code. The returned value is at least based on:
return 1.0f - ((float) p[n] / Math.max(other.length(), sa.length));
Where p[n] is calculated through the iteration above in the code.
You can change most implementations in the spellchecker, such as the distance measurer or the spellchecker itself. See Spell Checking for examples. maxEdits and minPrefix might be interesting as well. Also, remember that lu and lung have a fairly large difference, as both terms are short and not really misspellings of each other. There are other ways of doing automagic completion, such as the Suggest module or wild card searching against a StrField or a KeywordTokenizer-ed field.

How to search three or more arrays row by row for an optimum value in matlab

I have a few variables and here they are, three variables "R1, R2 and R3" each have a size of [40 x 1].
I have a fourth variable U of the same dimension. For every U(i) I need to search for an optimum value within R1(i), R2(i) and R3(i) which would return a single value solution. I intend to plot the optimum value against U9i).I have been trying to wrap my head around the knnsearch function but no luck.
Any one out there who could please help??
Thanks
Well when I can't wrap my head around something, I don't come here first.
A lot of people forget this one because we are online, but read a book on the topic. Have your code open so when you see something in the book, test it out.
Draw out any type of diagram. I call these "Napkin Diagrams", because I write it on anything, even a napkin.
I play with code until my keyboard has no letters left on it, then I keep plugging away until the keys fall off
Explore the language API's
Check for public repositories that you can play with
Google, is okay for a quick reference, but google will not teach you anything other than how to google
I talk my code over with myself all the time, people think I'm nuts, but so do I . . It actually works sometimes.
Then if I still can't get it, I come here with a list of things that I have tried, sample code that has not worked, etc.
I used to hate when people told me this, but that was the best thing anyone could have done for me so I tend to do the same now" Thinking about coding is a big part, but u have to get done wht u can. Then we all know what level u are at. Plus it being the end of semester a lot of these types of questions are homework...
Thinking is good, now turn those thoughts into a conceptual design . It's okay to be wrong in this stage, its all just conceptual
If I understood correctly, this might be what you need:
RR = [R1(:) R2(:) R3(:)];
d = bsxfun(#minus,RR, U(:));
[m mi] = min(abs(d),[],2);
answer = RR(:,mi);
first - put the three vectors into a single matrix:
RR = [R1(:) R2(:) R3(:)];
next, take the difference with U: bsxfun is ideal for this kind of thing
d = bsxfun(#minus,RR, U(:));
Now find the minimum absolute difference for each row:
[m mi] = min(abs(d),[],2);
The corresponding indices should allow you to find the "best fit"
answer = RR(:,mi);
I had to do some mind reading to get to this 'answer', so feel free to correct my misunderstanding of your problem!
update if you just need the highest of the three values, then
val = max([R1(:) R2(:) R3(:)]');
plot(U, val);
should be all you need...

Strange OpenCV Distance Transform Results

I'm trying to run a distance transform on a thresholded binary image in
order to assist anomaly detection (my hope is that I can detect large
changes around the edges of the object), however for some reason, upon
running my Distance Transform script, I'm getting a strange banding type of
effect. I tested something similar in the Distance Transform demo script in
the samples directory, with the same results. One possible reason I came up
with was that the distance was going beyond the 0-255 scale and therefore
essentially being modulus'ed to keep it within the boundaries. Has anyone
had any experience with this that could advise?
I have posted images and code on my blog if that helps
Thanks in advance,
Ian
One quick way to test your theory: try with a grey scale image that's muted (all values v --> 128+(v-128)/32 or something) and see if that makes the bands much wider or eliminates them completely.
It's always a good idea to nail down what the problem is first, and then try to fix it.
I can't help with the code, but I'd like to point out that the expected result on your blog is probably incorrect as well: look at the sharp black-gray border in the bottom part of the large object: it should not be there, as the maximum difference between two adjacent pixels should be 1.

Resources