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

Haptic feedback #90

Open
vanessaloia opened this issue Oct 2, 2020 · 4 comments
Open

Haptic feedback #90

vanessaloia opened this issue Oct 2, 2020 · 4 comments

Comments

@vanessaloia
Copy link

Good afternoon,
__
I connected the haptic device to the robot in simulation.
To get the haptic feedback, I enabled it with the -e 1 flag and, in the ambf/ambf_framework/afInputDevice.h file, I changed the m_dev_force_enable from false to true.
However when the robot interacts with other bodies in the scene I don't get any feedback. Is there something else I need to change to get it?

Moreover, is there a way to plot the forces of interaction when a collision happens?

@adnanmunawar
Copy link
Member

Thanks for creating the issue. Which exact haptic device are you talking about? You do not have to manually enable the m_dev_force_enable flag as it shall be set automatically.
What you might need to change is the gains, here is an example:

MTMR:
  hardware name: MTMR
  haptic gain: {linear: 0.03, angular: 1}
  workspace scaling: 5
  simulated multibody: "../multi-bodies/grippers/pr2 gripper small red.yaml"
  # root link:
  location: {
    position: {x: -0.5, y: 0, z: 0},
    orientation: {r: 0, p: 0, y: 0}}
  button mapping: {
    a1: 1,
    a2: 2,
    next mode: 3,
    prev mode: 4}
  pair cameras: [camera1, camera2] # The motion of the IID-SDE is w.r.t the first camera in the list

For the haptic device, the field haptic gain is relevant. Try turning up the linear gain, but set a low gain as currently there isn't much safety while commanding forces.

Also, what branch are you on? If on master I would advise switching to ambf-1.0.

@vanessaloia
Copy link
Author

Yes, I'm on ambf-1.0
Anyway, I changed the haptic gain and now it is working
Is there a way to plot the interaction force?
Thanks!

@adnanmunawar
Copy link
Member

Yes, we did have support for that, however, I commented out that code to enable integration with ambf-1.0. I can try re-integrating that with the branch

@vanessaloia
Copy link
Author

It would be great! Thanks

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

No branches or pull requests

2 participants