Closed kneave closed 2 years ago
Hi @kneave ! we didn't add a rigidbody by default, because links in URDF can also come without `inertial' tag. By adding a rigidbody manually, users can add the inerial tag. It is correct that joints require rigidbodies in both parent and child link.
Hi Martin, this is from creating a new model completely in Unity so no URDF imported in this case. If it's expected behaviour that the user adds a rigid body could I suggest the video demo be updated to show this please or it be included in a the documentation?
Hi @kneave , I digged a bit deeper into this issue. We changed the functionality in commit https://github.com/siemens/ros-sharp/commit/f15f3f9eeec0d46b7dbb3dfbc4364eeef8e7fbe8 to not automatically generate rigidbodies in this case.
The problem is that URDF does not require <inertial>
tags (i.e. rigidbody data) whereas Unity requires rigidbodies to create joints between transforms (i.e. links). We had discussions whether to create a default rigidbody to a new/empty link or not since the beginning and didn't find a clear answer yet.
In pull request #405 I changed it back, such that creating a new link in Unity also creates a rigidbody / default inertial data. It seems like this is the more convenient / user friendly solution. Would you please test if it works for you?
I just pulled that branch and it looks like it works as I'd expect from the demo video, thanks for the quick update! Good call with the Newtonsoft.Json fix too. :)
Merged in https://github.com/siemens/ros-sharp/commit/6e91309b2447c0919d3dabaa0650bb71e3e490dd . Thank you @kneave .
I have a question!
Here is my question:
Following the "create a new URDF" tutorial I found that none of the new links had joints created. In the video no extra steps were needed for this but I found I needed to manually add a rigidbody to the base_link in order for joints to be created in the manner shown in the video. I couldn't find reference to adding the rigidbody in the wiki or previous issues. Is this change by design or a regression of some kind?
I found a bug!
[X] I am using the latest ROS# version available here on the master branch.
[X] I am adding all required information, code and data files, screenshots and log files so that you can reproduce the problem.
My OS is: Windows 11, dev preview
My Unity Version is: 2020.3.11f1
My ROS Distribution is: N/A
My Build Target Platform is: N/A
Here is my bug description:
Creating a new URDF doesn't include a rigidbody on the base_link, this prevents joints being created.
Perform the following steps reproduce the bug:
Observed results:
Base_link on a new model with no rigidbody![image](https://user-images.githubusercontent.com/733411/127492521-2cb38698-ed51-405e-ab5f-2b127667220b.png)
Newly created child link, no joint component![image](https://user-images.githubusercontent.com/733411/127492706-5fd96888-d1ef-459c-811c-043f4072ef06.png)
Expected results:
Base_link with rigidbody![image](https://user-images.githubusercontent.com/733411/127492787-1f469ca3-5510-4660-9344-24a27cea1ea5.png)
New children have joints![image](https://user-images.githubusercontent.com/733411/127492853-1c85ea3c-d708-4180-b0dd-900a6c438c4f.png)