Hi Hannah,
Sorry for the delay in getting back to you.
I personally do not use the SolidWorks plugin, but it seems to me that the first thing to do is figure out the issue you say you are having simply running demo_IRR_tracks. It sounds like that points to an underlying issue that may explain other problems you could have down the line.
You mention you are building the C++ code from sources. Could you please rebuild it in Debug mode, run that demo through the debugger and provide us with more information on the crash (start with a call trace at a minimum). Also, unless you have a strong reason not to, could you maybe switch to using the development version of Chrono (checkout the git branch 'develop')? The code is continuously evolving and there were already some significant changes since the 5.0 release back in February. It is much easier for us to help with the current code.
Finally, just for completeness, could you please indicate the compiler you use (I assume Visual Studio, but what version) as well as the version of Eigen you are using?
Best,
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/4632a1c2-4384-4de9-87ec-ddadb7007f1a%40googlegroups.com.
warning btCollisionDispatcher::needsCollision: static-static collision!
Assertion failed: ptIndex >= 0, file mypath\chrono\src\chrono\collision\bullet\BulletCollision\CollisionShapes\btConvexShape.cpp, line 108
To unsubscribe from this group and stop receiving emails from it, send an email to projec...@googlegroups.com.
Hi Hannah,
See my responses interspersed below in blue.
--Radu
Hi Radu,
Thanks for the response. Sorry for my delay, this is my first time using the Debug Configuration of Visual Studio.
I am using Visual Studio 2017-Version 15.8.22. (If I remember correctly I ran into some trouble building Chrono the first time with Visual Studio 2019, so I have been using 2017 ever since.) I am using Eigen 3.3.7.
This is quite odd. I have been using VS
2019 for quite a while now without any problems. Could you
please investigate this further and let me know what kind of
trouble you have with using VS 2019?
Just an update on the method that I mentioned in the follow-up post (importing everything from SolidWorks and using PSOR): if I use a high enough number of max solver iterations (1000+), the revolute joints between track shoes are not broken. However, the simulation is extremely slow and still has some unexpected behavior that I am trying to figure out. I mentioned that I was trying to create collision objects so that the track links could be physically linked together, but I ended up removing this and suppressing all collisions between track shoes using a collision family to reduce the necessary computations. I also mentioned not being able to create a collision object that was a hollow cylinder so that a pin could fit in it. I ended up being able to do this by creating a cylinder, assigning it as a collision shape, and then adding the hole after the fact. I doubt that this is a recommended strategy and like I said, I deleted all of these anyways to speed things up.
Depending on how your collision shapes are defined (size and location) it is indeed important to ignore collisions between adjacent track shoes. Using collision families is one way of doing that. But you may want to revisit this and make sure that collision shapes from adjacent track show do not in fact overlap. You can look at how that is done in Chrono::Vehicle (but be warned that this is going down in the guts of the code and is a bit more complicated to understand).
I am not quite sure I understand what you
mean by "adding the hole after the fact". Could you please
elaborate? Also, where/why do you need this type of
interaction? There may be simpler ways to deal with this (e.g.
performing your own custom collision detection)
Per your suggestion, I downloaded and built Chrono from the Develop branch. I didn't see a difference in performance for my code so I went about just trying to figure out why demo_IRR_tracks wasn't working using Debug Configuration as you recommended.
I finally figured out what the issue was with this particular demo: a low-level issue with the convex decomposition algorithm used when a non-convex mesh is set as collision shape. I introduced this bug a while ago when I had to obsolete one of the options we had for convex decomposition. For some reason, I missed the ensuing problem with demo_IRR_tracks.
I pushed a fix; please pull the latest code in the develop branch.
Having said that, I recommend you consider
simpler collision shapes (as much as possible) in your own
models. In particular, collision models for track shoes can
easily be constructed from primitive shapes (boxes, cylinders,
maybe convex hulls is really needed). That will give you more
robust and performant code.
For anyone else new to Visual Studio Debugging, here are some of the things I learned:The first issue I ran into using Debug config was an error message that said "Unable to start program 'path\ALL_BUILD'. Access is denied" when I tried to run the debugger. This was an easy fix, I just had to right click on myexe and click Set as StartUp Project. The next issue I ran into was that the symbols weren't being loaded for ChronoEngine, ChronoEngine_irrlicht, and Irrlicht. This manifested itself in the form of a "Unhandled exception at location :Microsoft C++ exception: std::length_error at memory location" early in the code (i.e. I knew this line wasn't an actual issue because the code had run past this point in Release config). The issue was that the variable "my_system" wasn't being created correctly (because the Chrono symbols weren't loaded) so when the code tried to use "my_system", it raised this error. Even though the.dlls files I needed seem to be copied into my Debug folder, these files did not work as is, even if I manually selected the corresponding .pdb files from the module window. I saw here (http://api.projectchrono.org/tutorial_install_project.html) and elsewhere that I have to copy the .dll files myself. I copied the .dlls for these three from chrono_build/bin/Debug and replaced the ones that had been created in this project's Debug folder. It took me a while to realize that these .dll files were being overwritten whenever I rebuilt my solution. So I had to copy them over after rebuilding but before running the debugger.
This is indeed what needs to be done in
order to debug an external project that depends on Chrono (and
be able to step through the Chrono code). Unfortunately, we
couldn't come up with a simpler workflow for this.
Having said that, for this particular case
(where you wanted to debug one of the Chrono demos, and not your
own project), you could have used the debugger on the Chrono
solution. No need for copying DLLs in that case.
Thanks,
Radu
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/2ac3712b-4a16-45b7-9de2-e530233044a6o%40googlegroups.com.