Main Content

Simulation 3D Space Mouse

Process input from space mouse device

Renamed from Space Mouse Input in R2025a

  • Simulation 3D Space Mouse block

Libraries:
Simulink 3D Animation / Simulation 3D / Hardware Interface

Description

A space mouse is a device similar to a joystick in purpose, but it also provides movement control with six degrees of freedom. This block reads the status of the space mouse and provides some commonly used transformations of the input. The Simulation 3D Space Mouse block supports current models of 3D navigation devices manufactured by 3Dconnexion (https://www.3dconnexion.com).

Ports

Output

expand all

Status of object translation, returned as 0 or false if not pressed and 1 or true if pressed.

Data Types: Boolean

Status of object rotation, returned as 0 or false if not pressed and 1 or true if pressed.

Data Types: Boolean

Status of button, returned as 0 or false if not pressed and 1 or true if pressed.

Data Types: Boolean

Parameters

expand all

Serial port to which the space mouse is connected. Possible values are USB1...USB4 and COM1...COM4.

Specify how the inputs from the device are transformed:

  • Speed — No transformations are done. Outputs are translation and rotation speeds.

  • Position — Translations and rotations are integrated. Outputs are position and orientation in the form of roll/pitch/yaw angles.

  • Viewpoint coordinates — Translations and rotations are integrated. Outputs are position and orientation in the form of an axis and an angle. You can use these values as viewpoint coordinates in a virtual world.

If this check box is selected, the mouse accepts only the prevailing movement and rotation and ignores the others. This mode can be useful for beginners using Simulation 3D Space Mouse block.

Select this check box to fix the rotations at initial values, allowing you to change positions only.

Select this check box to fix the positions at the initial values, allowing you to change rotations only.

Select whether the integrated rotation angles should wrap on a full circle (360°). The software ignores this parameter when you set Output Type to Speed.

Dependencies

To enable this parameter, set Output type to Position.

Select whether to limit the upper and lower positions of the mouse.

Dependencies

To enable this parameter, set Output type to Position.

Mouse sensitivity for translations. Higher values correspond to higher sensitivity.

Mouse sensitivity for rotations. Higher values correspond to higher sensitivity.

Initial condition for integrated translations. The software ignores this parameter when you set Output Type to Speed.

Dependencies

To enable this parameter, set Output type to Position or Viewpoint coordinates.

Initial condition for integrated rotations. The software ignores this parameter when you set Output Type to Speed.

Dependencies

To enable this parameter, set Output type to Position or Viewpoint coordinates.

Position coordinates for the lower limit of the mouse.

Dependencies

To enable this parameter:

  • Set Output type to Position.

  • Select Limit position parameter.

Position coordinates for the upper limit of the mouse.

Dependencies

To enable this parameter:

  • Set Output type to Position.

  • Select Limit position parameter.

Version History

Introduced in R2007b

expand all