Packages composing basic functionalities of the Husarion Panther robot. API for each node can be found in each package folder.
Note: Building the latest version of this code might not always work with OS image you already have installed on your robot. Make sure you are running the newest OS image for Built-in Computer. You can find it in the downloads section at husarion.com.
We are making great effort to achieve backward compatibility, but can not test everything. Currently, fully tested images are
v1.0.0
and above. If the command below shows you the tag, you can be assured the newest code will work on your robot.echo $SYSTEM_BUILD_VERSIONIf you are running an older OS image, the software should run within docker. We did our best to achieve backward compatibility, yet we do not advise using the newest software stack with older OS images.
There is already prebuild and tested docker image for Panther robot. This is the docker image robots are shipped with. In order to download it, run:
docker pull husarion/panther
Example compose.yaml can be found on husarion/panther-docker in demo section.
To build hardware interface packages running on the Panther robot's internal computer, use the following commands:
export HUSARION_ROS_BUILD_TYPE=hardware
git clone https://github.com/husarion/panther_ros.git src/panther_ros
vcs import src < src/panther_ros/panther/panther.repos
rm -r src/panther_ros/panther_gazebo
rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install --from-paths src -y -i
source /opt/ros/$ROS_DISTRO/setup.bash
catkin_make -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release
After successful build run:
roslaunch panther_bringup bringup.launch
This will launch all nodes related to Panther robot, selecting them to match your specific hardware revision. Please keep in mind, this packages require environment variables that are set during boot procedure of Panther.
To build your system run:
export HUSARION_ROS_BUILD_TYPE=simulation
pip3 install rosdep vcstool
git clone https://github.com/husarion/panther_ros.git src/panther_ros
vcs import src < src/panther_ros/panther/panther.repos
mv panther_ros/panther_description/ src/panther_description
mv panther_ros/panther_gazebo/ src/panther_gazebo
rm -rf panther_ros
rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install --from-paths src -y -i
source /opt/ros/$ROS_DISTRO/setup.bash
catkin_make -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release
Later to launch simulation run:
roslaunch panther_gazebo panther_simulation.launch
This will launch Gazebo and Rviz.
Parameters stored in panther_default.yaml are generic and are overwritten with your specific Panther configuration on start.
Changing the wheels requires changing the wheel_type
parameter. To do this, you can use the following command by modifying the value of the wheel_type:=WH0X parameter:
roslaunch panther_bringup bringup.launch wheel_type:=WH02
Possible wheels names:
WH01
: default offroad wheels.WH02
: mecanum.WH04
: small pneumatic wheels.custom
: custom wheels type.
If you want to use custom wheels, use argument wheel_config_file
where you provide a path to wheel.yaml
file. The file has to be written in the same manner as default panther wheel configurations found in WH01.yaml.
By default Panther will launch the default robot description - raw robot without any sensors. There are two ways of providing custom robot description, which are described below.
a) Disabling the default robot state publisher
If you want to use a custom robot description from a different location within your project, you can disable the default robot_state_publisher
and run it separately. To do this, use the publish_robot_state
launch argument with a value of false:
roslaunch panther_bringup bringup.launch publish_robot_state:=false
b) Providing custom robot description
Alternatively, you can provide a custom robot description directly using the robot_description
launch argument. For example:
roslaunch panther_bringup bringup.launch robot_description:="xacro $(rospack find my_awesome_package)/urdf/panther.urdf.xacro"
You can shut down any computer within internal Panther's network. You can do so by exchanging SSH public keys between the Built-in Computer and the one you want to shutdown. Later you have to modify shutdown_hosts.yaml adding your computer as follows:
hosts:
- ip: 10.15.20.XX
username: my-username
Refer to the panther_manager documentation for more information.
You can easily customize Panther LED panels by defining new animations based on images. They can be created with simple YAML syntax, such as the one shown below:
# user_animations.yaml
user_animations:
# animation with default image and custom color
- id: 21
name: MY_AWESOME_ANIMATION
priority: 2
animation:
both:
type: image_animation
image: $(find panther_lights)/animations/strip01_red.png
duration: 2
You also have the option to create code-based animations. Detailed information on how to make use of these features, as well as a description of default behavior and customization options for Panther LED panels, can be found in panther_lights documentation.