Wiki

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Running NetFT node

Description: Tutorial describing how to configure Linux network to communicate with NetFT sensor. It also describes running NetFT ROS node and provides some troubleshooting tips.

Tutorial Level: INTERMEDIATE

Introduction

netft_node is ROS node that communicates with NetFT and publishes force and torque data as ROS topic. This tutorial describes setting up Linux network to communicate with NetFT, and running netft_node

IP/Network Setup

The default jumper settings on the NetFT device cause it to come up with static IP address of 192.168.1.1 . The best way to communicate with device is to connect it to stand-alone Ethernet interface on a Linux box an configure interface with static IP in same network (such as 192.168.1.100).

Determine what network interface NetFT is connected to

In Linux there multiple ways to determine what network interface device is connected to.

Use kernel messages (dmesg)

  1. Power NetFT device and connect it to computer network interface.
  2. Use dmesg to view recent kernel messages and determine which Ethernet interface most recently got link.

      dmesg 
    Look at most recent logs messages for something like:
    eth2: link up, 100Mbps, full-duplex, lpa 0x41E1

    In the above example, the kernel log indicates link just came up on eth2. If you just connected NetFT device, then eth2 is most likely connected to NetFT.

Brute force

The above method assumes that network interface that the NetFT is plugged into is already UP. If the network interface is not enabled (UP) automatically by Linux, then you might need to enable it manually. List all enabled (UP) devices by running:

On my computer I see a list like

NOTE: The lo interface is the loopback device. It is a virtual interface that you should ignore.

To see all Ethernet interface (enabled or not) run :

On my computer I see two more devices eth1 and eth2 that is not enabled:

You can try enabling Ethernet interface ethX by running:

Setting IP address

Say you've determined that ethX is the Ethernet interface that the NetFT is connected to. If NetFT is configured with default IP address you should be able to communicate with it by running:

Verify connectivity with device by running

If above command works, you should be able to view webpage from webserver running on NetFT by typing http://192.168.1.1 into web browser's address bar.

IP address on PR2

192.168.1.1 is the default address the NetFT box is configured with once shipped. Jumper 9 (inside NetFT box) even allows forces NetFT sensor to use IP address of 192.168.1.1. However on the PR2, the NetFT should be configured with static IP of 10.68.0.XXX where XXX is 60 if there are not conflicts with other devices. If NetFT is connected to PR2 network configure with Static IP of 10.68.0.XXX, the PR2 interface on PR2 will already be configured with the correct IP address.

Getting netft stack

The netft stack is not yet released as Debian package to unstable. The easiest ways to get netft debian package for unstable.

Running NetFT node

If can view NetFT's webpage with address such as 192.168.1.1 you should be able to run ROS node by running netft_node with same address.

Tf NetFT is on PR2 it is probably configured with static IP address of 10.68.0.60

Using rostopic to view netft node output

If the node doesn't quit immediately with an error message, then it should be running. You view ROS messages from device by running

You should see messages like:

Ploting netft_node force/torque outputs

It is also possible to plot data. An easy way to do this is use plot.sh script.

You should see a window that has two graphs.

  1. A graph with X,Y, and Z force values
  2. A graph with X,Y, and Z torque values

Screenshot-NetFT_plot.png

Changing publishing rate

In next release of ROS the publishing rate can be changed from hardcoded default of 100Hz with with the --rate argument.

rosrun netft_rdt_driver netft_node 10.68.0.60 --rate 200

Publishing geometry_msgs::Wrench instead of geometry_msg::WrenchStamped

In next release of ROS the geometry_msg::Wrench message type will be replaced by geometry_msg::WrenchStamped. If you still want to publish Wrench data type, then use --wrench command line option.

rosrun netft_rdt_driver netft_node 10.68.0.60 --wrench

Troubleshooting

Problem : netft_node exits with error code on startup

Try accessing NetFT box from webpage using same address from webpage. If webpage doesn't work, netft_node will not work. Sometime Linux will try reconfiguring network interface when link is unplugged an then replugged. Try configuring IP address of network interface again with:

Where ethX is network interface NetFT box is plugged into, and xxx.xxx.xxx.xxx is IP address on same sub-network as NetFT box.

Problem : NetFT stops publishing data

View diagnostics coming from NetFT driver. Runtime monitor is good way to view diagnostics

Wiki: netft_rdt_driver/Tutorials/RunningNetFTNode (last edited 2011-09-17 07:54:50 by dking)