(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Using digital I/O (NXO only)

Description: Explains DIO operation via opensource software.

Tutorial Level: BEGINNER

Next Tutorial: rtmros_nextage/Tutorials/Using IKFast with MoveIt! on NEXTAGE

NOTE: All the tutorials available under the URL http://wiki.ros.org/rtmros_nextage/Tutorials are applicable to the multiple products of Kawada Industries; Hiro (only with the one that opensource software is installed) and NEXTAGE OPEN. To simplify the notation in the rest of the tutorials, we use HiroNXO to appoint the aforementioned robots.


Unlike other tutorials, this page is limited to DIO-equipped NEXTAGE OPEN (NXO).

For the complete list of the methods available for DIO operation, please go through API document, in particular, NextageClient class where the methods available by default are aggregated.

Interactive operation

Via RTM client

For the following all methods, you need to have an RTM client running and connected to the nameserver internal (i.e. on QNX Controller Box) to the robot.

  • $ ipython -i `rospack find nextage_ros_bridge`/script/nextage.py -- --host %HOST%

Then, you can access all the DIO methods via _hands object, like you see on ipython terminal,

  • In [6]: robot._hands.h
    robot._hands.handlight_both     robot._hands.handtool_l_attach  robot._hands.handtool_r_eject
    robot._hands.handlight_l        robot._hands.handtool_l_eject   
    robot._hands.handlight_r        robot._hands.handtool_r_attach  
    In [6]: robot._hands.g
    robot._hands.gripper_l_close  robot._hands.gripper_r_close  
    robot._hands.gripper_l_open   robot._hands.gripper_r_open   
    In [6]: robot._hands.a
    robot._hands.airhand_l_drawin   robot._hands.airhand_l_release  robot._hands.airhand_r_keep
    robot._hands.airhand_l_keep     robot._hands.airhand_r_drawin   robot._hands.airhand_r_release

For attach / eject hand tools, use either of the following.

  • Right hand, attach a hand tool. This requires the solenoid valve at the tip of the tool changer is closed, which can be done by eject tool command) robot.handtool_l_attach

  • Right hand, eject a hand tool. Be careful since the tool will fall off. robot.handtool_l_eject

Some other commonly used methods. Hopefully the name of the methods are self-explanatory:

See API doc for more info. Also see system test file for an example.

HiroNXO shipped before August 2014 need to specify dio spec version

If your robot is older than August 2014, it comes with older DIO spec. In this case you need to specify the spec version as follows.

$ ipython -i `rospack find nextage_ros_bridge`/script/nextage.py -- --host %HOST% --dio_ver 0.4.2

To specify the version with NextageClient insance, then call set_hand_version method with an arg '0.4.2' (this vesrion number is fixed. You do not need to change.

Via ROS Service (experimental)

(TB filled) There's a community effort for accessing DIO via ROS Services.

Writing a program to access DIO

(TB filled)

Wiki: rtmros_nextage/Tutorials/Using digital IO (NXO only) (last edited 2017-01-12 11:42:55 by IsaacSaito)