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.
Create a new workspace:
$ mkdir -p ~/husky_indigo_ws/src
Add any custom source packages to the ~/husky_indigo_ws/src directory.
After adding your packages, make sure any necessary dependencies are installed:
$ cd ~/husky_indigo_ws/
$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y
Build the workspace:
$ cd ~/husky_indigo_ws/
$ catkin_make
Modify your robot-wide setup file (/etc/ros/setup.bash) to source your new workspace instead of the base indigo install:
source /home/administrator/husky_indigo_ws/devel/setup.bash
Reinitialize your environment so that it picks up your new workspace:
$ source /etc/ros/setup.bash
Augment the husky-core job with launch files from your custom packages:
$ rosrun robot_upstart install my_custom_package/launch --job husky-core --augment
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 Indigo, your robot description from prior ROS releases will have to be slightly adapted.
To create a custom Husky configuration, fork the husky_customization repository to your GitHub account, and clone the fork into your workspace:
$ cd ~/husky_indigo_ws/src
$ git clone https://github.com/<username>/husky_customization.git -b indigo-devel
$ cd ~/husky_indigo_ws
$ catkin_make
$ source devel/setup.bash
To modify your Husky’s URDF description (see ROS URDF Tutorials), edit the husky_customization/husky_custom_description/urdf/custom_description.urdf.xacro
file. Run roslaunch husky_viz view_model.launch to see your custom model in rviz.
To modify your Husky’s simulation configuration (see Gazebo’s URDF Tutorials), edit the husky_customization/husky_custom_gazebo/urdf/custom_description.gazebo.xacro
file. Run roslaunch husky_gazebo husky_playpen.launch
to see your custom Gazebo configuration in action!
Once you are done customizing your Husky configuration, don’t forget to commit and push the changes back into your GitHub repository.
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.