Customize Husky Configuration

Note

These tutorials assume that you are familiar with ROS and the catkin build system. Please familiarize yourself using the ROS and catkin tutorials.

If upgrading from a prior ROS release, you should now re-examine your backed-up files from Backing Up Husky Configuration to determine if there’s any customizations that need to be configured on your platform.

Environment Variables

Husky’s standard peripherals can be configured using these environment variables, to be added to the robot-wide setup file (/etc/ros/setup.bash). These environment variables are loaded on boot.

Variable

Default

Description

ROBOT_NETWORK

None

Configure a network interface to trigger the husky-core job, and initialize ROS_IP. If not set, husky-core will define ROS_HOSTNAME instead (see Network Setup)

HUSKY_IMU_PORT

/dev/clearpath/imu

Port for the Husky UM6 IMU if present, must be set before running husky_bringup install

HUSKY_IMU_XYZ

0.19 0.0 0.149

Pose offset for the Husky IMU's standard mounting location

HUSKY_IMU_RPY

0.0 -1.5708 3.1416

Orientation offset for the Husky IMU's standard mounting location

HUSKY_NAVSAT_PORT

/dev/clearpath/gps

Port for the Husky GPS if present, must be set before running husky_bringup install

HUSKY_NAVSAT_BAUD

19200

Baudrate for the Husky GPS

HUSKY_UR5_IP

None

IP Address for the UR5 manipulator if present, must be set before running husky_bringup install

HUSKY_UR5_ENABLED

false

Enable/disable the UR5 manipulator.

HUSKY_LMS1XX_IP

None

IP Address for the SICK LMS1XX LIDAR if present, must be set before running husky_bringup install

HUSKY_LMS1XX_ENABLED

false

Enable/disable the SICK LMS1XX LIDAR

HUSKY_LMS1XX_XYZ

0.2206 0.0 0.00635

Pose offset for the SICK LMS1XX LIDAR

HUSKY_LMS1XX_RPY

0.0 0.0 0.0

Orientation offset for the SICK LMS1XX LIDAR

HUSKY_TOP_PLATE_ENABLED

true

Enable/disable the standard Husky top plate.

Adding a Source Workspace

Configuring non-standard peripherals requires a source workspace on the robot PC.

  1. Create a new workspace:

mkdir -p ~/husky_kinetic_ws/src
  1. Add any custom source packages to the ~/husky_kinetic_ws/src directory.

  2. After adding your packages, make sure any necessary dependencies are installed:

cd ~/husky_kinetic_ws/
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
  1. Build the workspace:

cd ~/husky_kinetic_ws/
catkin_make
  1. Modify your robot-wide setup file (/etc/ros/setup.bash) to source your new workspace instead of the base kinetic install:

source /home/administrator/husky_kinetic_ws/devel/setup.bash
  1. Reinitialize your environment so that it picks up your new workspace:

source /etc/ros/setup.bash

Robot Description

In ROS Hydro and earlier, custom Husky descriptions (URDFs) were provided to customers in a workspace in their home folder. Since the Husky URDF has undergone some changes for Kinetic, your robot description from prior ROS releases will have to be slightly adapted.

First create a new URDF file in which you will define your custom Husky additions. e.g. /home/administrator/husky-custom.xacro. Then modify /etc/ros/setup.bash to define the HUSKY_URDF_EXTRAS variable to point to your new file:

export HUSKY_URDF_EXTRAS=/path/to/your/custom-file.xacro

So for the previous example, if we saved the customized file to /home/administrator/husky-custom.xacro we would put export HUSKY_URDF_EXTRAS=/home/administrator/husky-custom.xacro in the setup.bash file.

Modify your customized *.xacro file to add whatever additional features are required. When finished, restart ROS by running sudo systemctl restart ros. You can verify that your customized model is being used by running

roslauch husky_viz view_robot.launch

Network Configuration

If upgrading from prior ROS releases, your old /etc/network/interfaces file may contain a static IP binding for your robot, or other customizations that should be replicated on your new setup.