Skip to content

Clearpath Husky

GitHub code build GitHub last commit

DockerHub image Docker image arch Docker image version Docker image size

This repository will help you configure the environment for Husky quickly.

🐳 Start Container

Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.

Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X or ssh -Y).

cd ~/ros2-essentials/husky_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.

If your user's UID is 1000, you may replace the docker compose build command with docker compose pull.

The commands in the following sections assume that you are inside the Docker container:

# in a new terminal
docker exec -it ros2-husky-ws bash

If the initial build somehow failed, run:

rm -r build install
colcon build --symlink-install

Once you have finished testing, you can stop and remove the container with:

docker compose down

🌱 Structure 🌱

Here is the structure of this workspace:

husky_ws
├── .devcontainer
├── docker
├── figure
├── install
├── build
├── log
├── script
|   ├── husky-bringup.sh
|   ├── husky-generate.sh
|   └── husky-teleop.sh
├── src
|   ├── husky
|   |   ├── husky_base
|   |   ├── husky_bringup
|   |   ├── husky_control
|   |   └── ...
├── udev_rules
|   ├── 41-clearpath.rules
|   └── install_udev_rules.sh
├── .gitignore
└── README.md

build / install / log folders will appear once you've built the packages.

✨ Introduction ✨

This repository has been derived from the Clearpath Husky's repository. Here is the original repository.
However, the original repository was designed for ROS1, and it is in the process of being upgraded to ROS2.

Below are the main packages for Husky:

  • husky_base : Base configuration
  • husky_control : Control configuration
  • husky_description : Robot description (URDF)
  • husky_navigation : Navigation configuration
  • husky_gazebo : Simulate environment
  • husky_viz : Visualize data

🚩 Testing 🚩

Building packages

Before attempting any examples, please remember to build the packages first.
If you encounter any dependency errors, please use rosdep to resolve them.

cd /home/ros2-essentials/husky_ws
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro humble -y
colcon build

After the build process, make sure to source the install/setup.bash file.
Otherwise, ROS2 will not locate the executable files. You can open a new terminal to accomplish this.

View the model

ros2 launch husky_viz view_model_launch.py

Demonstration of SLAM.

ros2 launch husky_navigation slam_launch.py

Rendering the model may take some time, so please be patient !

Control real robot

Before you proceed, please ensure that you've plugged the USB adapter of the Husky into the computer and mounted it into the container. (plugging in the USB adapter before creating the container is preferred but not required)

# Move to the workspace, source .bashrc, and bringup husky.
cd /home/ros2-essentials/husky_ws
source ~/.bashrc
./script/husky-bringup.sh

# (Optional) Open a new terminal & control the robot via keyboard teleoperation.
./script/husky-teleop.sh

License

To maintain reproducibility, we have frozen the following packages at specific commits. The licenses of these packages are listed below:

Further changes based on the packages above are release under the Apache-2.0 License, as stated in the repository.