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

Ensure that sim_joints_ always has the same number of elements as the… #77

Merged
merged 5 commits into from
May 28, 2021

Conversation

kbogert
Copy link
Contributor

@kbogert kbogert commented May 25, 2021

… joint_names

Otherwise a segfault occurs when some joints are not simulated by gazebo.

Possbily the cause of #67

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about adding a nullptr to the vector. This is happening because the joint_name doesn't exist, maybe it's because your configuration is wrong? or is there any specific use case for this ?

@kbogert
Copy link
Contributor Author

kbogert commented May 26, 2021

This is happening because there are joints in the urdf file that are not simulated by gazebo, there are lots of reasons why this could be the case (in our case, it's due to hacks needed to get parallel grippers to move correctly).

The alternative is to remove these joints from all of the vectors, reducing their size as the non-simulated joints are discovered. This is do-able but much more complicated, and as far as I can tell having the nulls in the sim_joints vector isn't causing any issues.

@kbogert kbogert requested a review from ahcorde May 27, 2021 17:05
@kbogert kbogert requested a review from ahcorde May 28, 2021 14:50
Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kbogert uncrustify is failing

@kbogert kbogert requested a review from ahcorde May 28, 2021 16:11
@ahcorde ahcorde merged commit 744e7bc into ros-controls:master May 28, 2021
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.

None yet

2 participants