Understanding of ROS has increased! Some ROS tools I learnt to use, and notes on them.
I moved my files around. Everything ROS-related is located in ~/ros/, with a bash function ros to source the ROS shell scripts. I could not place Kalibr under ~/ros/src/ (catkin gave errors), so I put it in ~/ros/repos/. However, due to hardcoded file names, I have to rebuild Kalibr (~3 hrs, I also got a Python ImportError for module sm).
Nice ROS tools to remember:
rosrun rqt_console rqt_consolefor message viewing. You can also filter messages.rosrun rqt_gui rqt_guifor data visualization. If you want to visualize a topic that does not give „a green plus”, look for the sub-topic. For instance, Visualization/Plot does not allow you to add/imu/databut you are allowed to add/imu/data/linear_accelerationand/imu/data/angle_velocity. Avoidrosrun image_view image_view, as it is buggy; use RQT’s Image View.rostopic listlists all topics (-vgives you the message types), androstopic echo TOPICNAMEstreams its contents to the terminal.rosnode cleanupcleans up inactive nodes (or node handlers) and removes their topics.rosed PACKAGE FILENAMElets you edit a file from a package, withoutcd‚in to it.roslaunch personal_sandbox imu_and_cameras.launchis my launch file to start publishing the data of the IMU (using a Xsens MTi withxsens_driver), my laptop camera and an external Logitech C910 (both usinguvc_camera).
I also tried to use RViz through rosrun rviz rviz, but that gives an error:
$ rosrun rviz rviz
/opt/ros/indigo/lib/rviz/rviz: error while loading shared libraries: libboost_thread.so.1.53.0: cannot open shared object file: No such file or directory
After googling, I found out that this means that I should install libboost_thread version 1.53, instead of 1.54… I’m happy enough with rqt_gui.
While the ROS documentation states that camera_calibration should be started as rosrun camera_calibration cameracalibrator.py ARGUMENTS, I could only start it as cameracalibrator.py ARGUMENTS after sourcing ROS’s shell script. When calibrated, copy the output to ~/.ros/camera_config/CAMERA_NAME.ini and convert it to YAML with rosrun camera_calibration_parsers convert CAMERA_NAME.ini CAMERA_NAME.yaml.
I am not sure if I made the right camera settings file for Kalibr to calibrate the camera with the IMU. I have not set T_cam_imu and timeshift_cam_imu, as I want to discover these (whole point of calibration).
Command to execute next time (after Kalibr compilation):
ros
rosrun kalibr kalibr_calibrate_imu_camera --time-calibration --bag bags/2014-09-03_calibration_MTi_Logitech.bag --cam repos/kalibr/config/camera/logitech.yaml --imu repos/kalibr/config/imu/MTx.yaml --target repos/kalibr/config/calibration_target/checkerboard.yaml
Kalibr finished compiling. First two runs it failed at ~72%, third run (without any change) it worked. Maybe it has to do something with downloading suitesparse? Anyway, issues encountered with this command:
- Python can’t find module
sm. Fixed by runningpython setup.py installin~/ros/repos/kalibr/src/Schweizer-Messer/sm_python/. - Python can’t find module
numpy_eigen. Fixed by runningpython setup.py installin~/ros/repos/kalibr/src/Schweizer-Messer/numpy_eigen/. - Python can’t find module
libnumpy_eigen. This seems to be a structural issue. Needs a better approach of fixing.