How do you install tf_transformations?
I've recently been following the ROS 2 Galactic tutorials and I've reached "Introduction to tf2". I wasn't able to install the demos with sudo apt-get install ros-galactic-turtle-tf2-py
for some reason, so I tried building from source. But I can't seem to install a package I appear to be missing.
Here's how I set up the workspace:
$ mkdir -p min_ws/src
$ cd min_ws/src/
$ git clone https://github.com/ros/geometry_tutorials.git -b ros2
Cloning into 'geometry_tutorials'...
remote: Enumerating objects: 614, done.
remote: Counting objects: 100% (195/195), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 614 (delta 101), reused 112 (delta 48), pack-reused 419
Receiving objects: 100% (614/614), 118.59 KiB | 499.00 KiB/s, done.
Resolving deltas: 100% (320/320), done.
$ cd ..
$ rosdep install -i --from-path src --rosdistro galactic -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
turtle_tf2_py: Cannot locate rosdep definition for [tf_transformations]
I have tried searching for where this package to see how to install it but nothing came up. I have also tried
sudo apt install tf_transformations
sudo apt install python-transforms3d-pip
sudo apt install transforms3d
(I have done pip3 install transforms3d
already)
I tried to move on but as we expect, the node runs into
ModuleNotFoundError: No module named 'tf_transformations'
Here's a snippet from ros2 doctor --report
PLATFORM INFORMATION
system : Linux
platform info : Linux-5.11.0-22-generic-x86_64-with-glibc2.29
release : 5.11.0-22-generic
processor : x86_64
RMW MIDDLEWARE
middleware name : rmw_cyclonedds_cpp
ROS 2 INFORMATION
distribution name : galactic
distribution type : ros2
distribution status : active
release platforms : {'rhel': ['8'], 'ubuntu': ['focal']}
EDIT: Added info on how I set up the workspace, and how I called rosdep
.
In response to @tfoote's comment:
$ sudo apt install ros-galactic-tf-conversions
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-galactic-tf-conversions
$ sudo apt install ros-galactic-tf2-conversions
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-galactic-tf2-conversions
I'm not sure how, but I guess there's something wrong with my installation. Here is what I did before:
sudo apt install ros-galactic-desktop
sudo apt install python3-colcon-common-extensions
Adding to .bashrc
:
$ cat ~/.bashrc | tail -n 10
## ROS sourcing
# ROS 2 core - underlay
source /opt/ros/galactic/setup.bash
# colcon_cd
source /usr/share/colcon_cd/function/colcon_cd.sh
# Where ROS stack is
export _colcon_cd_root=~/ros2_install
# Choose ROS_DOMAIN_ID
export ROS_DOMAIN_ID=0
Seems like I have some tf2
stuff, but not ros-galactic-tf-conversions
:
$ sudo apt list --installed | grep "ros-galactic-tf"
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ros-galactic-tf2-bullet/focal,now 0.17.2-1focal.20210701.001325 amd64 [installed,automatic]
ros-galactic-tf2-eigen-kdl/focal,now 0.17.2-1focal.20210630.230132 amd64 [installed,automatic]
ros-galactic-tf2-eigen/focal,now 0.17.2-1focal.20210701.001337 amd64 [installed,automatic]
ros-galactic-tf2-geometry-msgs/focal,now 0.17.2-1focal.20210701.001341 amd64 [installed,automatic]
ros-galactic-tf2-kdl/focal,now 0.17.2-1focal.20210701.001149 amd64 [installed,automatic]
ros-galactic-tf2-msgs/focal,now 0.17.2-1focal.20210630.224910 amd64 [installed,automatic]
ros-galactic-tf2-py/focal,now 0.17 ...