How To Install joint-state-publisher on Ubuntu 22.04
Introduction
In this tutorial we learn how to install joint-state-publisher on Ubuntu 22.04.
What is joint-state-publisher
joint-state-publisher is:
This package contains a tool for setting and publishing joint state values for a given URDF. It publishes sensor_msgs/JointState messages for a robot. The package reads the robot_description parameter, finds all of the non-fixed joints and publishes a JointState message with all those joints defined.
It can be used in conjunction with the robot_state_publisher node to also publish transforms for all joint states.
There are three methods to install joint-state-publisher on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install joint-state-publisher Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install joint-state-publisher using apt-get by running the following command:
sudo apt-get -y install joint-state-publisher
Install joint-state-publisher Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install joint-state-publisher using apt by running the following command:
sudo apt -y install joint-state-publisher
Install joint-state-publisher Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install joint-state-publisher using aptitude by running the following command:
sudo aptitude -y install joint-state-publisher
How To Uninstall joint-state-publisher on Ubuntu 22.04
To uninstall only the joint-state-publisher package we can use the following command:
sudo apt-get remove joint-state-publisher
Uninstall joint-state-publisher And Its Dependencies
To uninstall joint-state-publisher and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove joint-state-publisher
Remove joint-state-publisher Configurations and Data
To remove joint-state-publisher configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge joint-state-publisher
Remove joint-state-publisher configuration, data, and all of its dependencies
We can use the following command to remove joint-state-publisher configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge joint-state-publisher
References
Summary
In this tutorial we learn how to install joint-state-publisher package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.