Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Most of the scripts for these instructions are included in the Git repository:


  1. Open terminal on Laptop (need to do this on each terminal you use)
  2. Edit the scripts/ bash script (in the kingfisher_utils ROS package) with the appropriate IP addresses.  You will at least need to change the "MY_WLAN" variable to match the IP address of your machine.
    1. Also note that the script assumes your wireless device is wlan0.  You should double check the name of your wirless network interface using the command ifconfig. If your network device is under a different name, change the script to reflect your setup.
  3. Execute source scripts/kf_connect_wifi.shbashwhich looks something like this...

    Code Block
    # Source this file to set environmental variable and set route
    MY_WLAN=  # Wireless address of my laptop
    KF_WLAN= # Wireless address of Kingfisher
    KF_ETH= # Wired for Kingfisher, where ROS master lives
    #sudo route add -net ${KF_ETH} netmask gw ${KF_WLAN}
    export ROS_IP=${MY_WLAN} # My laptop
    export ROS_MASTER_URI=http://${KF_ETH}:11311
    export ROS_HOSTNAME=${MY_WLAN}
    # Do this last - if you do it twice it throws an error and stops
    sudo route add -host ${KF_ETH} gw ${KF_WLAN} dev wlan0

  4. You need to do this in each terminal you are using!
  5. Check that this was successful

    Code Block
     `env | grep ROS`
    Results should look like

Setup ROS Workspace

# Setup local ROS environment, otherwise it won't know about kingfisher_msgs

source ~/kf_ws/devel/setup.bash 

Test Incoming Connection


Now verify that you are able to yous should be able to run rosnode list and see all the nodes running on the KF.  You should see something like this...

Test Outgoing Connection


Test that you can publish from your laptop and that the commands make it to the robot


You should hear the motor spin (if you are running on shore power it might will beep and spin only a small amount since the power supply can't provide enough current).


Note: If you see the error "ERROR: invalid message type: kingfisher_msgs/Drive" you need to install the kingfisher-msgs ROS package.  How you do this may depend on your distribution of Ubuntu and ROS


Code Block
cd catkin_ws/src
git clone
cd catkin_ws
source devel/setup.bash 


Driving with Joystick

Now, in a new terminal use the following launch file to start the joystick nodes.

Code Block
roslaunch kingfisher_utils kingfisher_tankdrive.launch


MATLAB Snippet

Code Block
kfpub = rospublisher('/cmd_drive',rostype.kingfisher_msgs_Drive);
kfmsg = rosmessage(kfpub)
kfmsg.Left = 0.1






# Source this file to set environmental variable and set routeMY_WLAN=  # Wireless address of my laptopKF_WLAN= # Wireless address of KingfisherKF_ETH= # Wired for Kingfisher, where ROS master lives#sudo route add -net ${KF_ETH} netmask gw ${KF_WLAN}export ROS_IP=${MY_WLAN} # My laptopexport ROS_MASTER_URI=http://${KF_ETH}:11311export ROS_HOSTNAME=${MY_WLAN}# Do this last - if you do it twice it throws an error and stopssudo route add -host ${KF_ETH} gw ${KF_WLAN} dev wlan0