RightHandRobotics / reflex-ros-pkg

This repo contains base ROS code for controlling the Right Hand Robotics ReFlex hand. More info at www.righthandrobotics.com
18 stars 26 forks source link

Reflex Takktile2 ethernet connection not working #43

Open KiyanoushNazari opened 4 years ago

KiyanoushNazari commented 4 years ago

Hi everyone, I am using a reflex takktile2 hand, it was purchased about a year ago but no one has used it before. I successfully installed the ros package but when I connect the hand to the PC there is no connection and the system does not recognize the hand. I have tried various PCs with various ubuntu and ros versions but the one I am using now is my laptop with Ubuntu 18.04 with ros melodic. I set the static ip address as the quick start page says. I have also flashed the firmware successfully and the microcontroller board itself is recognized by the system when it's connected to the laptop by its micro usb port. But again when I connect the hand with Ethernet there is no connection. I have tried my ethernet with internet router and its working perfectly fine. So I came to the conclusion that the problem is coming from the ethernet port of the board but I have no idea how to fix this. I would really appreciate it if anyone could suggest something. Thanks

axkoenig commented 3 years ago

Hi all,

I am running Ubuntu 20.04 and ROS Noetic. I also setup the connection as described in the Quickstart guide and the ReFlex TakkTile is correctly recognized under the Ubuntu networking settings. However, I am having problems when launching the driver and the hand won't connect. @KiyanoushNazari, your problem sounded similar. Did you find a solution?

Here is the log after running roslaunch reflex reflex_takktile.launch.

SUMMARY
========

PARAMETERS
 * /default_contact_threshold: 20
 * /encoder_zero_reference: [2.21521, 6.11559...
 * /motor_to_joint_gear_ratio: [1.42, 1.42, 1.42...
 * /motor_to_joint_inverted: [1, -1, 1, -1]
 * /motor_zero_reference: [59.6108, 56.3347...
 * /reflex_takktile_f1/default_motor_speed: 3.0
 * /reflex_takktile_f1/max_motor_speed: 3.5
 * /reflex_takktile_f1/max_motor_travel: 3.6
 * /reflex_takktile_f1/overload_threshold: 350.0
 * /reflex_takktile_f2/default_motor_speed: 3.0
 * /reflex_takktile_f2/max_motor_speed: 3.5
 * /reflex_takktile_f2/max_motor_travel: 3.6
 * /reflex_takktile_f2/overload_threshold: 350.0
 * /reflex_takktile_f3/default_motor_speed: 3.0
 * /reflex_takktile_f3/max_motor_speed: 3.5
 * /reflex_takktile_f3/max_motor_travel: 3.6
 * /reflex_takktile_f3/overload_threshold: 350.0
 * /reflex_takktile_preshape/default_motor_speed: 2.0
 * /reflex_takktile_preshape/max_motor_speed: 3.5
 * /reflex_takktile_preshape/max_motor_travel: 1.75
 * /reflex_takktile_preshape/overload_threshold: 400.0
 * /rosdistro: noetic
 * /rosversion: 1.15.9
 * /tactile_offset_f1: [133, 121, 125, 1...
 * /tactile_offset_f2: [127, 129, 136, 1...
 * /tactile_offset_f3: [137, 111, 156, 1...
 * /tf_geometry/base_link/origin: [0.0, 0.0, 0.0]
 * /tf_geometry/base_link/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/distal/origin: [0.068, 0.0, 0.0025]
 * /tf_geometry/distal_sensors/origin_x: [0.0114, 0.01931,...
 * /tf_geometry/distal_sensors/origin_z: [0.0129, 0.0129, ...
 * /tf_geometry/distal_sensors/rotation: [0.0, 0.0, 0.0, 0...
 * /tf_geometry/proximal_1/origin: [0.01, 0.0, 0.0186]
 * /tf_geometry/proximal_1/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/proximal_2/origin: [0.01, 0.0, 0.0186]
 * /tf_geometry/proximal_2/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/proximal_3/origin: [-0.03, 0.0, 0.0817]
 * /tf_geometry/proximal_3/rotation: [0.0, 0.0, 3.14159]
 * /tf_geometry/proximal_sensors/origin_x: [0.0189, 0.02681,...
 * /tf_geometry/proximal_sensors/origin_z: [0.0154, 0.0154, ...
 * /tf_geometry/swivel_1/origin: [0.0504, 0.026, 0...
 * /tf_geometry/swivel_2/origin: [0.0504, -0.026, ...
 * /yaml_dir: /home/username/r...

NODES
  /
    driver_node_0 (reflex_driver/reflex_driver_node)
    recorder (rosbag/record)
    reflex_takktile_hand (reflex/reflex_takktile_hand.py)

auto-starting new master
process[master]: started with pid [4143]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to d566f560-5ab2-11eb-8a7c-174bd5be787a
process[rosout-1]: started with pid [4153]
started core service [/rosout]
process[recorder-2]: started with pid [4160]
process[driver_node_0-3]: started with pid [4161]
process[reflex_takktile_hand-4]: started with pid [4162]
[ INFO] [1611100970.182434379]: Succesfully loaded all parameters
[ INFO] [1611100970.183667581]: Publishing the /hand_state topic
[ INFO] [1611100970.184343371]: Starting reflex_hand_driver on network interface eth0
[ INFO] [1611100970.184402491]: ReflexHand constructor
[ INFO] [1611100970.184526357]: found address 127.0.0.1 on interface lo
[ INFO] [1611100970.184559414]: found address 10.1.1.10 on interface eth0
[ INFO] [1611100970.184586752]: using 10.1.1.10 as the tx interface for IPv4 UDP multicast
[ INFO] [1611100970.184654113]: constructor complete
[ INFO] [1611100970.189166426]: Advertising the /disable_torque service
[ INFO] [1611100970.189842498]: Advertising the /calibrate_fingers service
[ INFO] [1611100970.190250380]: Advertising the /calibrate_tactile service
[ INFO] [1611100970.190648560]: Advertising the /zero_pose service
[ INFO] [1611100970.191047659]: Advertising the /set_tactile_threshold service
[ INFO] [1611100970.191089917]: Entering main reflex_driver loop...
[INFO] [1611100972.498571]: Starting up the hand
[INFO] [1611100972.514760]: ReFlex hand has started, waiting for commands...
[FATAL] [1611100978.022146]: Hand going down, no ethernet data for 5 seconds
================================================================================REQUIRED process [reflex_takktile_hand-4] has died!
process has finished cleanly
log file: /home/username/.ros/log/d566f560-5ab2-11eb-8a7c-174bd5be787a/reflex_takktile_hand-4*.log
Initiating shutdown!
================================================================================
[reflex_takktile_hand-4] killing on exit
[driver_node_0-3] killing on exit
[recorder-2] killing on exit
[ INFO] [1611100978.836870038]: Have a nice day
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
zixiliu commented 3 years ago

Hello! I'm having very similar issues (although I have a Reflex Takktile as opposed to Takktile2). I run ROS Indigo and I cannot establish connection.

Here's my log:

$ roslaunch reflex reflex_takktile.launch 
... logging to /home/howe/.ros/log/ba9baf8c-5b6b-11eb-bf3b-782bcb98efef/roslaunch-howe-general-7006.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://howe-general:38012/

SUMMARY
========

PARAMETERS
 * /default_contact_threshold: 20
 * /encoder_zero_reference: [2.21521, 6.11559...
 * /motor_to_joint_gear_ratio: [1.42, 1.42, 1.42...
 * /motor_to_joint_inverted: [1, -1, 1, -1]
 * /motor_zero_reference: [59.6108, 56.3347...
 * /reflex_takktile_f1/default_motor_speed: 3.0
 * /reflex_takktile_f1/max_motor_speed: 3.5
 * /reflex_takktile_f1/max_motor_travel: 3.6
 * /reflex_takktile_f1/overload_threshold: 350.0
 * /reflex_takktile_f2/default_motor_speed: 3.0
 * /reflex_takktile_f2/max_motor_speed: 3.5
 * /reflex_takktile_f2/max_motor_travel: 3.6
 * /reflex_takktile_f2/overload_threshold: 350.0
 * /reflex_takktile_f3/default_motor_speed: 3.0
 * /reflex_takktile_f3/max_motor_speed: 3.5
 * /reflex_takktile_f3/max_motor_travel: 3.6
 * /reflex_takktile_f3/overload_threshold: 350.0
 * /reflex_takktile_preshape/default_motor_speed: 2.0
 * /reflex_takktile_preshape/max_motor_speed: 3.5
 * /reflex_takktile_preshape/max_motor_travel: 1.75
 * /reflex_takktile_preshape/overload_threshold: 400.0
 * /rosdistro: indigo
 * /rosversion: 1.11.21
 * /tactile_offset_f1: [133, 121, 125, 1...
 * /tactile_offset_f2: [127, 129, 136, 1...
 * /tactile_offset_f3: [137, 111, 156, 1...
 * /tf_geometry/base_link/origin: [0.0, 0.0, 0.0]
 * /tf_geometry/base_link/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/distal/origin: [0.068, 0.0, 0.0025]
 * /tf_geometry/distal_sensors/origin_x: [0.0114, 0.01931,...
 * /tf_geometry/distal_sensors/origin_z: [0.0129, 0.0129, ...
 * /tf_geometry/distal_sensors/rotation: [0.0, 0.0, 0.0, 0...
 * /tf_geometry/proximal_1/origin: [0.01, 0.0, 0.0186]
 * /tf_geometry/proximal_1/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/proximal_2/origin: [0.01, 0.0, 0.0186]
 * /tf_geometry/proximal_2/rotation: [0.0, 0.0, 0.0]
 * /tf_geometry/proximal_3/origin: [-0.03, 0.0, 0.0817]
 * /tf_geometry/proximal_3/rotation: [0.0, 0.0, 3.14159]
 * /tf_geometry/proximal_sensors/origin_x: [0.0189, 0.02681,...
 * /tf_geometry/proximal_sensors/origin_z: [0.0154, 0.0154, ...
 * /tf_geometry/swivel_1/origin: [0.0504, 0.026, 0...
 * /tf_geometry/swivel_2/origin: [0.0504, -0.026, ...
 * /yaml_dir: /home/howe/catkin...

NODES
  /
    driver_node_0 (reflex_driver/reflex_driver_node)
    recorder (rosbag/record)
    reflex_takktile_hand (reflex/reflex_takktile_hand.py)

auto-starting new master
process[master]: started with pid [7018]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ba9baf8c-5b6b-11eb-bf3b-782bcb98efef
process[rosout-1]: started with pid [7031]
started core service [/rosout]
process[recorder-2]: started with pid [7048]
process[driver_node_0-3]: started with pid [7049]
process[reflex_takktile_hand-4]: started with pid [7054]
[ INFO] [1611180382.218812735]: Succesfully loaded all parameters
[ INFO] [1611180382.220246974]: Publishing the /hand_state topic
[ INFO] [1611180382.221510996]: Starting reflex_hand_driver on network interface eth0
[ INFO] [1611180382.221567572]: ReflexHand constructor
[ INFO] [1611180382.221699690]: found address 127.0.0.1 on interface lo
[ INFO] [1611180382.221723504]: found address 10.1.1.10 on interface eth0
[ INFO] [1611180382.221746053]: using 10.1.1.10 as the tx interface for IPv4 UDP multicast
[ INFO] [1611180382.221835217]: constructor complete
[ INFO] [1611180382.230737084]: Advertising the /disable_torque service
[ INFO] [1611180382.231815183]: Advertising the /calibrate_fingers service
[ INFO] [1611180382.232411712]: Advertising the /calibrate_tactile service
[ INFO] [1611180382.233001725]: Advertising the /zero_pose service
[ INFO] [1611180382.233621670]: Advertising the /set_tactile_threshold service
[ INFO] [1611180382.233644804]: Entering main reflex_driver loop...
[INFO] [WallTime: 1611180384.540550] Starting up the hand
[INFO] [WallTime: 1611180384.573170] ReFlex hand has started, waiting for commands...
[FATAL] [WallTime: 1611180390.016142] Hand going down, no ethernet data for 5 seconds
================================================================================REQUIRED process [reflex_takktile_hand-4] has died!
process has finished cleanly
log file: /home/howe/.ros/log/ba9baf8c-5b6b-11eb-bf3b-782bcb98efef/reflex_takktile_hand-4*.log
Initiating shutdown!
================================================================================
[reflex_takktile_hand-4] killing on exit
[driver_node_0-3] killing on exit
[recorder-2] killing on exit
[ INFO] [1611180390.389624179]: Have a nice day
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Here's how network configuration and Ubuntu version looks like inside the container:

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 78:2b:cb:98:ef:ef  
          inet addr:10.1.1.10  Bcast:11.255.255.255  Mask:254.0.0.0
          inet6 addr: fe80::7a2b:cbff:fe98:efef/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:599 errors:0 dropped:0 overruns:0 frame:0
          TX packets:301 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:44742 (44.7 KB)  TX bytes:54792 (54.7 KB)
          Interrupt:20 Memory:f1600000-f1620000 

eth1      Link encap:Ethernet  HWaddr a0:ce:c8:05:d8:cc  
          inet addr:10.245.248.40  Bcast:10.245.251.255  Mask:255.255.252.0
          inet6 addr: 2607:fb60:2501:2805:a2ce:c8ff:fe05:d8cc/64 Scope:Global
          inet6 addr: 2607:fb60:2501:2805:e1c0:b0b:4e47:5c4a/64 Scope:Global
          inet6 addr: fe80::a2ce:c8ff:fe05:d8cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15842 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9442 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:16969565 (16.9 MB)  TX bytes:1105238 (1.1 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:26112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26112 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:3393135 (3.3 MB)  TX bytes:3393135 (3.3 MB)

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.6 LTS
Release:    14.04
Codename:   trusty

The connection itself looks very reasonable to me. I can't figure out what the issue might be. Thanks a lot for any suggestions or ideas!!

zixiliu commented 3 years ago

We figured out that our connection issue was somehow affected by tactile sensors. By replacing line 28 in async_poll.c with a dummy { tactile_poll_nonblocking_tick, 3, (int *)(&dmxl_poll_states[3]) } we are able to run the hand and verify that all motors and sensors are working as expected. We had a second hand that had a similar issue. For the second hand, this first didn't solve the problem so we further commented out line 562 through 565 in tactile.c. We also unplugged and replugged some of the wires connecting the tactile sensors to the brain board. That was able to solve our connection issues for the second hand.