Forums Niryo One Programming Niryo One Auto execute a Python script inside the robot

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Alexey
    Participant
    Post count: 3

    Hello!
    I wrote a script. Now I run it remotely via ssh. I connect to Niryo and type ./test_api.py
    How to make this script run automatically after loading the robot.

    cducatez
    Keymaster
    Post count: 9

    Hi,

    The easiest way would be for you to move your scripts in the “niryo_one_ros/niryo_one_user_interface/scripts” folder. Then edit “user_interface.py” to import your script and call the needed functions at the end of the __init__ function. This way, your script function(s) will be called at the end of the whole loading.

    Or alternative, if your created your own ROS package, you can launch this node by editing “niryo_one_ros/niryo_one_bringup/launch/user_interface.launch” file (http://wiki.ros.org/roslaunch/XML/node).

    Let me know if you have problems with those methods

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

You must be logged in to reply to this topic.