您的位置:首页 > 其它

ubuntu下使用ccmake和cmake版本工具实践

2014-07-10 15:55 645 查看
automake与autoconf 一起工作,用于生成configure Makefile。输入文件为Makefile.amcmake更进一步。而rosmake是在ros系统中对于cmake的封装使用。而catkin_make则为groovy之后更强大的版本工具。
cmake与ccmake(图形化界面)
sudo apt-get install cmake-curses-gui

[/code](This is on Debian but Ubuntu usually has the same packages; youmight possibly have to turn on the universe repository.)In general, use
apt-cache search
to find specificpackage names.

在 linux 下使用 CMake 构建应用程序

本文介绍了一个跨平台的自动化构建系统 CMake 在 linux 上的使用方法。 CMake 是一个比 automake 更加容易使用的工具,能够使程序员从复杂的编译连接过程中解脱出来。文中通过一些例子介绍使用 CMake 处理多源文件目录的方法、查找并使用其他开发包的方法以及生成 debug 版和 release 版程序的方法。
http://www.ibm.com/developerworks/cn/linux/l-cn-cmake/index.html
具体这里,需要做一个工作,就是将qbo_arduqbo驱动包安装到正常的ubuntu上来运行。需要做一个版本匹配工作。即将旧的rosmake包转换为catkin包让其能够运行。另一个方向,是将rbx1包安装到openqbo等这些使用rosmake的机器上来运行。新转旧的。这个意义不大,仅用于演示功能。用到了rosws工具。它是rosinstall工具包的一部分。rosws is part of the
rosinstall package. See py-rosws-stacks.cerel_port与qbo_cerel_ports differencemkdir: cannot create directory `build': Permission denied注意区别:chmod -r 777 src/audio_control 与chmod -r 777 src/audio_control/的差别。可通过ls -l 目录 来查看此级目录是否有写权限。遇到如下问题:/home/ppeix/tutorials/catkin_ws/src/qbo_arduqbo/src/controllers/srf10_controller.cpp:42:12: error: ‘sensor_msgs::PointCloud’ has no member named ‘set_points_size’/home/ppeix/tutorials/catkin_ws/src/qbo_arduqbo/src/controllers/srf10_controller.cpp:43:12: error: ‘sensor_msgs::PointCloud’ has no member named ‘set_channels_size’排查后发现由于elec和hydro版本之间的sensor_msgs/PointCloud.h定义有变化导致的。需要修改CPP源码,去掉对这两个成员函数的调用。sudo chmod 777 ../tutorials/catkin_ws/src/*scp connection refusedssh: connect to host 10.96.46.12 port 22: Connection refused需要安装服务模块openssh-server解决办法:sudo apt-get install ssh openssh-server[100%] Building CXX object CMakeFiles/qbo_listen.dir/src/julius.cpp.o/home/ppeix/tutorials/catkin_ws/src/qbo_listen/src/julius.cpp:18:30: fatal error: julius/juliuslib.h: No such file or directorycompilation terminated.juliussudo apt-get install juliussudo apt-get install libjulius-dev
Dependencies:
julius
libjulius-dev
libasound2-dev
Linking CXX executable ../bin/qbo_listenCMakeFiles/qbo_listen.dir/src/julius.cpp.o: In function `main':/home/ppeix/tutorials/catkin_ws/src/qbo_listen/src/julius.cpp:387: undefined reference to `ros::package::getPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'collect2: ld returned 1 exit statusmake[3]: *** [../bin/qbo_listen] Error 1The problem is solved...It seems that the roslib package isn't a dependency of roscpp anymore. Adding the roslib package as dependency to my package makes it linkable.roscpp manifest.xml in electric
...<dependpackage="roslib"/>
运行qbo_listen时,缺少一些必备的文件。经过比对github.com上的和openqbo上实际安装的内容。缺少qbo_listen/config 文件夹。

Qbo_julius_model

This is the Julius Acoustic and language Model PackageThese are the files included. But new languages could be added:
/usr/share/qbo-julius-model/en/hmmdefs
/usr/share/qbo-julius-model/en/lexicon
/usr/share/qbo-julius-model/en/phonems
/usr/share/qbo-julius-model/en/tiedlist
/usr/share/qbo-julius-model/es/hmmdefs
/usr/share/qbo-julius-model/es/lexicon
/usr/share/qbo-julius-model/es/phonems
/usr/share/qbo-julius-model/es/tiedlist
还有上面的内容。
还需要额外安装libjulius-dev包,来解决缺少julius/juliuslib.h头文件的问题。这个可以根据qbo_listen的dependency list来实际安装。
recog= j_create_instance_from_jconf(jconf);
j_adin_init(recog)
boolean
00186 adin_initialize(Recog *recog)00199 jlog("STAT: ###### initialize input device\n");
00200
00201 /* select input device: file, mic, netaudio, etc... */
00202 if (adin_select(adin, jconf->input.speech_input) == FALSE) {
00203 jlog("ERROR: m_adin: failed to select input device\n");
00204 return FALSE;
00205 }

adin_oss_begin中打印出adin_oss:
adin_alsa_begin中打印出adin_alsa:
而具体调用哪一个,用的是:
./libsent/src/adin/adin_mic_linux.c中的adin_mic_open.这里面是用宏定义来区分的。
看来,编译的时候,需要制定是HAS_ALSA呢还是指定HAS_OSS或者是HAS_PULSEAUDIO或者是HAS_ESD.
典型问题:openqbo上重新编译qbo_audio_control时 rosmake 显示成功,但qbo_audio_control执行文件没有更新。
1.屏蔽Speaker处代码。rosmake显示正常。但roslaunch qbo_audio_control 提示仍找不到Speaker。
2.qbo_audio_control.cpp文件中添加错误代码。再次rosmake 仍显示成功。
3. 发现多了一个ROS_NOBUILD文件。通过rosmake -h 看到通过rosmake -i或--mark-installed可以设置该文件。用于标记包已经安装过。因此这里如果需要重新安装,就要删掉ROS_NOBUILD文件,然后再rosmake编译。删除操作可通过rosmake -u或--unmark-installed来实现。
4.删掉ROS_NOBUILD文件之后,rosmake qbo_audio_control可以正常运行。遇到mkdir permission denied问题。将qbo_audio_control的整个目录777模式即可。

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: