Ubuntu customized shortcut

Installation:
– Add keybindings foler to ~/.gconf/desktop/gnome/ (ubuntu 12.04 location for custom shortcut)
– Then logout and login again

 

Write .sh file for each shortcut binding.

——————————————–

DRC example code:

///////////////////////////////////// .sh file

#!/bin/bash
# store current mouse position
eval $(xdotool getmouselocation –shell)
# select rviz
/home/atlas/sf/cmdtools/material/shortcuts/shortcut/select/select_rviz.sh
# select used as box
/home/atlas/sf/cmdtools/material/shortcuts/shortcut/select/select_point_used_as.sh
# select handle
sleep 0.2;
xdotool type “h”;
xdotool key Return;
# click publish
/home/atlas/sf/cmdtools/material/shortcuts/shortcut/select/select_publish_point.sh
# restore mouse position
xdotool mousemove $X $Y;

 

 

——————————————–

xdotool examples:

/////////////////

xdotool click 1; 

//////////////////

xdotool key Down;

bash file opens terminal

Question:

1. open at a certain location

2. windows size

3. stay open

Solution:

gnome-terminal –geometry=55×55+20+25 –execute bash -c “rosrun rviz rviz ; bash” &
gnome-terminal –geometry=55×55+1800+25 –execute bash -c “roslaunch door_detector_node door_detector.launch ; bash” &

understand: include is for header, lib is for linker

Sum:

include is for header,

lib is for linker(library)

Note: the name “include” header.h ;  linker to a “lib”

make sense now !

 

Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Includes

  1. Go to Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Includes, and add the source OpenCV folder “C:\OpenCV245PC\build\include”
  2. Go to Project > Properties > C/C++ Build > Settings > MinGW C++ Linker > Libraries, and add to theLibraries (-l) ONE BY ONE (this could vary from project to project, you can add all of them if you like or some of them just the ones that you need for your project): opencv_calib3d245 opencv_contrib245 opencv_core245 opencv_features2d245 opencv_flann245 opencv_gpu245 opencv_highgui245 opencv_imgproc245 opencv_legacy245 opencv_ml245 opencv_nonfree245 opencv_objdetect245 opencv_photo245 opencv_stitching245 opencv_video245 opencv_videostab245
  3. Add the built OpenCV library folder, “C:\OpenCV245MinGW\x86\lib” to Library search path (-L).
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>

pcl : tutorial filter

problem:

undefined reference:

1. check if pcl lib is installed

2. CMakeList.txt, change REQUIRE to 1.7

3. make sure the names in the CMakeList.txt are fine, including the add_execuatelb(xxx,src/xxx.cpp)

4. (solution)delete build folder, build again! the previous make file could had a wrong lib path somehow.