QISDK API6 GoTo - pepper

Pepper got a new API update recently and we wanted to try out new navigation function, exactly... GoTo.
New QISDK plugin update in Android Studio + API 6 and JDK1.8 installed as mentioned in the requirements and new parameters for GoTo ( MaxSpeed, PathPlanning etc. ) are shown and usable, bet when we launch our activity and it builds the code it throws exception
W/System.err: Uncaught exception on Future: Could not find suitable method 'makeGoTo' in the given object for parameter types: (com.aldebaran.qi.AnyObject, com.aldebaran.qi.AnyObject, com.aldebaran.qi.Tuple). Candidates are: 'makeGoTo::(oo)'.
W/System.err: com.aldebaran.qi.QiException: Could not find suitable method 'makeGoTo' in the given object for parameter types: (com.aldebaran.qi.AnyObject, com.aldebaran.qi.AnyObject, com.aldebaran.qi.Tuple). Candidates are: 'makeGoTo::(oo)'.
when we try - > try - catch block says that this block even cannot throw QiException.
Same thing for new classes like HumanApproach as well...
What could be possible problem? Please help!

The API 6 is only available from Naoqi 2.9.4 which is going to be release this week.

Related

WinUI 3 Desktop XAML Databinding - WinRT originate error - 0x8001010E when the Property is changed

I am following the BookStore data binding example, documented at XAML controls; bind to a C++/WinRT property, up to and including the "Bind the button to the Title property" section.
My starting point is a new "Blank App, Packaged (WinUI 3 in Desktop)" project in Visual Studio.
[EDIT] Starting from a "Blank App (C++/WinRT)" project, which is for UWP apps, works perfectly. The problem persists with "WinUI 3 in Desktop" projects.
The initial data binding works and the button content L"Atticus" is read from the BookSku title property. However calling MainViewModel().BookSku().Title(L"To Kill a Mockingbird"); in the click handler, as directed in article, throws the exception
Exception thrown at 0x00007FFC801B4ED9 (KernelBase.dll) in BookStore.exe: WinRT originate error - 0x8001010E : 'The application called an interface that was marshalled for a different thread.'.
Stepping through the code, the call
m_propertyChanged(*this, Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"Title" });
in void BookSku::Title(hstring const& value) is where the exception is thrown from within.
I can change the button content manually, not through the binding property.
The first example in the Data binding in depth article describes a very similar, though slightly less complicated, data binding scenario. It throws the same exception.
I am using latest Microsoft.Windows.CppWinRT version 2.0.210825.3 and Windows App SDK version 0.8.3
This issue #4547 was the key to figuring out the solution. You need to use the Microsoft namespace, not Windows. For documentation purposes this is what the BookSku.idl file should look like:
// BookSku.idl
namespace Bookstore
{
runtimeclass BookSku : Microsoft.UI.Xaml.Data.INotifyPropertyChanged
{
BookSku(String title);
String Title;
}
}
The application called an interface that was marshalled for a different thread
The problem is you update the property in the no-uithread, so it will throw the above exception, you could use the following to go back to ui-thread before updating the property.
co_await winrt::resume_foreground(Dispatcher(), CoreDispatcherPriority::Normal);
For more detail please refer to document here.

Google Play Services C++ / Run UI on second activity using IntentHandler

I am developing a mobile game using Cocos2D-x engine for android platform and i want to integrate GPGS on it.
I achieved to show leaderboards, but there is a little annoying problem. When leaderboard is visible, if i go background and then come back to app, the gamescene goes to black. I think opengl context being released and doesnt restore again. In my opinion running leaderboard on same activity causes this, the game engine cant understand whats happening there. Whatever, because of this I want to run leaderboard (and also all GPGS things) on a new activity using intent.
Google likes "Providing"
In the reference documents of Google Play Game Services C++ SDK, there is a few unclear/fuzzy explanation about using SetOptionalIntentHandlerForUI method.
"Provide a function that can start a provided UI intent at any point, using startActivityForResult."
What is the mean of "Providing"? What is a provided Intent? How will I use startActivityForResult method? Unfortunately, "using" and "providing methods" are not clear expressions for coding. There is no sample about
using this method in the documents of GPGS for C++. Eventually,
Google's document is so poor and
there is no useful information on the internet. If someone from Google helps me, I will be so happy.
As i understand, I wrote the code like this. But it gives error when starting.
AppActivity.java
public void runGPGSActivity(Intent i) {
startActivityForResult(i,100);
}
AndroidPlatformConfiguration.h (From C++ gpg lib)
typedef std::function<void(jobject)> IntentHandler;
AndroidPlatformConfiguration &SetOptionalIntentHandlerForUI(
IntentHandler intent_handler);
main.cpp (JNI binding, the working code, GPGS runs on same activity )
gpg::AndroidPlatformConfiguration platform_configuration;
platform_configuration.SetActivity(activity);
StateManager::InitServices( ...
main.cpp (JNI binding, GPGS must be run on new activity )
gpg::AndroidPlatformConfiguration platform_configuration;
jclass activityClass = env->FindClass("org/cocos2dx/cpp/AppActivity");
jmethodID jIntentHandlerMethodID = env->GetMethodID(activityClass,"runGPGSActivity","(Landorid/content/Intent;)V");
jobject jIntentHandler = env->NewObject(activityClass, jIntentHandlerMethodID);
gpg::AndroidPlatformConfiguration::IntentHandler mIntentHandler; /*= [](jobject mjIntentHandler){};*/
std::function<void(jobject)> intentHandler = std::bind(mIntentHandler,jIntentHandler);
platform_configuration.SetOptionalIntentHandlerForUI(intentHandler);
platform_configuration.SetActivity(activity);
StateManager::InitServices(
There is no build error, but the application crashes when launching.
03-24 14:12:24.301: A/libc(21352): Fatal signal 6 (SIGABRT) at
0x00005368 (code=-6), thread 21352 (main)
And some links about this issue:
IntentHandler reference
StartActivityForResult reference
/// Thank you in advance. ///
...Yeah I solved the problem, but didn't use IntentHandler method.
I was using this code in my app, to show weekly leaderboard data.
gameServices->Leaderboards().ShowUIBlocking(leaderboardId,gpg::LeaderboardTimeSpan::WEEKLY);
But return value is not void, it is UIStatus (whatever it is)
I've reverted back to this code, app is not going to black screen now. This method returns void, I think I have to catch some callbacks when using ShowUIBlocking method, with that UIStatus thing.
gameServices->Leaderboards().ShowUI(leaderboardId);
But now, I can't benefit from timespan feature of leaderboards.
I am going to research how it can be used. There is no problem for now. But, documentation of SetOptionalIntentHandlerForUI must be written more explicit, for programmers who want to use it.

Nodejs C++ event emitter. add-on error. Non-function in MakeCallback. method = emit Abort trap: 6

I'm creating a C++ level event emitter addon for node.js. I'm getting this C++ error when including the add-on in a node.js project.
Non-function in MakeCallback. method = emit Abort trap: 6
I found this Gist with a simplified example of the same behavior:
https://gist.github.com/jedi4ever/4250746
Hoping for some general insight into why this might be caused or what this error means.
If I understand what you're trying to do correctly, you have a couple of problems in your keylogger.js file;
util.inherits(new keylogger, events.EventEmitter);
exports = keylogger;
You're trying to extend an instance, and your export statement is a bit off. This should work better to export keylogger as an instance which the test file seems to expect;
util.inherits(keylogger, events.EventEmitter);
exports.keylogger = new keylogger();

Coldfusion 8 - mapping conflict causes "argument is not of interface type" error

I have been researching this, and cannot seem to find anything about it.
We work on CF8. When my coworker tried installing my latest code updates, he started seeing errors that the argument supplied to a function was not of the specified interface type. Worked fine for me. Same set up. Sometimes it works for him. Also have the problem on our dev server.
I have since been able to isolate and reproduce the problem locally.
Here is the set up.
I have 2 mappings on the server:
"webapp/" goes to c:\webroot\
"packages/" goes to c:\webroot\[domain]
Then I created an interface, call it ISubject and a component that implements it, called Person, and saved both under packages. Here is the declaration for Person:
cfcomponent implements="packages.ISubject"
Finally, there is a component, called SubjectMediator with a function, called setSubject, that wants an object of the ISubject interface type. Here is the argument declaration for setSubject:
cfargument name="subject_object" type="packages.ISubject"
To implement:
variables.person = createObject("component", "packages.Person").Init();
variables.subjectMediator = createObject("component", "packages.SubjectMediator ").Init();
variables.subjectMediator.setSubject(variables.person);
That last line throws the error that Person is not of type ISubject. If I do isInstanceOf() on Person against ISubject it validates fine.
So the reason this is happening? Dumping getMetaData(variables.person) shows me that the interface path is webapp.[domain].ISubject. And indeed, if I change the type attribute of the argument to use this path instead of packages.ISubject, all is fine again.
Coldfusion seems to be arbitrarily choosing which mapping to resolve the interface to, and then simply doing a string comparison for check the type argument?
Anyone had to contend with this? I need the webapp mapping, and I cannot change all references to "packages" to "webapp.[domain]." I also am not able in this instance to use an application-specific mapping for webapp. While any of these 3 options would circumvent the issue, I'm hoping someone has some insight...
The best I've got is to set argument type to "any" and then check isInstanceOf() inside the function... Seems like poor form.
Thanks,
Jen
Can you move the contents of the packages mapping to outside the webroot? This seems like the easiest way to fix it.

GetModuleFileName from MSI

I try use the "GetModuleFileName" to get current "setup.msi" location use mydll.dll in setup.msi installer.
But always give me "c:\windows\system\setup.msi".
Any body know why ? Plx help .
You mention C++ so I'm assuming that you are creating a Type 1 custom action as described here. If this is so, I'm guessing that you are trying to figure out where the install is occurring from so you can reference a file or something. If so, check out the MsiGetProperty function and the OriginalDatabase property. If that doesn't meet your needs checkout the the MsiSourceList* functions starting with MsiSourceListGetInfo.