IRC log for #brlcad on 20120922

05:12.12*** join/#brlcad milamber (~devlin@d118-75-244-176.try.wideopenwest.com)
05:35.58*** join/#brlcad elf_ (~elf@92.80.3.25)
10:34.43CIA-68BRL-CAD: 03MelinaoewoywpoqcLegge 07http://brlcad.org * r4443 10/wiki/Dog_Collars_-_What_You_Need_To_Know: New page: What's The Best Type Of Dog Collar? Getting the right dog collar for your dog is one of the most important things you can do for your dog. Your dog will probably spend most of it's life w...
10:53.50*** join/#brlcad yiyus (~124271242@je.je.je)
12:36.11*** join/#brlcad abhi2011 (~chatzilla@117.200.92.29)
12:41.45abhi2011hey elf_
12:56.42abhi2011darn I forgot how to setup cmake for compiling with visual studio
12:57.28abhi2011I think for the simulate command, the path to the bullet library has to be mentioned for the FindBullet.cmake script to find it
13:01.31abhi2011ah the readme is there
13:50.55*** join/#brlcad louipc (~louipc@archlinux/fellow/louipc)
15:55.15*** join/#brlcad KimK (~Kim__@wsip-184-176-200-171.ks.ks.cox.net)
16:30.57*** join/#brlcad abhi2011 (~chatzilla@117.200.86.91)
16:38.35abhi2011elf_, I am building brlcad now
16:38.38abhi2011in windows :P
16:38.46abhi2011will test out with your g file after that
16:39.21elf_Oh hello abhi, I see didn't try it in windows, I am using linux :)
16:41.21abhi2011ok
16:41.43abhi2011so it takes 1000 steps for the cube to fall to the ground ?
16:42.09abhi2011if thats so then maybe for now, we can drop the cube closer to the ground
16:42.54abhi2011I generally dump the output at every step, the lesser the number of steps thats output, the easier it is to track down whats wrong
16:43.01elf_Hmm no, the cube is at 50m above the ground, in that g file, it takes 190steps to move the cube 50mm, so to move the cube 50m it will take 190*1000 roughly
16:43.35elf_1k steps moves the cube just a little bit in that simulation
16:43.48elf_and for 10k steps the simulation gets aborted
16:44.04abhi2011hmm, it should not be that way, if gravity is acting on the cube, it should accelerate faster
16:44.52elf_I know
16:45.44abhi2011ok, we need to verify some more basic things first
16:45.55abhi2011I think what we can do as a test for whether the simulation logic of bullet itself is still working correctly, we can just drop a cube and print its position in mged
16:46.40elf_From the last cube simulation I did it looked like the collision point was in the middle of the cube
16:46.41abhi2011so lets try to do that first, i.e. comment out everything in ...
16:46.43abhi2011let me check
16:46.44elf_that it's not right
16:47.32abhi2011yeah thats because the overlap detection logic is not working correctly
16:47.50abhi2011i had put it in much later but its not tested out yet
16:48.37elf_I see
16:48.51abhi2011so in simphysics.cpp , run_simulation(struct simulation_params *sp)
16:50.25abhi2011I think we can replace it with the code in http://bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World
16:50.41abhi2011to test whether bullet is working as it should
16:51.18elf_okay will try it
16:51.39abhi2011there is a loop in which the physics is stepped towards the bottom of the page
16:51.48abhi2011that loop should also be there
16:52.15elf_the whole source is at the bottom of the page
16:52.31abhi2011cool :)
16:52.43abhi2011just plop it in
16:53.28elf_yeah
17:01.05abhi2011I notice I had set gravity along -ve z
17:01.28elf_yeah you put it -10
17:02.24abhi2011any luck with the hello world thingy
17:03.19elf_It compiled just fine, I tried it on the same g file I send to you but just gets blocked
17:03.39abhi2011in the loop ?
17:03.55abhi2011try adding prints above it
17:05.58elf_Okay so the thing is, it gets the output it is supposed to get from the tutorial for 1 step, 2 steps then when I try with 10 steps it blocks
17:06.24elf_mged freezes so I have to kill the process
17:07.46abhi2011thats wierd
17:08.06elf_very since it works fine for all the numbers lower than 10 O.O
17:08.40abhi2011so you change the number of steps in the for loop statement right ?
17:08.46abhi2011for (int i=0 ; i<300 ; i++) {
17:08.58abhi2011you change it to : for (int i=0 ; i<10 ; i++) {     ?
17:10.28abhi2011there is one other possibility, I think the simulation may be completing, but since the right data is not returned out if the function, so mged freezes
17:10.30elf_not there, it's from somewhere else, I put there 10 indeed, but when I run simulate I run it as "simulate 1/2/3../10" for all of them works for 10 it doesn't
17:11.17abhi2011oh ok
17:11.52abhi2011the value of 10 is put into sim_params->duration argument
17:12.43abhi2011so your loops is something like :  for (int i=0 ; i< sim_params->duration ; i++) {     ?
17:13.26elf_yes
17:13.50abhi2011ok, whats happens if you hardcode the number of steps in the function
17:14.01abhi2011so hardcode to 300 in the loop limit
17:14.11abhi2011then run with simulate 1
17:14.35abhi2011it will still execute 300 steps , because its hardcoded, it will ignore 1
17:14.45abhi2011do you then get the output for 300 steps ?
17:15.53elf_yes it gets the output for 300 steps
17:16.15abhi2011ok, and I assume it matches the hello world output
17:16.57elf_it does, it's like the one they said it should be
17:17.41abhi2011right, so thats good
17:19.04abhi2011what the output if you replace dynamicsWorld->stepSimulation(1/60.f,10);
17:19.13abhi2011with  step_physics(dynamicsWorld);
17:20.01abhi2011its rater hilarious, whats happening actually
17:20.16elf_why so?
17:20.25abhi2011but lets see if you get the right output after replacing it
17:21.23elf_I get a seg fault
17:22.00abhi2011oh just comment out the 1st bu_vls_printf() line
17:22.09abhi2011in step_physics()
17:22.30abhi2011its prolly 'cause of the sim_params structure
17:22.50abhi2011in fact comment out all 3
17:23.03abhi2011and replace with your own print statements
17:23.40abhi2011those statements I had put in to mark the beginning and end of each step
17:23.55abhi2011so the output from each step is clearly separated in the log
17:24.01abhi2011and I can go through it easier
17:26.26abhi2011any luck ?
17:26.39elf_it's good
17:26.44elf_same output as before
17:27.04abhi2011ok, so the step_physics() is supposed to be called at every step
17:27.33abhi2011that means that there need to be a loop in the run_simulation()
17:28.47elf_yeah, right now it the for (int i=0 ; i< 300 ; i++) { } loop
17:29.00abhi2011exactly
17:30.02abhi2011for some reason we had decided last year, that we would add objects to the bullet dynamics world, do 1 step of simulation, then get the transforms into the sim_params structure, then clear out everything and repeat
17:30.29abhi2011that is why you see a for loop in line 503
17:30.37abhi2011but its commented out !
17:31.03abhi2011my fault, i think that was for debugging something !
17:31.07elf_yes wanted to ask you about those commented lines
17:31.30abhi2011so simulate has actually been executing just 1 step :P
17:31.38abhi2011not 100k
17:32.22elf_well it never really got to be executed 100k, but I see your point
17:32.23abhi2011the basic way in which the simulate command works now is to load everything that need to be simulated into sim_params structure
17:32.37abhi2011pass it to run_simulation()
17:33.02abhi2011there cram the shapes from sim_params into the bullet dynamics world
17:33.09abhi2011run the required number of steps
17:33.22abhi2011grab the transforms at the end of each step from bullet
17:33.27abhi2011and put into sim_params
17:33.58abhi2011only the last step's transforms actually remain after the simulation
17:34.12*** join/#brlcad stas (~stas@host-static-92-115-48-61.moldtelecom.md)
17:34.14abhi2011the sim_params structure is then accessed back in libged
17:34.33abhi2011to read the transforms and update the shapes in mged
17:35.26abhi2011there are several improvements to this but I had done it this particularly inefficient way to debug the contact point generation algorithm which is what I was working on last
17:35.31elf_it makes sense, you are interested in the initial position of the geometry when you start your simulation, you don't want to save all the intermediate steps your geometry finds itself during the simulation
17:35.44elf_only the final state, you save it and then pass it to libged
17:35.44abhi2011thats right
17:36.19abhi2011also, I don think there is a need to recreate the simulation world each time and add the objects back
17:36.33abhi2011but that can be corrected anytime
17:36.38elf_what do you mean?
17:36.50abhi2011so if you see the comented out for loop
17:37.03abhi2011it includes the creations and deletion fo the bullet dynamics worls
17:37.06abhi2011*world
17:37.14abhi2011btDiscreteDynamicsWorld* dynamicsWorld;
17:37.15elf_yeah that must be done outside
17:37.22abhi2011yes
17:37.25elf_no need for it to be done everytime
17:37.29abhi2011it probably was outside
17:37.40abhi2011I may have moved it in to debug a single step
17:37.42abhi2011anyway
17:37.48abhi2011what you can do right now
17:37.59abhi2011is remove the comments
17:38.11abhi2011move the world creation stuff out of the loop
17:38.20abhi2011so we are only stepping inside the loop
17:38.23abhi2011and doing nothing else
17:38.37abhi2011then use the get_transforms() after the loop body
17:38.45abhi2011to get back te transforms into sim_params
17:38.55elf_hmm sounds good
17:38.57abhi2011and see if things move  a bit faster in mged
17:38.58elf_let me try it
17:39.03abhi2011:P
17:39.44abhi2011the cleanup() should be kept
17:39.53abhi2011after get_transforms()
17:45.09elf_damn I get a weird warning, that I didn't get before...
17:45.51abhi2011which is ?
17:45.56elf_the size variable is being shadowed O.O
17:45.57elf_/usr/local/include/bullet/LinearMath/btSerializer.h:538:36:   instantiated from here
17:45.57elf_/usr/local/include/bullet/LinearMath/btAlignedObjectArray.h:102:27: warning: declaration of ‘size’ shadows a member of 'this' [-Wshadow]
17:45.58elf_/usr/local/include/bullet/LinearMath/btAlignedObjectArray.h: In member function ‘void* btAlignedObjectArray<T>::allocate(int) [with T = const char*]’:
17:45.58elf_/usr/local/include/bullet/LinearMath/btAlignedObjectArray.h:287:31:   instantiated from ‘void btAlignedObjectArray<T>::reserve(int) [with T = const char*]’
17:46.14abhi2011thats in bullet
17:46.16abhi2011hmm
17:46.46abhi2011lt me check that line
17:46.54abhi2011name collision maybe
17:47.53*** join/#brlcad merzo (~merzo@201-246-92-178.pool.ukrtel.net)
17:48.48elf_it was my fault
17:49.19elf_forgot when I modified step_physics I modified the way the output it was displayed
17:49.29abhi2011ok
17:54.22elf_not good, not good at all, now it gets aborted if I run simulate > 100 which is not good
17:54.50abhi2011whats happens for < 100 ?
17:56.22elf_it ran its course
17:56.26elf_so it worked
17:56.36elf_but trying with more than 100 it's not working
17:56.40abhi2011did the shapes get updated in mged ?
17:57.40elf_it did
17:59.07abhi2011ok is the movement significant
17:59.12abhi2011or still very small ?
18:00.27abhi2011hmm I see in simulate.c that I do have a loop
18:00.34elf_okay so I think the cube it actually falls out of the simulation for more than 120 or so steps
18:00.42abhi2011which calls run_simulation()
18:01.02abhi2011that should not happen
18:01.06elf_let me try something I have to recreate the .g files cause the db gets corrupt after the cube falls into the ground
18:01.21elf_and the movement is significant
18:01.40abhi2011ok and I also see that there is a loop in simulate.c
18:01.53abhi2011thats calls run_simulation
18:02.09abhi2011you can comment out that loop for now
18:02.26abhi2011thats causing the huge number of steps
18:02.58abhi2011if you see in simulate.c 431
18:03.13abhi2011there is a loop there already
18:03.30abhi2011just comment out that loop for now
18:13.15elf_The loop on line 431 in simulate.c it's actually the one that simulates things, it can't be commented out
18:13.34elf_get_bb: Got the BB for "sim_gp.r" as min {-15000.000000 -15000.000000 -1000.000000} max {15000.000000 15000.000000 1000.000000}
18:13.35elf_get_bb: Dimensions of this BB : 30000.000000 30000.000000 2000.000000
18:13.35elf_get_bb: Got the BB for "sim_cube.r" as min {-1000.000000 -1000.000000 49000.000000} max {1000.000000 1000.000000 51000.000000}
18:13.35elf_get_bb: Dimensions of this BB : 2000.000000 2000.000000 2000.000000
18:13.49elf_That's the output I get with the whole loop commented out
18:14.02elf_and the position is not actually modified
18:14.24elf_for simulate 80
18:15.58abhi2011yeah, what I meant is either the loop in simulate.c is kept or the one in simphysics.cpp
18:17.05abhi2011if both are kept, then the number of steps executed is more than
18:17.22abhi2011its =  sim_params->duration * sim_params->duration
18:17.30abhi2011which is not what we want
18:17.47elf_yeah, the one in simphysics.cpp has to go then
18:17.55abhi2011yep :P
18:18.01abhi2011sorry to mislead you on that one
18:18.14abhi2011I had forgotten there was a loop in simulate.c
18:18.25elf_so we are basically to the beginning, cause if the loop in symphisics.cpp go then nothing changed
18:19.12abhi2011yep, but we know now that the simulation does work
18:19.53abhi2011the difference in having the loop in simulate rather than in simphysics.cpp
18:20.03abhi2011is that by having the loop in smulate.c
18:20.28abhi2011the entire bullet world is recreated each time
18:20.57abhi2011but that should not cause the cube to fall slower
18:21.09abhi2011because the velocity information gained from the last step
18:21.30abhi2011is put into the cube in the current step before being stepped
18:22.03elf_well I am running right now the simulate command on the database I sent to you, and the steps are tiny again for the m units
18:22.22elf_I am waiting to see if it aborts for the 10k steps simulate
18:22.50abhi2011I think the reason the steps are tiny is because
18:22.58abhi2011the linear velocity gained in the last sim step
18:23.10abhi2011is not being set in the beginning of the next step
18:23.34abhi2011this has to be done manually, because now we are recreating the bullet world at each step
18:23.40abhi2011and re-adding the rigid bodies
18:23.47elf_hmm but if that were the case then wouldn't the same thing happen for mm too?
18:24.02abhi2011mm ?
18:24.36elf_milimeters
18:24.49elf_and I am simulating for meters now
18:25.33elf_In the mm geometry there wasn't such a problem as the linear velocity not being set for the next step
18:25.54elf_or maybe the units are way too small to observe the difference
18:25.58abhi2011yes
18:26.04elf_and the simulation aborted for 10k
18:26.11elf_trying a lower number
18:26.14abhi2011bullet uses a 0.04 meters as the collision margin
18:26.22abhi2011its cant simulate for less then that
18:26.59abhi2011I dont think testing with mm will work at the moment
18:27.14abhi2011I didnt even know the units could be changed at all :P
18:27.24abhi2011bullet uses only meters
18:27.34elf_well the distance between the ground plane and the cube in the mm sim was 50mm so about 0.05m
18:27.45abhi2011yep
18:27.51elf_the default it's mm, at least in the build I got
18:27.53abhi2011thats the collision margin
18:27.59abhi2011ok
18:28.20abhi2011yeah mged can show objects in the mm range
18:28.34abhi2011but bullet does not simulate at those low dimensions
18:29.05elf_I see
18:29.24elf_so the mm simulation it's kinda compromised then, meaning the results from there are not conclusive
18:29.25abhi2011in fact that bulet uses a 0.04 m collision margin, it would be best to work with objects significantly bigger
18:29.36abhi2011I dont think so
18:29.51abhi2011*in fact since
18:30.08abhi2011lets fix the unit as meters for now
18:31.00abhi2011if required bullet can be compiled with double precision and may work with smaller units
18:31.10abhi2011but thats for later
18:31.48elf_okay so I ran the simulation for 5500 steps and the cube was pretty close to the ground
18:32.08abhi2011did it fall at all ?
18:32.10elf_then I wanted to see how much closer can I get it so I ran it for another 800 steps
18:33.01elf_the cube went back to the top and started falling again to the ground
18:34.37elf_like this
18:34.39elf_http://imageshack.us/a/img17/2627/simlw.png
18:35.08elf_see the doubling of the cube up there
18:35.24elf_the original cube the one above and the cube that's falling again to the ground
18:35.40elf_at least now I know where it goes when I think it "disappears"
18:36.23abhi2011ok
18:36.41abhi2011isnt there any movement when run for 300 steps
18:36.49abhi2011or less ?
18:37.40elf_I am doing that right now, running it for 5800 steps
18:37.49abhi2011no i mean
18:37.52abhi2011simulate 300
18:38.03elf_just 300?
18:38.28abhi2011yes
18:40.00elf_this is it
18:40.00elf_http://imageshack.us/a/img839/2403/sim2g.png
18:40.08elf_no big change for the cube position
18:40.41abhi2011hmm that definitely should not happen
18:41.04abhi2011300 steps is enough steps to see a large change in the position
18:41.47elf_I know but still nothing major happens
18:42.07abhi2011ok lets try fixing this first
18:42.13abhi2011lets print out the position of the cube
18:42.46abhi2011so in get_transforms()
18:42.54abhi2011in simphysics.cpp
18:43.09abhi2011thats the function which get the transform from bullet
18:43.29abhi2011and puts it into a struct rigid_body
18:44.21elf_okay, so I should be printing the BB position in 3D space, right?
18:44.25abhi2011sim_params has a linked list of struct rigid body nodes
18:44.28abhi2011yes
18:45.10elf_the current_node->btbb_center,current_node->btbb_min and current_node->btbb_dims, right?
18:45.36abhi2011print aabbMin
18:45.40abhi2011thats directly from bullet
18:47.10abhi2011also comment out line 522
18:47.17abhi2011in simphysics.cpp
18:47.36abhi2011that will take the custom algorithm for cube-cube collisions out of the icture
18:48.49abhi2011also comment out lines
18:49.01abhi2011537 to 546
18:49.30elf_the overlap filter callback?
18:49.39abhi2011yes
18:49.54abhi2011right upto  gContactDestroyedCallback = contact_destroyed;
18:50.53elf_about the custom algorithm it is there for when bullet it's not found?
18:51.08abhi2011so now we are using the default bullet algorithms for everything and have registered no callbacks
18:51.10abhi2011no its for
18:51.20abhi2011using ray tracing to detect overlaps
18:51.26abhi2011between arbitrary shapes
18:51.31abhi2011its based on librt
18:52.00abhi2011but we do not need it right now, since the default bullet algos. should also work to move the cube
18:52.16abhi2011if the cube is still too slow then we try printing the cube position
18:52.44abhi2011if the cube position is changing but mged is not getting updated then there also it may appear that the cube is not moving
18:52.58abhi2011that means there is a problem mapping the cube's position into the shape in mged
18:53.31abhi2011so we need to go step by step to figure out where the "apparent" slow down is happening
18:53.46abhi2011one thing is certain
18:53.56abhi2011the cube must fall much faster
18:54.21abhi2011and it will collide too, since we are now using bullet's own algos
18:55.24elf_I get the shadowing error again
18:56.53elf_http://paste.ubuntu.com/1221104/
18:59.34abhi2011revert your commented out lines and try to find out which line being commented out cause the error
19:00.19elf_I am on it
19:03.46abhi2011hmm, getting some errors in the windows build
19:03.55elf_like?
19:03.58abhi2011lets hope I can get it fixed
19:04.04abhi2011got to do with some path not found
19:07.36abhi2011http://paste.ubuntu.com/1221121/
19:07.44abhi201152k lines of logs :P
19:08.39*** join/#brlcad elf (~elf@213.233.85.6)
19:08.58elfgrrr blackout so I only have batery for one hour or so left
19:09.52*** join/#brlcad elf_ (~elf@213.233.85.6)
19:10.20abhi2011ok, I ll continue working on it, its probably something silly since the entire set of calls has worked before
19:11.26elf_prolly I am doing definitely something wrong over here since I backed up my comments and now I get all kind of weird errors like not finding anything when I try to compile mged O.O
19:11.44abhi2011just revert you changed files
19:11.54abhi2011to the latest version
19:11.58abhi2011in svn
19:12.06abhi2011and start again
19:12.19abhi2011thats the safest and fastest way sometimes :P
19:12.43elf_yeah that's what I did just now
19:16.55abhi2011ok mged is runnig with bullet
19:17.01abhi2011so I can at least test
19:17.19elf_okay, I get the shadowing error because I added the bu_vls_printf command...
19:17.32abhi2011lets see if I can get a simple cube working again with no extra stuff
19:17.33elf_I don't understand why though?
19:17.36abhi2011ah great
19:17.56abhi2011check its source
19:18.18abhi2011if you are using eclipse, you press F3 :P
19:18.34elf_No, I don't use eclipse :)
19:19.45abhi2011hehe
19:20.10abhi2011bu.h then i think
19:20.23elf_yeah
19:20.48abhi2011in libboo
19:24.13elf_something's off since bu_vls_printf doesn't use any variable named size from what I can see
19:25.13abhi2011those build errors are while building the docs, so it should be ok
19:25.14abhi2011hmm
19:25.16abhi2011ok
19:25.22abhi2011you can try with printf for now then
19:26.49abhi2011hmm but I wonder why its happening though
19:27.00abhi2011i dont remember seeing that error before either
19:27.03elf_yeah printf will do for the moment
19:27.20elf_It's strange cause I get it at random times
19:27.25abhi2011vls i think is for variable length strings
19:27.36abhi2011it may be using size somewhere in there
19:28.56abhi2011bu_vls_printf() prints these strings as they are stored and maged differently from char[] i think
19:29.04abhi2011*managed
19:29.09elf_yeah and it uses a variable len
19:29.22elf_What I meant by getting it at random times
19:29.24elf_it's that
19:29.33elf_I commented line 522
19:29.34elf_I didn't get it
19:29.49elf_then I commented line 537 and I get it
19:30.06elf_if I comment the whole block 537 to 546 I get it
19:35.13*** join/#brlcad elf_ (~elf@213.233.85.6)
19:35.56abhi2011ok, it passed in windows :P
19:36.04elf_good :)
19:36.13abhi2011hey what was the command for drawing a comb
19:36.36abhi2011darn i need that shrtcut list
19:36.59elf_r to create a region
19:37.12elf_I used regions and c for combs
19:37.17elf_if I remmeber correctly
19:37.32elf_I still can't figure what's this thing problem is
19:37.57abhi2011draw sim.c
19:38.17abhi2011hmm, so there are other places where bu_vls_printf is used
19:38.23elf_I am taking out things from it, it shouldn't give me errors when I take something that was there and wasn't giving errors about shadowing variables
19:38.58abhi2011whats your gcc version by the way
19:39.14abhi2011it should not make a difference
19:39.18abhi2011but lets see
19:40.59abhi2011ah now I remember why we chose to recreate the bullet world and add shapes again every time
19:41.05elf_bu_log is used in those lines I want to get out
19:41.11abhi2011ok
19:41.14elf_and I have the 4.6.1 version of gcc
19:41.32elf_Why did you recreate the world every time?
19:41.57elf_and it should give me errors when I try to add stuff... not when I take out stuff that it's standalone in there...
19:42.46abhi2011yeah
19:42.48abhi2011hmm
19:43.45abhi2011so which line in that entire bunch of lines in simphysics.cpp
19:43.51abhi2011cause the error
19:44.36elf_starting with 537
19:44.53elf_I even commented out the whole broadphase_call function..
19:44.56elf_didn't work obv
19:46.54abhi2011ok so lets try to figure out if its the presence of bu_log in other functions or the other bu_vls_printf() for some reason
19:47.02CIA-68BRL-CAD: 03Sean 07http://brlcad.org * r0 10/wiki/Special:Log/delete: deleted "[[Dog Collars - What You Need To Know]]": spam
19:47.10CIA-68BRL-CAD: 03Sean 07http://brlcad.org * r0 10/wiki/Special:Log/block: blocked [[User:MelinaoewoywpoqcLegge]] with an expiry time of infinite (account creation disabled, e-mail blocked): Spamming links to external sites
19:47.33abhi2011so lets comment out all the bu_vls_printf() lines
19:47.40abhi2011and check
19:47.48abhi2011then bu_logs and check
19:48.13elf_in the whole simphysics, right?
19:48.29abhi2011yep
19:48.33abhi2011its a rute force way
19:48.42abhi2011*brute
19:50.01elf_I get the error here
19:51.45abhi2011even after removing all the bus ?
19:52.01elf_even after removing all of them
19:52.49abhi2011dont remember seeing that -W shadow flag before
19:52.54abhi2011thats the one causing it
19:53.03abhi2011will need to check with brlcad
19:53.21abhi2011ok, so meanwhile
19:53.29elf_where's the flag set?
19:53.40elf_Sean? Are you around?
19:53.44abhi2011it will be in one of the cmake files I think
19:54.02abhi2011the top level one
19:54.10abhi2011anyway
19:54.20abhi2011its a warning right ?
19:54.40abhi2011so you are able to finish the compile ?
19:54.47abhi2011oh but
19:54.53abhi2011warning are flaggged as errors
19:54.55elf_it's a warning but the warnings are errors
19:54.57elf_yeah
19:54.58elf_that
19:55.02abhi2011hmm
19:55.05abhi2011:P
19:55.30abhi2011so how about not commenting out the lines
19:55.37abhi2011but keeping the functions empty
19:55.45abhi2011or putting a return as the 1st line
19:56.10abhi2011till we fix this shadow warning
19:56.29abhi2011we can put returns in the functions that the commented out lines cause to be called
19:56.45abhi2011so revert again :P
19:57.01elf_done it already
19:57.07abhi2011right
19:57.11elf_and now the return statements
19:57.18elf_for broadphase_callback
19:57.43abhi2011ok, so at least line 522 is commented out right ?
19:58.02elf_yeah that one works
19:58.07abhi2011538 ?
19:58.30elf_nope bu_logs all over that one
20:00.08elf_I might run out of battery, no energy yet O.O
20:00.36abhi2011ad removing the bu_logs from lines 329 to 383 makes no difference ?
20:00.43abhi2011ok
20:01.53abhi2011I also see that the mass of the body is set to 80000000 kgs
20:01.55abhi2011in s3.g
20:01.57abhi2011:P
20:02.07abhi2011that will certainly stall the sim
20:02.14abhi2011lets see if I can hard code the mass for now
20:02.18elf_It's not set to that
20:02.21elf_I wanted to ask you about it actually
20:02.28abhi2011ok
20:02.31elf_the mass of the body modifies DURING the simulation
20:02.34elf_that's wrong
20:02.41abhi2011hmm
20:02.58elf_The mass it's the same, the forces applied should modify
20:03.02abhi2011I dont remember pulling the mass from the passed sim_params
20:03.08abhi2011but let me check
20:03.14elf_It gets passed wrong then
20:03.30abhi2011i think I was just setting it proportional to the aabb volume
20:03.40abhi2011till the other issues got fixed
20:03.54elf_Hmm
20:04.06elf_let me run it again and see something
20:04.12abhi2011line 146
20:04.25abhi2011I ll try printing out the cube position
20:04.34abhi2011maybe there is a mapping problem back to mged
20:07.06abhi2011hmm, the volume is being calculated incorrectly
20:07.20abhi2011<PROTECTED>
20:07.27elf_I see that in the simulation too
20:07.31abhi2011to see if the cube collides properly
20:07.46elf_I gt like 8000000000kg...
20:08.22abhi2011yeah thats wrong
20:08.33abhi2011i hardcoded it to 1 kg for now
20:10.20elf_The hardcoded version is not working
20:10.29elf_I did it too, put the mass to 1 kg
20:10.33elf_but the cube is not movibg
20:10.36elf_moving*
20:10.54abhi2011whats the position thats printed ?
20:10.58elf_the forces are not applied properly I think or something somewhere goes really wrong
20:11.03elf_the same as the previous one
20:11.46abhi2011whats the linear and angular velocities
20:11.51abhi2011try printing out those 2
20:12.44elf_do you have a getLinearVelocity function>
20:12.45elf_?
20:13.20abhi2011yes there is one like that
20:13.31abhi2011its  used in the get_transforms()
20:16.16elf_can't print them.. the bu_vls_printf is not working again
20:16.16elf_grrr
20:16.45abhi2011but printf does right ?
20:19.01elf_it doesn't print it
20:19.17elf_I don't think it ever gets on that else case unless when it sets the mass
20:20.33abhi2011hmm but the condition simple says that if the name of the object is not the same as the ground plane name
20:20.36abhi2011then goto else
20:20.57abhi2011print both current_node->rb_namep and sim_params->ground_plane_name
20:21.12abhi2011before the if{}
20:21.12elf_It doesn't print this though printf("LinearVelocity %f AngularVelocity %f\n", current_node->linear_velocity, current_node->angular_velocity);
20:21.34abhi2011ok, but it enters the else {} ?
20:21.53elf_The mass it
20:22.18elf_s always the same so the thing that modifies is the velocity
20:22.18elf_it
20:22.21elf_<PROTECTED>
20:23.44abhi2011hmm, if get_transforms() gets called and there is a print statement there
20:23.54abhi2011then it should print the velocity
20:24.22abhi2011can you trying adding a print statement
20:24.30elf_Okay the velocities are both 0
20:24.34abhi2011at the beginning of get_transforms()
20:24.34elf_So that's not good
20:24.43abhi2011so after 2 steps also
20:24.49abhi2011the velocity is 0 ?
20:25.44elf_http://paste.ubuntu.com/1221254/ there it doesn't move
20:25.53elf_The velocity is 0
20:25.53abhi2011ok
20:25.54elf_both of them
20:27.02abhi2011bbmin is really wierd
20:27.38abhi2011ok lets hardcode the dimensions too
20:27.51elf_BBmax is weird too since the cube position is -1 1 -1 1 49 51
20:27.52abhi2011that should be the last piece of info we are transferring
20:28.02abhi2011yeah its not getting transferred
20:28.06abhi2011correctly
20:28.07elf_nope
20:28.19abhi2011change line 102
20:28.39abhi2011make it new btBoxShape(btVector3(10, 10, 10));
20:29.28abhi2011also same change in line 108
20:29.46abhi2011current_node->bb_dims[*]/2 with 10.0f
20:29.52abhi2011or 10  watever
20:30.14abhi2011this is the dimension of the ground plane
20:30.30abhi2011it may not match what we have in mged
20:30.35abhi2011but that doesnt matter
20:30.59abhi2011we are going to test only whether positions get transferred correctly
20:32.28abhi2011then in line 138
20:32.50abhi2011this is the section for the dynamic bodies
20:33.02abhi2011make the dimensions 1,1,1
20:34.23abhi2011I ll pastebin the changes
20:37.57*** join/#brlcad elf (~elf@92.80.23.248)
20:38.59*** join/#brlcad elf_ (~elf@92.80.23.248)
20:39.08elf_damn sorry abhi, just send you an email but I got power back
20:39.31elf_so yeah back to that simphysics.cpp file
20:49.51elf_This thing is getting stranger by the moment imo...
20:50.19elf_here's what the simulation looks like after the changes, hard-codding the dimensions and the mass of the cube
20:50.20elf_http://imageshack.us/a/img20/4735/test2r.png
20:50.28elf_http://paste.ubuntu.com/1221285/
20:50.40elf_it was ran for 30 steps...
20:52.27elf_brlcad, do you have any opinion about this? O.o
23:31.49*** join/#brlcad KimK (~Kim__@wsip-184-176-200-171.ks.ks.cox.net)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.