Simulation examples on SOFA framework with haptics force feedback - c++

For last two weeks I was trying to build SOFA framework and run some examples, with haptics force feedback, from this directory ../plugins/Sensable/examples/Denistry/.
But unfortunately I can not succeed to run it properly, because runSofa.exe stops running, when I open any of those .scn files from the directory mentioned above. I followed all the instructions to build and run from official site (https://www.sofa-framework.org/community/doc)
What I did is :
downloaded 16.08 branch sources from https://github.com/sofa-framework/sofa
configured and generated Visual Studio win32 project by CMake
built release sofaRun and sensable plugin
errors occurred in senable project, especially NewOmniDriver.cpp and OmniDrivver.cpp files. I added sofa::helper namespace [adding_sofa_helper][1]
then it compiled without errors
I am hoping to find anyone who was able to run or build simulations with haptics force feedback and want to understand what I am doing wrong. If you need more explanation about what exactly I did, I will provide it. I will appreciate any response related to this topic.

I have succeed on running examples with haptic feedback using sensable plugin. The sofa developers are still updating the sources of the framework. So I checked the master branch of their repository and build that sources. After that the examples with haptic feedback worked as it suppose to do. – Ruslan Rakhmatov just now

Related

SpecFlow/MSBuild Codebehind Gen - Generate All task

On a project I am working on, I am maintaining some Feature Tests written in SpecFlow. Our team started using Visual Studio 2017 about a year ago, and we finally got around to doing some upkeep on our tests!
Our tests for the project I'm working on were originally written in SpecFlow 2.3.2, and were last updated in Visual Studio 2015.
The SpecFlowSingleFileGenerator is known to not work on VS 2017, so I spent the better part of yesterday changing our suite to use the MSBuildSingleFileGenerator instead as detailed in this article in SpecFlow's official documentation
Problem:
Locally, I can build my solution, including the Feature Test project just fine.
However, I keep getting the following error when I try to build the project on our build server:
[exec] C:\CheckoutDirectory\My Awesome Project\packages\SpecFlow.Tools.MsBuild.Generation.2.3.2\build\SpecFlow.Tools.MsBuild.Generation.targets(45,5):
error MSB4036: The "GenerateAll" task was not found.
Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin" directory. [C:\CheckoutDirectory\My Awesome Project\AwesomeProject.FeatureTest\AwesomeProject.FeatureTest.csproj]
I should point out that our team has no experience with writing MS Build tasks, as hitherto we haven't needed to; we use NAnt build scripts on TeamCity to manage our build work. It's clear that error message would be helpful...if we knew literally anything about it.
Now, normally the correct answer would be: Google it. I did that, and this specific error has no pertinent results.
Additionally, this is blocking my team, since we need our build to work. I don't have the time to do the research and education necessary to properly understand how MS Build technology works. That wil have to come later.
Question:
Bearing in mind that SpecFlow has broken our process, and our team's lack of knowledge about the MS Build system: I need to know how to get around the "GenerateAll" task was not found error. What do I do to get around it?
Secondary Question:
I'm also open to lateral thinking. Is there some way to hack either VS 2017 or SpecFlow to make the SpecFlowSingleFileGenerator "compatible" with each other? The objective here is NOT to avoid making changes, but to control the changes. I need a path towards transitioning from the old file generator to the MS build generation system.
Additional Information:
So, I did some digging, and I found a place where "GenerateAll" is being called in the SpecFlow.Tools.MsBuild.Generation.targets file:
<Target Name="UpdateFeatureFilesInProject"
DependsOnTargets="BeforeUpdateFeatureFilesInProject"
Inputs="#(SpecFlowFeatureFiles)" Outputs="#(SpecFlowFeatureFiles->'%(RelativeDir)\%(Filename).feature.cs')">
<GenerateAll
ShowTrace="$(ShowTrace)"
BuildServerMode="$(BuildServerMode)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
ProjectPath="$(MSBuildProjectFullPath)"
ForceGeneration="$(ForceGeneration)"
VerboseOutput="$(VerboseOutput)"
DebugTask="$(SpecFlow_DebugMSBuildTask)"
>
<Output TaskParameter="GeneratedFiles" ItemName="SpecFlowGeneratedFiles" />
</GenerateAll>
</Target>
Because I've confirmed that this is being copied out to the build server, the situation is yet more mysterious. It appears that the NuGet package is being pulled down faithfully. Therefore, I can't figure out why my local copy is behaving differently than the copy on the build server.
I am not sure where you found this statement:
The SpecFlowSingleFileGenerator is known to not work on VS 2017
The SpecFlowSingleFileGenerator is working in VS2015, VS2017 and VS2019. We see it as a legacy feature, but it's still there. Since some weeks it is disabled by default, but you can enable it in the options.
It works for SpecFlow >= 2.3.2 and 2.4. For SpecFlow 3 you have to use the MSBuild integration. There are some problems with older versions of SpecFlow, but with them it can also work. It depends on your setup.
About your MSBuild error:
The MSBuild Task for SpecFlow < 3.0 is in the specflow.exe. Is it on your build server?
It is part of the SpecFlow NuGet packages. Normally you get this kind of error if MSBuild can't find the assembly where the task is.
For "debugging" problems with MSBuild, I can highly recommend to use the MSBuild Structured Log Viewer (http://msbuildlog.com/). With it, it makes it easy so see what is happening in your build.
We have an example for MSBuild Code- Behind- Generation with SpecFlow 2.3.2 here: https://github.com/techtalk/SpecFlow-Examples/tree/master/MSBuild/OldCSProj_SpecFlow232
You could compare your project with this example.
Full disclosure: I am one of the maintainers of SpecFlow.

VSTS Build Definition for Android failing

I'm starting using the build definitions from Team Services for a Xamarin Android App. In Visual Studio everything works fine and I can check in the code to VS Team Services.
UPDATE 1
Now, at the moment to create an Build Definitions for my project, it's falling.
And this is part of the log:
2016-10-13T03:30:45.7198826Z Considered treating "Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL" as a file name, but it didn't exist.
2016-10-13T03:30:45.7748834Z 2>C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets(40,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" task could not be loaded from the assembly C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'file:///C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\a\1\s\DentalLife\DentalLife\DentalLife\DentalLife.csproj]
2016-10-13T03:30:45.7778918Z 2>Done Building Project "C:\a\1\s\DentalLife\DentalLife\DentalLife\DentalLife.csproj" (default targets) -- FAILED.
2016-10-13T03:30:45.7808866Z 1>Done Building Project "C:\a\1\s\DentalLife\DentalLife\DentalLife.Droid\DentalLife.Droid.csproj" (clean;PackageForAndroid target(s)) -- FAILED.
2016-10-13T03:30:45.8018852Z
2016-10-13T03:30:45.8018852Z Build FAILED.
After, a couple of days trying to find any information I found the following stackoverflow links:
Visual Studio Team Services - Build fails, definition wrong?
TFS remains out of sync after Get Sources step
Basically, in those post they mention that this could be a security related issue.
I tried following all suggestion from changing the permissions to changing some parameters like the Build job authorization scope. But any luck so far :-(
UPDATE 2
After a lot of attempts and looking on Internet, I found that te problem was the hosted agent had a different version for Xamarin.Froms. Then I found this post http://www.blogaboutxamarin.com/xamarin-devops-with-vsts-setup-a-cross-platform-build-agent-on-windows/ where I created a on-premise agent and the Xamarin.Forms version got updated to be 6.1.1. After that I was able to queue a build ALL in Green :-)
However, I decided to upgrade the Xamarin.Forms version to be 2.3.1.114 in my Solution, because I needed to use a class that is available in that version. Locally, it builds and run OK.
Now, the problem is again the agent build in VSTS. This time is showing me a different error. That there are some dlls that couldn't be found:
obj\Release\android\src\mono\android\support\v7\internal\widget\ActivityChooserModel_OnChooseActivityListenerImplementor.java:8: error: package android.support.v7.internal.widget.ActivityChooserModel does not exist
obj\Release\android\src\mono\android\support\v7\internal\widget\ActivityChooserModel_OnChooseActivityListenerImplementor.java:33: error: package android.support.v7.internal.widget does not exist
2016-10-17T02:26:08.1053649Z private native boolean n_onChooseActivity (android.support.v7.internal.widget.ActivityChooserModel p0, android.content.Intent p1);
In my Android project I have:
Finally, this is the link of the GitHub repo where you can find the code:
https://github.com/Lesthad/CIXamarinShowTest
Any help would be very appreciate. Thanks and sorry for this long post :-(
The solution is that you need to specify JDK version in Xamarin.Android step of your build definition.

using gtest with xcode

I'm trying to set up a c++ unit testing library on my computer and figured that google's gtest would be a good fit.
I am currently running mountain lion with the most recent release of xcode.
I have been attempting to follow the instructions found here but am running into an intresting problem.
I am opening the gtest project, building it, and even though xcode tells me that the build was successful, I cant seem to find the framework anywhere. any help on this subject would be highly appreciated!
Thank you!
This worked for me:
Get the code from https://github.com/dmonopoly/gtest-cmake-example
Run the cmake GUI in the usual way (I used version 3.0.0). Hit "Configure", one of the prompts allows you to choose XCode generation. Hit configure again, Enable the "test" config option, hit configure again (and maybe even once again), then hit "Generate".
You should now be able to find the XCode project in the build directory that you specified. Open that project, and you will find the gtest source code, some demo test code, as well as a target for running the tests.

How to build WSO2 4.X from source?

We have been trying to build wso2 (various products) from source to no avail.
I have looked for information all over (with assistance from Google) and followed the few instructions we have found but without luck.
I have, on the other hand, found various posts discussing this process and how error prone it is due to this or that.
Don't get me wrong, WSO2 looks like an amazing framework to work within but confidence in the project is not boosted by the complicated/error prone/enormous build process.
Does anyone here have a good description/recipes to build the 4.x.x version of carbon?
I really don't think it is intentionally hard to build. The product is huge with tons on developers working on it. Most of the issues seem to be around erroneous commits by developers. My understanding is that WSO2 will be changing the development process to make it more robust (source: Manoj's Comment).
The WSO2 set of products are awesome and well engineered. They can be built, but you will need to persist and resolve issues along the way.
It took me quite a few days to get a working build in my spare time. Here is a rough sequence of tasks to perform:
1) Checkout the 4.0.0 branch:
svn co https://svn.wso2.org/repos/wso2/carbon/orbit/branches/4.0.0
svn co https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0
svn co https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0
For more information of the code base high level structure, see here: what is wso2 'orbit', 'kernel' and 'platform'?
2) Decide which version of a product you need to build - Which version of patch-release to build?
3) Build the three separate code bases (build the main branch plus patch-release versions below your required version).
build orbit 4.0.0/ Then build orbit/patch-release/4.0.x
build kernel 4.0.0/ Then build kernel/patch-release/4.0.x
build platform 4.0.0/ Then build platform/patch-release/4.0.x
Note to build:
use Java 6 (Use Sun/Oracle JDK - not OpenJDK)
use Maven 3
set MAVEN_OPTS to -Xms512m -Xmx1024m -XX:MaxPermSize=1024m
you will probably need to use the following mvn command line: mvn clean install -Dmaven.test.skip=true
You will find the built distribution zip file here: ROOT/distribution/product/modules/distribution/target/ (source: WSO2 Carbon 4.1.x - how to make the distribution)
Be prepared to put in the time to hunt down and fixing issues as you encounter them. Most issues seem to be due to maven dependency issues. Using google, you can usually find the answer. Also you post any issues you need help with on stackoverflow.

wso2 - so many maven issues when building from source

I have tried many different combinations of tags and branches, and none of them seem to build successfully first time around.
Question: Is this a known problem when building WSO2 products? If lots of errors are expected, then I know that it's not necessarily me doing something wrong.
EDIT:
Some of my previous stackoverflow posts:
wso2 maven issue building platform patch release 4.0.9 - failure to find org.wso2.appfactory:wso2appfactory-parent:pom:1.0.0
issue running mvn eclipse:eclipse on platform tag 4.0.3
What are the steps needed to build WSO2 Carbon Platform Patch Release 4.0.x?
After finally building a product (Identity Server) from platform branch 4.0.0, I can say: building from source can be difficult. I think this is mainly because:
The code base is huge
Code, files, etc may be checked into svn in a broken state
You have to be prepared when things go wrong to hunt down the problem and have a go at digging in the code, build files, etc to resolve the issue.
When I get a chance, I will put some instructions together which walk through a complete checkout and build of platform from scratch, because I think this will be immensely useful for others wanting to build a product.