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_LMS1XX_IP |
192.168.131.20 |
IP address of the SICK LMS1XX LIDAR |
HUSKY_LMS1XX_SECONDARY_ENABLED |
false |
Enable/disable the secondary SICK LMS1XX LIDAR |
HUSKY_LMS1XX_SECONDARY_XYZ |
-0.2206 0.0 0.00635 |
Pose offset for the secondary SICK LMS1XX LIDAR |
HUSKY_LMS1XX_SECONDARY_RPY |
0.0 0.0 0.0 |
Orientation offset for the secondary SICK LMS1XX LIDAR |
HUSKY_LMS1XX_SECONDARY_IP |
192.168.131.21 |
IP address of the secondary SICK LMS1XX LIDAR |
HUSKY_LASER_3D_ENABLED |
false |
Enable/disable the main Velodyne VLP-16 |
HUSKY_LASER_3D_XYZ |
0 0 0 |
Pose offset for the Velodyne VLP-16 |
HUSKY_LASER_3D_RPY |
0.0 0.0 0.0 |
Orientation offset for the Velodyne VLP-16 |
HUSKY_LASER_3D_HOST |
192.168.131.20 |
IP address of the Velodyne VLP-16 |
HUSKY_LASER_3D_TOPIC |
points |
ROS topic the Velodyne VLP-16 data publishes to |
HUSKY_REALSENSE_ENABLED |
false |
Enable/disable the main RealSense D435 camera |
HUSKY_REALSENSE_MOUNT_FRAME |
sensor_arch_mount_link |
Mounting point for the RealSense D435 camera |
HUSKY_REALSENSE_OFFSET |
0.0 0.0 0.0 |
Pose offset for the RealSense D435 |
HUSKY_REALSENSE_OFFSET |
0 0 0 |
Orientation offset for the RealSense D435 |
HUSKY_TOP_PLATE_ENABLED |
true |
Enable/disable the standard Husky top plate. |
HUSKY_SENSOR_ARCH |
false |
Enable/disable the sensor/accessory arch. |
HUSKY_SENSOR_ARCH_HEIGHT |
510 |
The height of the sensor arch in mm. Must be either 510 or 300 |
HUSKY_SENSOR_ARCH_OFFSET |
0 0 0 |
Pose offset for the sensor arch |
HUSKY_SENSOR_ARCH_RPY |
0 0 0 |
Orientation offset for the sensor arch |
HUSKY_LOGITECH |
0 |
This must be set to 1 if you use a Logitech F710 controller; otherwise a PS4 controller for teleop is assumed. |
Adding a Source Workspace¶
Configuring non-standard peripherals requires a source workspace on the robot PC.
Create a new workspace:
mkdir -p ~/husky_melodic_ws/src
Add any custom source packages to the ~/husky_melodic_ws/src directory.
After adding your packages, make sure any necessary dependencies are installed:
cd ~/husky_melodic_ws/
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
Build the workspace:
cd ~/husky_melodic_ws/
catkin_make
Modify your robot-wide setup file (/etc/ros/setup.bash) to source your new workspace instead of the base melodic install:
source /home/administrator/husky_melodic_ws/devel/setup.bash
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 and later, 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.