ROS:使用Qt Creator创建GUI程序(三)之stellax_gui_ws源码编译

开发环境:

Ubuntu14.04

ROS indigo version

Qt Creator 3.0.1 based on Qt 5.2.1

ROS相关包安装:参照ros_by_example(indigo)书中第五章,安装必要的包:

$ sudo apt-get install ros-indigo-turtlebot-bringup \ ros-indigo-turtlebot-create-desktop ros-indigo-openni-* \ ros-indigo-openni2-* ros-indigo-freenect-* ros-indigo-usb-cam \ ros-indigo-laser-* ros-indigo-hokuyo-node \ ros-indigo-audio-common gstreamer0.10-pocketsphinx \ ros-indigo-pocketsphinx ros-indigo-slam-gmapping \ ros-indigo-joystick-drivers python-rosinstall \ ros-indigo-orocos-kdl ros-indigo-python-orocos-kdl \ python-setuptools ros-indigo-dynamixel-motor-* \ libopencv-dev python-opencv ros-indigo-vision-opencv \ ros-indigo-depthimage-to-laserscan ros-indigo-arbotix-* \ ros-indigo-turtlebot-teleop ros-indigo-move-base \ ros-indigo-map-server ros-indigo-fake-localization \ ros-indigo-amcl git subversion mercurial

以及rbx1 repository,确保程序运行时不会出现找不到相应的包:

$ cd ~/rbx_ws/src

$ git clone https://github.com/pirobot/rbx1.git

$ cd rbx1$ git checkout indigo-devel$ cd ~/rbx_ws

$ catkin_make$ source ~/rbx_ws/devel/setup.bash

$ rospack profile

源码示例:查看源码main_window.cpp,部分截图如下:

// 注意上图黄色部分中souce的路径,检查是否与自己安装的路径一致!其余souce路径也一样,需匹配自己安装的路径!

程序运行截图:

stellax_gui_ws源码地址:https://github.com/ChenHuman/stellax_gui_ws

猜你喜欢

转载自www.cnblogs.com/yiluyisha/p/9002444.html