Abstract: The most annoying parts are the tiny parts break you developing flow when dealing with the environments. This blog helps you to fix some common problems but hard to find especially when you don't know Linux very well. They are all my past pains, please leave the comments below to tell me your experience.
ROS [Package] node not shown
There are two cases to make a package, one is the node inside a catkin workspace, the another one is the node stays in a single python package.
For the first one you need to source the
devel/setup.bash', for the second one, you need to add the package path to yourbashrc` manually.
Check the list first when facing the trouble:
- If using catkin,
source <PATH_TO_WS>/devel/setup.bashin your
- If using single package
- Is the python node executable? If not ->
sudo chmod +x <path_to_node.py>
If you build a package from source and after you source the setup.bash you are not finding anything about it do:
When you source the
setup.bash, make sure there is not another bash e.g.
setup.bash after you export because 99% it will overwrite the path you exported. (the Clearpath tutorial package does it!)
ROS [Catkin Make] cannot find custom message module (python)
Deadly-Simple to solve but deadly-hard to locate the issue.
When you made a custom message and try to import the message, if you have a file with the same package name, which happens a lot, the Python will first look for the message module in that same name python file instead of the package msg folder.
If it still not finding the msg after you renaming it. Delete all your
pyc files. Every time you use python import, it will generate a
pyc lib for importing. Because of the naming issue, if you change the python file to another name so no file is related to the old
pyc and it will not be removed after you rebuild thus the system is still linked to it. So make sure you delete the
ROS [Roslaunch] Auto-complete with ending tail '/'
If you use roslaunch with
tab auto complete and the package name end with a tail `/', probably because the current folder you are in has a real directory that is the package name. The Linux CLI will first auto complete base on the directory info and then search for the ROS packages.
ROS [Time] Update Sync
This may happen when you are running ROS on different machines
sudo service ntp stop sudo ntpdate -s time.nist.gov sudo service ntp start
If you don’t have ntp or ntpdate, install them.
ROS [Indigo] OpenCV Dependency
On ROS Indigo, the OpenCV does not come with ROS but you can install it with the
ros-indigo-opencv package and of course you can build it from source but the only reason should be you want the non-free version library, or, the improved UI window. Start from ROS Kinetic, the OpenCV comes from with it. Also, be noticed, the iPython3 is not bounded with ROS so if you want the tab complete function, you should you iPython.