Editing User:Elf11
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 78: | Line 78: | ||
1st August | 1st August | ||
− | Starting reading on the BRL-CAD documentation and going through the tutorials from this page | + | Starting reading on the BRL-CAD documentation and going through the tutorials from this page http://brlcad.org/wiki/Main_Page. |
+ | |||
2nd August | 2nd August | ||
− | Going to the tutorials from Tutorials from the following sections: | + | Going to the tutorials from http://content.gpwiki.org/index.php/BRL-CAD:Tutorials from the following sections: |
''Geometry Modeling Kernel, | ''Geometry Modeling Kernel, | ||
''Geometry Conversion, | ''Geometry Conversion, | ||
Line 88: | Line 89: | ||
3rd August | 3rd August | ||
− | Continuing going through the tutorials from Tutorials. | + | Continuing going through the tutorials from http://content.gpwiki.org/index.php/BRL-CAD:Tutorials. |
4th August | 4th August | ||
Line 104: | Line 105: | ||
7th August | 7th August | ||
− | Starting getting myself familiar with Tcl scripting language, going over tutorial. | + | Starting getting myself familiar with Tcl scripting language, going over this http://www.tcl.tk/man/tcl/tutorial/tcltutorial.html. |
8th August | 8th August | ||
Line 128: | Line 129: | ||
21st August | 21st August | ||
− | Looked into the simulation system and did some of the simulation presented in the BRL-CAD documentation, also looked into the submitted file | + | Looked into the simulation system and did some of the simulation presented in the BRL-CAD documentation, also looked into the submitted file in this patch https://sourceforge.net/tracker/?func=detail&aid=3531595&group_id=105292&atid=640804# |
22nd August | 22nd August | ||
Line 137: | Line 138: | ||
Starting working on the improving on the simulate command, adding new parameters | Starting working on the improving on the simulate command, adding new parameters | ||
− | (new forces to be taken into consideration). | + | (new forces to be taken into consideration). http://paste.ubuntu.com/1165086/ |
+ | |||
25th-26th August | 25th-26th August | ||
Line 150: | Line 152: | ||
28th-29th August | 28th-29th August | ||
− | Working on the joint command, trying to get it ported by following some of the other get_*() commands, so far did this | + | Working on the joint command, trying to get it ported by following some of the other get_*() commands, so far did this http://paste.ubuntu.com/1175850/ , but getting some errors http://paste.ubuntu.com/1175838/. |
30th August | 30th August | ||
This is what the /libged/joint.c command looks like so far: | This is what the /libged/joint.c command looks like so far: | ||
− | *- header file : | + | *- header file : joints.h http://paste.ubuntu.com/1177572/ <br> |
− | *- joint.c : | + | *- joint.c : http://paste.ubuntu.com/1177574/ <br> |
I am having some problems with the debugging of the command, the mged tool exiting altogether when I try to run "joint help" from the /libged/joint.c file. Somehow an "_exit_group" syscall gets called. | I am having some problems with the debugging of the command, the mged tool exiting altogether when I try to run "joint help" from the /libged/joint.c file. Somehow an "_exit_group" syscall gets called. | ||
Line 163: | Line 165: | ||
At Sean's suggestion I deleted the whole libged/joint.c file and started with a blank ged_joint() function that only printed a message, this was done in order to grasp the way the function calls actually works. | At Sean's suggestion I deleted the whole libged/joint.c file and started with a blank ged_joint() function that only printed a message, this was done in order to grasp the way the function calls actually works. | ||
Here are the files : <br> | Here are the files : <br> | ||
− | * header file : | + | * header file : paste.ubuntu.com/1178930/ |
− | * joint.c file : | + | * joint.c file : paste.ubuntu.com/1178931/ <br> |
The libged/joint.c file has been modified so that the ged_joint() function will print the same output as the f_joint() function from /mged/animedit.c file. When the joint command doesn't receive enough arguments, we are assuming the user needs help with it so a table with all the joint command's arguments it's printed. <br> | The libged/joint.c file has been modified so that the ged_joint() function will print the same output as the f_joint() function from /mged/animedit.c file. When the joint command doesn't receive enough arguments, we are assuming the user needs help with it so a table with all the joint command's arguments it's printed. <br> | ||
− | Source file joint.c : | + | Source file joint.c : http://paste.ubuntu.com/1180961/ |
3rd-4th September | 3rd-4th September | ||
The libged/joint command is almost done, the files can be found here : | The libged/joint command is almost done, the files can be found here : | ||
− | * | + | * heder : http://paste.ubuntu.com/1186753/ |
− | * joint.c file : | + | * joint.c file : http://paste.ubuntu.com/1186752/ |
− | * columns.c file in libged library (needed for printing): | + | * columns.c file in libged library (needed for printing): paste.ubuntu.com/1186754/ |
5th September | 5th September | ||
Line 180: | Line 182: | ||
The help and debug options for the new joint command are tested and have the same behaviour as the ones from the old joint command (mged/animedit.c). | The help and debug options for the new joint command are tested and have the same behaviour as the ones from the old joint command (mged/animedit.c). | ||
Here are the source files so far: | Here are the source files so far: | ||
− | * joint.h : | + | * joint.h : http://paste.ubuntu.com/1188767/ |
− | * joint.c : | + | * joint.c : http://paste.ubuntu.com/1188765/ |
− | * and of course the columns.c file | + | * and of course the columns.c file http://paste.ubuntu.com/1188769/ |
6th September | 6th September | ||
Line 206: | Line 208: | ||
Added some *mpgs with the simulation and some gifs of the 2 scenes, one with the viewset the other one without it : | Added some *mpgs with the simulation and some gifs of the 2 scenes, one with the viewset the other one without it : | ||
− | * | + | * http://youtu.be/XS1wUnQ8q0M - with the viewset |
− | * | + | * http://youtu.be/f-04dvJ7iIQ - without the viewset |
* the gifs can be seen on the wiki page : http://brlcad.org/wiki/Mged_simulation | * the gifs can be seen on the wiki page : http://brlcad.org/wiki/Mged_simulation | ||
Line 220: | Line 222: | ||
Started working on improving the simulate command, founded additional problems, not sure yet where they are coming from : | Started working on improving the simulate command, founded additional problems, not sure yet where they are coming from : | ||
* the simulation for meter units takes way too many steps | * the simulation for meter units takes way too many steps | ||
− | * the cube falls through the plane and then comes back to the top(to the original position) and starts falling back to the ground, e.g for the same simulation as the one in Mged_Simulation on the wiki page, with the units set to meters I ran it for 5500 steps first time, the cube was pretty close to the ground, then I wanted to see how closer can I get it, and I ran it for another 800 steps and the cube ended being in this position | + | * the cube falls through the plane and then comes back to the top(to the original position) and starts falling back to the ground, e.g for the same simulation as the one in Mged_Simulation on the wiki page, with the units set to meters I ran it for 5500 steps first time, the cube was pretty close to the ground, then I wanted to see how closer can I get it, and I ran it for another 800 steps and the cube ended being in this position http://imageshack.us/a/img17/2627/simlw.png |
− | * simulating for 300 steps doesn't really give any real movement to the cube, this is wrong it should take less steps for the cube to have a real change in its position | + | * simulating for 300 steps doesn't really give any real movement to the cube, this is wrong it should take less steps for the cube to have a real change in its position http://imageshack.us/a/img839/2403/sim2g.png |
* the velocities are not correctly passed from the bullet, where they are being calculated back to the cube, where they should be updated after every step | * the velocities are not correctly passed from the bullet, where they are being calculated back to the cube, where they should be updated after every step | ||
* the mass is calculated wrong, it is way too big for a cube, and it gets updated every step, mass should be a constant, for the moment it has been hard-codded to 1kg, that should change | * the mass is calculated wrong, it is way too big for a cube, and it gets updated every step, mass should be a constant, for the moment it has been hard-codded to 1kg, that should change | ||
− | * The cube dimensions are not passed correctly to the bullet and back, after hard-codding those as well there is still a problem, the simulation looks like this | + | * The cube dimensions are not passed correctly to the bullet and back, after hard-codding those as well there is still a problem, the simulation looks like this http://imageshack.us/a/img20/4735/test2r.png with an output for the velocities, cube dimensions like this one http://paste.ubuntu.com/1221285/ |
* There is also a problem with a variable 'size' shadowing another variable from bullet, so basically I can't add or remove any bu_vls_printf, bu_log lines to the existing code in /src/libged/simulate/simphysics.c | * There is also a problem with a variable 'size' shadowing another variable from bullet, so basically I can't add or remove any bu_vls_printf, bu_log lines to the existing code in /src/libged/simulate/simphysics.c | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
====Expected result==== | ====Expected result==== | ||
The expected result is to allow the user to apply different forces to arbitrary objects and be able to simulate as accurate as possible the real world physics. The forces will be applied using an Archer GUI command and the user will be able to visualize the transformations the object is suffering in real time. Adding these facilities to the BRL-CAD program it will give the user the possibility to simulate a real world physics through the software. | The expected result is to allow the user to apply different forces to arbitrary objects and be able to simulate as accurate as possible the real world physics. The forces will be applied using an Archer GUI command and the user will be able to visualize the transformations the object is suffering in real time. Adding these facilities to the BRL-CAD program it will give the user the possibility to simulate a real world physics through the software. |