Why ROS cannot find my executable when it is at the right place?
Why ROS cannot find my executable when it is at the right place?
I am using melodic, ubuntu-18.04.
I have a file in /opt/ros/melodic/lib/tf/static_transform_publisher which is executable.
I checked it and found it to be binary executable with execute permission for all.
My package can be correctly located by ros.
$ rospack find tf
The output is: /opt/ros/melodic/share/tf
Now if I try to run the executable
$ rosrun tf static_transform_publisher
The output is:
[rosrun] Couldn't find executable named static_transform_publisher below /opt/ros/melodic/share/tf
I do not understand why it cannot find the desired file? I understand all executables of a package are located in /opt/ros/melodic/lib folder while the package itself is located in corresponding shared folder.
I also tried:
$ rosrun tf2 static_transform_publisher
But in that package, no executables exist.
There is another executable under package tf2_ros with same name. I can run it with rosrun command and tf2_ros as package name?
The documenttion tells me that tf2 has superceeded tf. But then what is tf2_ros?
So, pleae help me answer the question, why I cannot locate the executable either under tf or tf2.
Note: I had accidentally deleted ~/.ros folder. If that is the problem, How can I reconstruct it.
I do not find any other abnormality in ros behavior due to deletion of this file, which has been created again.