ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'm not certain why you can't run the static_transform_publisher
from tf
(wiki). Since rospack
can find the package, I'm assuming you sourced /opt/ros/melodic/setup.bash
, but a double-check couldn't hurt. Something else may be wrong with the installation.
In any case, tf
has been deprecated in favor of tf2
(wiki) as you noted. As mentioned in the tf
wiki, that package now just wraps tf2
but still exists for maintaining legacy code. New code should use tf2
. Further, tf2_ros
(wiki) contains the ROS bindings (C++ and Python) for the tf2
package and includes things like tf2_ros::TransformBroadcaster
and tf2_ros::Buffer
(see wiki for more information). The main thing is that tf2
is independent of ROS, so tf2_ros
provides an API for ROS coders. tf2_ros
also includes a static_transform_publisher
, which replaces the one from tf
. There is no such executable in tf2
.
In summary, if the static_transform_publisher
from tf2_ros
works for you, you can use that one. For example:
rosrun tf2_ros static_transform_publisher 1 0 0 0 0 0 /frame_1 /frame_2
Lastly, deleting the .ros
directory shouldn't affect the installed packages/executables.
If I've misinterpreted any of your questions or failed to clarify something, please let me know :).