Stop command2018-11-01T18:06:07+00:00

Forums Niryo One Programming Niryo One Stop command

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Andrea
    Participant
    Post count: 7

    Hi,

    I’d need some idea for stopping the arm before the move_joints() command has been completed.

    Thanks in advance!

    Andrea

    Edouard Renard
    Keymaster
    Post count: 106

    Hi Andrea,

    Could you give more info about the context ? Are you at the ROS level, Python API level, Blockly level, … ?

    Thanks!

    Andrea
    Participant
    Post count: 7

    Hi,

    I’m woking in python so far.

    Edouard Renard
    Keymaster
    Post count: 106

    Thanks. For now the move commands from the Python API are synchronous, so you can’t stop one in the main execution thread. This has been made like that to simplify things. The Python API is targeted to beginner/intermediate programmers. For advanced programmers, or if you want to do much more complex applications, you’d have to start using the ROS communication tools (Python or C++).

    What you can do from that:

    1. Still use the Python API and work with multiple threads. In one thread you execute the move_joint() or move_pose() or shift_pose(). In another thread, you can create a simple ROS publisher and publish an message (type:  actionlib_msgs/GoalID) on the “/niryo_one/commander/robot_action/cancel” topic. You can find here a tutorial to do that quickly.

    2. If you really want to go to the next step and create more complex applications where you have more control, then start using ROS and create your own nodes that will use the other Niryo One nodes. See this guide to get started with Niryo One ROS stack.

    I hope this helps!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.