Open civerachb-cpr opened 3 years ago
Small update: it turns out I had a deb package installed that was also providing the pcan
kernel module, and that was overriding my compiled-from-source driver.
I can confirm that compiling the driver without netdev support works. BUT, the CAN devices connected to my computer's PCI CAN card need netdev support, otherwise the whole robot doesn't work.
The options I see are:
1) Reconfigure pcan_python so it works with netdev CAN devices. This feels like it would basically be rewriting the entire pcan_python library, so not sure that's worth it.
2) Use the serial instead of CAN; I have 2 open serial ports on the computer, and I can flip the dip switch in the hand to switch from CAN to RS232, but it looks like the ROS driver only works with CAN?
3) Install 2 version of the peak driver: one with netdev support for my PCI CAN card, and the other without netdev support for use with the USB adapters.
hello,I have met the similar question like you.I run the ros package on untuntu 18.04 . I installed the can driver of 8.x version. When I run rosservice call /bhand_node/actions "action: 1"
I meet the same error pyHand: init_hand: error: (0) Error Number: -0x1 while attempting to read
. I think it is the problem of pcanlibrary and the _pcan_module we make.
I wonder how you solve the problem.Thank you.
For the application I was working on we ultimately just installed a second, low-cost computer in the robot to run the drivers for the two hands. We configured it to use the same ROS master as the rest of the robot, but that was the most-expedient work-around to meet our requirements of having the pcan_python
module compiled with both NETDEV and CHARDEV concurrently.
To use the Barrett hands you ned to compile the pcan_python
library with the NET=NO_NETDEV_SUPPORT
option (see https://github.com/RobotnikAutomation/pcan_python).
It's also worth double-checking that you have the dip switches on the hand itself set properly; depending on whether you're using the connector on the side or the bottom of the hand you'll need to flip some switches under the small plate on the base of the hand.
Finally, make sure you're opening the correct CAN device when you launch the driver by setting the port
argument.
I've been fighting with this problem for a week or so, and I haven't been able to figure it out. When I initialize the hand by running
rosservice call /bhand_node/actions "action: 1"
I'm gettingret: False
and seeing the following output from the driver:Immediately after the activation signal I can hear the high-pitched whine from the hand, and the fingers splay open. Then the driver crashes and reverts to the failure state.
The computer in question has 4 CAN ports: 2 on a PCI card (can0 and can1 -- these are working correctly), and 2 USB dongles (one each for a gripper mounted on the end of the left and right arms). For the moment I've disconnected one gripper completely, and the other is connected to the control box. I can confirm that the dip switches on the hand are set to the correct positions, as I'm able to control the hand correctly when I connect the USB dongle to my laptop instead of my robot.
Additional output and config files:
I have a udev rule that sets the bitrate to 1M:
The
load_peak
script contains this:I've rebuilt the pcan driver several times, with netdev support both enabled and disabled, and it's made no difference. I tried the additional flags mentioned in https://github.com/RobotnikAutomation/barrett_hand/issues/16, same result: the error persists. I've also tried the peak-linux-driver versions 8.11.0 and 8.12.0; both produce the same error as above.
The node works correctly when I connect the gripper directly to my laptop (where it's the only CAN device), but I cannot get it to work in my robot's computer. Is there a known compatibility issue when using a PCI CAN card at the same time as the USB dongles that I'm unaware of? Or have I just missed something with my configuration and I'm too far down the rabbit hole to have noticed?
Any suggestions or insight is greatly appreciated; I've been at this for a week and feel like I haven't made any progress.