SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post questions, comments and feedback to our 3Dconnexion UNIX and Linux Development Team.

Moderator: Moderators

Post Reply
Miguel M.
Posts: 5
Joined: Mon Mar 06, 2017 6:47 am

SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by Miguel M. »

Hi,

I'm currently using a SpaceNavigator for Notebooks with the task of controlling a 6DOF robot. I've successfully done it, yet there's still some issues. The xapp example was very helpful for me, although there's something I don't understand. Testing it, I noticed that the cases MagellanInputButtonPressEvent and MagellanInputButtonReleaseEvent, never happened even when I pressed the two buttons present in this specific mouse. The only thing that shows in the X Window is the MagellanInputMotionEvent. My thoughts are that those other cases are applicable for other mouses that possess more buttons (like the enterprise maybe?). Can someone more knowledgeable in this can tell me if that's the case? Or am I doing something wrong and the messages "Button pressed/released" are supposed to show up?

Regards,
Miguel Mendes
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by jwick »

If the cap works the buttons should work. Can you test your device on another machine/another program? Say a Windows machine?
There is a possibility that they have been configured to be used for something else. That's something you should see in a GUI.
Miguel M.
Posts: 5
Joined: Mon Mar 06, 2017 6:47 am

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by Miguel M. »

Hi jwick,

Thanks for getting back to me so quickly. Indeed, the buttons do work. They effectively enable/disable both translation and rotation as wished.

There is a possibility that they have been configured to be used for something else. That's something you should see in a GUI
Thanks for pointing that out... Apparently I only needed to change the configuration of the buttons, to Button 1 and Button 2. Now the X Window shows the events of pressing and releasing. I wanted to control the robots fingers when pressing these buttons, now I think I can. i'll get back to this topic if I find any more issues.
Miguel M.
Posts: 5
Joined: Mon Mar 06, 2017 6:47 am

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by Miguel M. »

Hi,

I'm having a bit of a problem now. I want to control the mouse sensitivity so that I can control the robot more smoothly. I'm configuring one of the buttons with the possibility of activating a mode where rotating the knob will increase / decrease the sensitivity. I'm rescaling the values of course (I know that the maximum read values for the mouse are between 0 and 350, so I convert that to a interval within [0,2], which is acceptable for the mouse sensitivity I suppose? Please confirm me this)

I'm using the function MagellanAppplicationSensitivity() to send the desired sensitivity to the display. The problem is that nothing changes. The mouse remains with the same sensitivity. My question is: Is this the correct function for manipulating the mouse sensitivity? I want to avoid the manual changing from the 3DxWare program.

Regards,
Miguel
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by jwick »

I don't know what the MagellanApplicationSensitivity function does. This driver has long ago stopped being maintained.
I suggest you don't rely on it for doing anything more than delivering device events to you.

I'd handle the button presses inside your app, and scale/filter the 6DFOF values received from the device in your own code.

Newer devices are clipped to +/- 350. You should protect your code though. Older devices, that someone may connect, can produce a larger range.
And I can not guarantee that all future devices will be clipped to +/- 350. The last thing you want is to smash your robot through the wall.
Miguel M.
Posts: 5
Joined: Mon Mar 06, 2017 6:47 am

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by Miguel M. »

Yes, the values have to be scaled according to minimum/maximum accepted values of the robot, that I have already taken into account.

I do handle the button presses inside my app through the state machine provided, and since this function doesn't seem to work, I might have to do a workaround with an auxiliary variable. Thanks for the heads up though.

Regards,
Miguel
samairakh
Posts: 2
Joined: Thu Jun 06, 2019 4:41 am

Re: SpaceNavigator (ButtonPressEvent, ReleaseEvent, etc)

Post by samairakh »

I'm utilizing the capacity MagellanAppplicationSensitivity() to send the ideal affectability to the showcase. The issue is that nothing changes. The mouse stays with a similar affectability. My inquiry is: Is this the right capacity for controlling the mouse affectability? I need to evade the manual transforming from the 3DxWare program.
Post Reply