Gianni,
I am a bit confused. Assuming you are talking about the function chrono::utils::AddBoxContainer, note that this functions does *not* create a body but rather just attaches collision (and optionally visualization) geometry to an existing body. As such, what is relevant here is the rotation of the body (which you must have created prior to invoking AddBoxContainer). If you have specified a non-identity frame (transform) for the box container relative to the parent body, you will then need to concatenate the two rotations.
I cannot help with your question about the “disassembled” container, since I have no idea how/what you save to that CSV file, nor do I know how you try to reconstruct the container from data read from that file.
Finally, the dimensions passed to AddBoxContainer represent the *interior* size of the container. That is clearly indicated in the documentation (also, you can always look at the implementation).
--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/7e241951-99b3-4995-8cbc-cf42f432bca0n%40googlegroups.com.







Gianni,
I’m answering both questions in the same place.
--Radu
From: projec...@googlegroups.com <projec...@googlegroups.com>
On Behalf Of Gianni Curti
Sent: Tuesday, August 6, 2024 1:20 AM
To: ProjectChrono <projec...@googlegroups.com>
Subject: Re: [chrono] Retrieving the rotation of a box container in Multicore
2. The two images below help to clarify what I mean by "disassembled":
Before:
After:

The procedure I am following is the one reported in the demo "demo_MCORE_cratering".
In particular, here I save all the objects I created:

The, with these commands I read the csv file:

The only solution I found up to now is to manually cancel the corrupted objects from the csv file and create them again in the new simulation, but this is unpractical when dealing with more complex cases.
Please, let me know if you need any other information. Thank you again.
Gianni
Il giorno martedì 6 agosto 2024 alle 01:19:14 UTC+2 Gianni Curti ha scritto:
Hi Radu,
thank you so much for your kindness and patience.
I am answering to the two points in different messages as when I try to combine them in a single one the post gets cancelled.
1. Below, you can find the code in which I create the ChBody "lander", and then I apply the box shape through the function chrono::utils::AddBoxContainer as you said. As you can see, my reference system has the axes oriented as the global one, while I applied a translation to the center.
This code is contained within a function called "CreateLander" which is used in the main. Then, I try to retrieve the body as follows:
Finally, I use "GetRot" to obtain the queternion but the result is [-nan(ind) -nan(ind) -nan(ind) -nan(ind)].
On the other hand, the object "link_actuator" works perfectly as expected.
--
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/6a21c3de-3760-48d5-9658-feb2078ced43n%40googlegroups.com.