CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Mon Oct 14, 2019 11:56 am

Hi friends.
Is this combination working ?
Is there a Hello world using it somewhere ?

Many Thks
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby JernejL » Mon Oct 14, 2019 12:18 pm

I've cross compiled from linux to win32 with GCC + mingw, it will compile but i had not done much tests with it.

Best is to try and see what happens - i can help you a bit as you go along if you encounter issues.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Mon Oct 14, 2019 12:53 pm

good to know thks.
I appreciate.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby Julio Jerez » Mon Oct 14, 2019 5:30 pm

Hi blackbird_dream \
are you using a standalone app, or are you still using Unity?

JernejL
when you cross compile, are you using CMake?
does a CMake Script should handle that kind of makefile?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Tue Oct 15, 2019 2:18 am

Hi Julio.
I'd like to use a standalone configuration.
I've finished with unity. It worked fine Thks 2 you and Sweenie but now I need something basic and quick to perform iterative simulations (Machine learning). I guess the aforementined combination is ideal.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Tue Oct 15, 2019 4:56 am

I compiled the last build with VS2017 in x64/release mode.

Then I copied newton.lib and newton.dll in my C::B project.
I added the library link towards newton.lib and the search directory C:\newton-dynamics-master\sdk\dgNewton. This folder contains newton.h

I added
Code: Select all
#include "newton.h"
in my main.cpp file
and the instruction
Code: Select all
NewtonWorld* const world = NewtonCreate ();


Then it compiled in C::B with no error.

It seems that it works, doesn't it ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby Julio Jerez » Tue Oct 15, 2019 2:32 pm

what I was saying was that the SDK comes with a CMAKE script that,
I have only tested in windows system, and once a Build Linux and OSX
My recommendation is that you use that script because is give you the most flexibility,

CMAKE is very standard across many platforms.

with this you can make the engine on any directory you want, select few options lie build what you need. Also you can build static libraries and dlls, which come handy for debugged during development.

I just build it in window VS 2017 and compiled out of the box.

on the machine learning stuff, I assume you are doing that to train walking articulation.
I am curios as you what approach you are using,
are you going for the PID system like most people, where you try to apply a torque joint,
or are you going to the inverse dynamics where desire position are specifies and the the physics engine calculate the joint torques.
I like this method better, by requires and accurate physic solver. IO is my contention that a Neutral Net will have a must easier time training using the the inverse dynamics system, because it does no have to deal with all the noise generate by PID and bad physics solvers.
can you give a run down of you aproach.

also check out the work that Dave Gravel and I are doing in the SDK, there are two soon to be tree of these demos, in degree of complexity.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby JernejL » Tue Oct 15, 2019 3:01 pm

Julio Jerez wrote:Hi blackbird_dream \
are you using a standalone app, or are you still using Unity?

JernejL
when you cross compile, are you using CMake?
does a CMake Script should handle that kind of makefile?


It's in my fixes, i can cross compile with mingw to win32 dll from linux, i did not yet make everything ready, but there's quite some changes done to makefile to support this.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby Julio Jerez » Tue Oct 15, 2019 3:26 pm

My understanding of the CMake is that is is POSIT compliance, that it should world for any POSIT build system. I have never test this but that was my impression.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Tue Oct 15, 2019 6:51 pm

The cmake doesn t work here with mingw64.
Ps: i ll keep you informed of what we get.the idea is to work in forward dynamics with muscle controlers and fit the control parameters by ML i.e optimal control.
Last edited by blackbird_dream on Wed Oct 16, 2019 2:34 am, edited 1 time in total.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Wed Oct 16, 2019 2:32 am

oh well.
I've got a cmake file from jerneJ for linux Thks, but I'm sorry this is chinese for me, I can't do anything with that file.
So, let's carry on with the dll built with VS2017 and working here with mingw64.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby Julio Jerez » Sat Oct 19, 2019 11:44 am

blackbird_dream wrote:i ll keep you informed of what we get.the idea is to work in forward dynamics with muscle controlers and fit the control parameters by ML i.e optimal control.


I know I am in a very small minority, but I believe that is the very wrong way to go about.
For almost 30 years studying robotics I came to the conclusion that using proportional integral and derivate controllers to emulate the way muscles generate torque is just a bad idea.
among them 1 any organic creature uses several dozen muscles to controll the degree of freedoms,
we try to simplify that to mealy one, two or three dof, beyond that you run onto math numerical stability. secund that is not really how muscles works. Muscle are more like step motors than PID.
my idea is to embrace inverse dynamics.

anyway, I am locking forward to what you get.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CodeBlocks + Freeglut + Mingw64 + ND in W7/W8/W10

Postby blackbird_dream » Mon Oct 21, 2019 4:31 am

Maybe it's not the right place here to discuss it, but you can find really amazing demos in FD. It's not only PID actuators it's much more complex. You need to sequentialize the gait cycle and add global balance constraints. Without it just fails.
I don't understand how you can build autonomous dummies in ID. What I aim to do is a dummy that adapts itself according to external sollicitations.

Another keypoint is to model the behavior law of muscles taking account of velocity and length dependencies and of course model a minmum set of flexors and extensors.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

cron