Results 1 to 3 of 3

Thread: Add shutdown actions to ArbotiX node?

  1. #1
    Join Date
    Apr 2009
    Location
    Stanford, CA USA
    Posts
    590
    Rep Power
    49

    Add shutdown actions to ArbotiX node?

    Fergs,

    I've been trying to figure out how to do a clean shutdown of my ArbotiX ROS node by adding a rospy.on_shutdown(self.shutdown) handler to arbotix_node.py where self.shutdown looks something like this:

    Code:
    def shutdown(self):
         rospy.loginfo("Shutting down ArbotiX node...")
         for name in self.sync_names:
                 rospy.loginfo("Disabling servo " + name)
                 self.servos[name].disableTorque()
    and I added the disableTorque() function to the DynamixelServo class in arbotix-node.py that looks like this:

    Code:
    def disableTorque(self):
         self.device.disableTorque(self.id)
    When I Ctrl-C to kill the node (launched from a launch file), I get the following output on the terminal:

    [arbotix-1] killing on exit
    [INFO] 1292864239.520982: Shutting down ArbotiX node...
    [INFO] 1292864239.521541: Disabling servo head_pan_joint

    and then it hangs for about 20 seconds and finally exits with:

    [arbotix-1] escalating to SIGTERM
    [arbotix-1] escalating to SIGKILL
    Shutdown errors:
    * process[arbotix-1, pid 28723]: required SIGKILL. May still be running.
    shutting down processing monitor...
    ... shutting down processing monitor complete
    done

    I actually have 13 servos in my joint list and head_pan_joint is the first so it doesn't get past head_pan_joint and even that joint is not disabled.

    Can you see what I am doing wrong?

    Thanks!
    patrick
    The Pi Robot Project
    http://www.pirobot.org

  2. #2
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    126

    Re: Add shutdown actions to ArbotiX node?

    Have you tried removing the loginfo calls?

    -Fergs

  3. #3
    Join Date
    Apr 2009
    Location
    Stanford, CA USA
    Posts
    590
    Rep Power
    49

    Re: Add shutdown actions to ArbotiX node?

    Quote Originally Posted by lnxfergy View Post
    Have you tried removing the loginfo calls?

    -Fergs
    Just tried that and it made no difference. I'm wondering if the joint_controller thread is being killed before it gets to the shutdown handler?

    --patrick
    The Pi Robot Project
    http://www.pirobot.org

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ArbotiX ROS Package 0.3.0
    By lnxfergy in forum ROS - Robot Operating System
    Replies: 233
    Last Post: 02-06-2011, 12:36 PM
  2. Arbotix vs. Propeller Robot Control board?
    By Stobs in forum Mech Warfare
    Replies: 9
    Last Post: 12-30-2010, 05:43 PM
  3. Question(s) A question about Arbotix python library
    By zzl1007 in forum Arbotix, Microcontrollers, Arduino
    Replies: 18
    Last Post: 11-24-2010, 03:18 PM
  4. Question(s) Newby Arbotix hassles
    By Slugman in forum Robot Computers
    Replies: 29
    Last Post: 11-15-2010, 09:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •