Unable to view tf trees in ros2

Hi,

I’m in the Navigation Rosject project (ros2). I’m unable to view the tf trees using rqt_tf_tree as the package is not found. I tried installing and sourcing the ros (humble) environment. But no luck.

user:~/ros2_ws$ ros2 run rqt_tf_tree rqt_tf_tree Package 'rqt_tf_tree' not found

Hi @karthiaru,

Can you please send a screenshot of your current directory? As of late, you can try to rebuild the package and see if it is inside your ‘install’ folder.

Regards,
Christian

Hi @karthiaru ,

I think the rosject environment is lacking the installation of rqt_tf_tree package.

Your error clearly explains that when the output says: Package 'xyz' not found.

Run the following commands to install the package:

cd ~
sudo apt update
sudo apt install ros-<distro>-rqt-tf-tree   # distro=humble [in your case]

ros-<distro>-rqt-tf-tree depends on ros-<distro>-rqt-gui package to also be installed.
In case rqt_tf_tree does not start, then you may have to install rqt_gui package also.
In that case, also install rqt_gui package:

cd ~
sudo apt update
sudo apt install ros-<distro>-rqt-gui 
sudo apt install ros-<distro>-rqt-gui-cpp ros-<distro>-rqt-gui-py

This should fix your problem.

Regards,
Girish

Hi @CCAnabeza

Please find the screenshot.
As an alternate option, I was able to view the tf tree in a pdf using ros2 run tf2_tools view_frames.

Thanks Girish. Installing the rqt-tf-tree package worked. I tried this earlier, but didn’t run sudo apt update, so it didn’t get installed.

Hi @karthiaru ,

Yes, you always need to run sudo apt update before installing or removing any on any Linux based distros that use apt as package manager.

If I am right, this is also applicable for other Linux distros that use non-apt package managers such as pacman, dnf, etc. It is just to retrieve an updated list of currently installed and functional packages on the Linux distro.

Regards,
Girish

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.