Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolem visuals fix #875

Closed
wants to merge 2 commits into from
Closed

Absolem visuals fix #875

wants to merge 2 commits into from

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Apr 1, 2021

Follow on to #852 where I change SDF to use version 1.6.

peci1 and others added 2 commits April 1, 2021 12:56
* Absolem: Sync Xacro: Trivial numeric representation changes.

* Absolem: Sync Xacro: Whitespace only changes.

* Absolem: Sync Xacro: 1e-5 changes.

* Absolem: Sync Xacro: Rotation switched to the opposite direction, but it doesn't matter as it only rotates a symmetrical cube visual.

* Absolem: Sync Xacro: Switch to SDF 1.7 <pose relative_to="">.

No geometrical change (verified visually).

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Swap <parent> and <child> tag order.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Move joint SDF above link.

* Absolem: Sync Xacro: Change IMU and friction parameters in Xacro to correspond to the desired values in SDF.

* Absolem: Sync Xacro: Fixed SDF 1.7 <sensor><pose> wrong lumping.

After this commit, the model.sdf can be exactly recreated by the update_robot_sdf script.

Until gazebosim/sdformat#525 gets merged, `ign sdf -p` does not account for the reduced joint transform when outputting sensors attached to lumped frames. But it copies `<sensor><pose>` verbatim, so I took the old values from SDF and put them temporarily in `<sensor><pose>` where they specify relative position of the sensor to base_link where they get lumped.

Printing of the resulting SDF memory model results in flipping one Euler notation, but it's a 100% equivalent transform. Here's a proof by Ignition Math:

Quaterniond initialized by (-2.19645, -1.5707963267948966, 0) has:
 - coefs: -0.629608 -0.321859 -0.629608 0.321859
 - Euler: -2.19645 -1.5708 0

Quaterniond initialized by (3.1415926535897931, -1.5707963267948966, 0.945143) has:
 - coefs: 0.629608 0.321859 0.629608 -0.321859
 - Euler: -2.19645 -1.5708 0

This proves that the one changed line in model.sdf means no practical change.

* Absolem: Removed empty link visuals as they obstructed the omnicam and were not good for anything else.
Signed-off-by: Nate Koenig <[email protected]>
@peci1
Copy link
Collaborator

peci1 commented Apr 2, 2021

Thank you for the PR. I'll review it over the weekend. What is the approach you used? ign sdf -p in blueprint version of sdformat, or manual editing approach?

Also, did you see any other SDF 1.7-only feature used in our SDFs than relative_to poses?

@peci1
Copy link
Collaborator

peci1 commented Apr 4, 2021

I reviewed this PR and it produces invalid Ignition SDF. It e.g. contains the model://ctu_cras_norlab_absolem_sensor_config_1/ prefix for meshes which is unresolvable in Ignition Gazebo. It also did not use the Xacro parameters of the robot that are set in config/common.sh and config/sdf.sh, which results in a somewhat different robot (it e.g. has the differential connecting tracks to body, which creates a closed kinematic loop, and those are not representable in IG4/DART).

These are all things our update_robot_sdf script takes care about to be set correctly.

I just installed libsdformat8-dev and forced calling ign sdf --force-version 8.9.1 -p in the update_robot_sdf script. That results in a very minimal change to the model.sdf present on master branch (keeping SDF version 1.6), while allowing to continually develop the robot model for IG4.

I suggest closing this PR and I'll update all of our robot model PRs to generate the SDF using libsdformat 8. Using this approach, users of the model will not be affected in any way. Only developers who want to update the robot model will need to install libsdformat8-dev package.

@nkoenig nkoenig closed this Apr 6, 2021
@nkoenig nkoenig deleted the absolem_visuals_fix branch September 27, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants