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

Touch plugin enabled #273

Closed
mohamedsayed18 opened this issue Aug 5, 2020 · 3 comments
Closed

Touch plugin enabled #273

mohamedsayed18 opened this issue Aug 5, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@mohamedsayed18
Copy link
Contributor

The <enable> tag is not enabled. I tried to set it to false but it always enabled.
https:/ignitionrobotics/ign-gazebo/blob/deaa059e7a82e177279343de125c39b44f09237a/src/systems/touch_plugin/TouchPlugin.cc#L187-L192

This condition is always achieved.
I think the problem is with Get<bool>

@azeey
Copy link
Contributor

azeey commented Aug 5, 2020

Oof, yeah that should be _sdf->Get<bool>("enabled", false).first. Mind creating a PR?

@mohamedsayed18
Copy link
Contributor Author

I tried to edit the workspace/src/sdformat/include/sdf/Element.hh but it didn't work. Is this the write file?

@azeey
Copy link
Contributor

azeey commented Aug 5, 2020

I meant line 188 https:/ignitionrobotics/ign-gazebo/blob/deaa059e7a82e177279343de125c39b44f09237a/src/systems/touch_plugin/TouchPlugin.cc#L188. second should be first.

Get returns a std::pair where the first value is the actual value of the sdf parameter and the second value indicates whether the parameter was set.

@chapulina chapulina added the bug Something isn't working label Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants