All reinstallation of ROS on Ubuntu

6 篇文章 0 订阅

This is my nightmare!!! Not because I got a new laptop, but because I have to reinstall everything I have on the old one, mainly ROS. Some of its packages are not well maintained and need much work like patching, editing. I triedthis. But it did not work out as many packages were not installed. OK. Cut the crap off and do my work. This time I will keep more detailed record of it, yes for "the rainy days".

Here I copy my old post and elaborate it.


1. back up
sudo su
cd /
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

2. uninstall ros

sudo apt-get autoremove ros-fuerte-*

delete ros-related folders

3. reinstall ros
http://www.ros.org/wiki/fuerte/Installation/Ubuntu


sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'

wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

sudo apt-get update

sudo apt-get install ros-fuerte-desktop-full

echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
. ~/.bashrc

source /opt/ros/fuerte/setup.bash

sudo apt-get install python-rosinstall python-rosdep


( E: Unable to correct problems, you have held broken packages. )
on the ros wiki fuerte says it does not support Maverick, Natty and Quantal
 here is a list of Ubuntu releases as I am not sure what 13.04 is. Well, 13.04 is not any of them.

 Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-fuerte-desktop-full : Depends: ros-fuerte-nodelet-core (= 1.6.5-s1363156399~precise) but it is not going to be installed
                           Depends: ros-fuerte-geometry-tutorials (= 0.1.3-s1363172233~precise) but it is not going to be installed
                           Depends: ros-fuerte-orocos-kinematics-dynamics (= 0.2.3-s1363134441~precise) but it is not going to be installed
                           Depends: ros-fuerte-filters (= 1.6.0-s1363156425~precise) but it is not going to be installed
                           Depends: ros-fuerte-slam-gmapping (= 1.2.7-s1363442967~precise) but it is not going to be installed
                           Depends: ros-fuerte-simulator-gazebo (= 1.6.16-s1363277489~precise) but it is not going to be installed
                           Depends: ros-fuerte-visualization (= 1.8.17-s1363254754~precise) but it is not going to be installed
                           Depends: ros-fuerte-vision-opencv (= 1.8.8-s1363172146~precise) but it is not going to be installed
                           Depends: ros-fuerte-perception-pcl (= 1.2.3-s1363171327~precise) but it is not going to be installed
                           Depends: ros-fuerte-geometry-experimental (= 0.2.3-s1363428141~precise) but it is not going to be installed
                           Depends: ros-fuerte-robot-model-visualization (= 0.1.2-s1363137612~precise) but it is not going to be installed
                           Depends: ros-fuerte-common-tutorials (= 0.2.3-s1363428031~precise) but it is not going to be installed
                           Depends: ros-fuerte-image-pipeline (= 1.8.5-s1363286138~precise) but it is not going to be installed
                           Depends: ros-fuerte-bfl (= 0.1.0-s1363131555~precise) but it is not going to be installed
                           Depends: ros-fuerte-diagnostics-monitors (= 1.4.3-s1363156028~precise) but it is not going to be installed
                           Depends: ros-fuerte-common-rosdeps (= 1.2.0-s1363114248~precise) but it is not going to be installed
                           Depends: ros-fuerte-geometry-visualization (= 0.1.1-s1363440861~precise) but it is not going to be installed
                           Depends: ros-fuerte-image-common (= 1.8.0-s1363251243~precise) but it is not going to be installed
                           Depends: ros-fuerte-bond-core (= 1.6.3-s1363138261~precise) but it is not going to be installed
                           Depends: ros-fuerte-python-qt-binding (= 0.1.9-s1363133191~precise) but it is not going to be installed
                           Depends: ros-fuerte-visualization-common (= 1.8.4-s1363138836~precise) but it is not going to be installed
                           Depends: ros-fuerte-physics-ode (= 1.8.0-s1363115659~precise) but it is not going to be installed
                           Depends: ros-fuerte-driver-common (= 1.4.0-s1363170248~precise) but it is not going to be installed
                           Depends: ros-fuerte-executive-smach (= 1.2.1-s1363428723~precise) but it is not going to be installed
                           Depends: ros-fuerte-stage (= 1.6.6-s1363172716~precise) but it is not going to be installed
                           Depends: ros-fuerte-dynamic-reconfigure (= 1.4.2-s1363139116~precise) but it is not going to be installed
                           Depends: ros-fuerte-image-transport-plugins (= 1.8.6-s1363276751~precise) but it is not going to be installed
                           Depends: ros-fuerte-xacro (= 1.6.1-s1363138338~precise) but it is not going to be installed
                           Depends: ros-fuerte-robot-model (= 1.8.1-s1363171689~precise) but it is not going to be installed
                           Depends: ros-fuerte-bullet (= 2.79-s1363132931~precise) but it is not going to be installed
                           Depends: ros-fuerte-pluginlib (= 1.8.0-s1363137358~precise) but it is not going to be installed
                           Depends: ros-fuerte-geometry (= 1.8.2-s1363156482~precise) but it is not going to be installed
                           Depends: ros-fuerte-visualization-tutorials (= 0.6.3-s1363276990~precise) but it is not going to be installed
                           Depends: ros-fuerte-executive-smach-visualization (= 1.0.2-s1363443072~precise) but it is not going to be installed
                           Depends: ros-fuerte-laser-pipeline (= 1.4.5-s1363240173~precise) but it is not going to be installed
                           Depends: ros-fuerte-robot-model-tutorials (= 0.1.2-s1363115899~precise) but it is not going to be installed
                           Depends: ros-fuerte-common (= 1.8.0-s1363428147~precise) but it is not going to be installed
                           Depends: ros-fuerte-diagnostics (= 1.6.4-s1363155975~precise) but it is not going to be installed
                           Depends: ros-fuerte-navigation (= 1.8.3-s1363428251~precise) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

could it be the version of Ubuntu since it is not precise. To downgrade 13.04 to 12.04 for better support? It is not wise to do that,
for downgrading could bring along disasters. Well, it is possible to downgrade that is not deniable. 


4. create a overlay

rosws init ~/fuerte_workspace /opt/ros/fuerte

source ~/fuerte_workspace/setup.bash

mkdir ~/fuerte_workspace/my_pkg

rosws set ~/fuerte_workspace/my_pkg

5. install packages
openni_launch:
sudo apt-get install ros-fuerte-openni-camera ros-fuerte-openni-launch
...
cp -r openni_launch /home/ying/fuerte_workspace/my_pkg/
cd /home/ying/fuerte_workspace/my_pkg/
mv openni_launch openni_launch_1
ok!

camera_calibration:
http://www.ros.org/wiki/camera_calibration/Tutorials/MonocularCalibration
the installation commands should be as follows:
$ rosdep install camera_calibration
$ rosmake camera_calibration


A problem popped up:
user@mobile-122:~/fuerte_workspace/my_pkg$ rosdep install camera_calibration
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
camera_calibration: Cannot locate rosdep definition for [pkg-config]

when I git clone link of image_pipeline
user@mobile-122:~/fuerte_workspace/my_pkg$ rosdep install camera_calibrationERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
camera_calibration: Cannot locate rosdep definition for [sensor_msgs]

Solution:
camera_calibration package exists in /opt/ros/fuerte/stacks/image_pipeline/
to make my own package, i just needed to
cp camera_calibration /home/user/fuerte_workspace/my_pkg
mv camera_calibration camera_calibration_1

in camera_calibration_1in manifest.xmlchange package name from camera_calibration to camera_calibration_1;in nodes foldermake the same change in all the .py files in src folder replace cameracalibrator.py file with my own editionperception_pcl/pcl_ros:to get perception_pcl from ros wiki: http://www.ros.org/wiki/pclsvn co http://svn.pointclouds.org/ros/branches/fuerte/perception_pcl/rosdep install perception_pclrosmake perception_pcl

 get make error:[rospack] error in backquote expansion for pcl_ros CMake Error at /Users/william/devel/ros/ros/core/rosbuild/public.cmake:125 (message): Failed to invoke rospack to get compile flags for package 'pcl_ros'. Look above for errors from rospack itself. Aborting. Please fix the broken dependency! Call Stack (most recent call first): /Users/william/devel/ros/ros/core/rosbuild/public.cmake:226 (rosbuild_invoke_rospack) CMakeLists.txt:4 (rosbuild_init) -- Configuring incomplete, errors occurred! make: *** [all] Error 1this is a bug of the pcl version before 1.6: https://code.ros.org/trac/ros-pkg/ticket/5243fix: apply the patch!


all the svn are invalid now because pcl svn does not have the repositories for them nowcp.
the package perception_pcl is in ros installation and it also has what i need most tools under pcl_ros.
so what i need to do is to make my own package.

roscd perception_pcl
cd ..
cp -r perception_pcl /home/user/fuerte_workspace/my_pkg
mv perception_pcl perception_pcl_1
rosmake perception_pcl_1


pcl:http://pointclouds.org/downloads/svn co ...compile: http://www.pointclouds.org/downloads/source.htmlcd pcl-1.6.0 && mkdir build && cd buildcmake -DCMAKE_BUILD_TYPE=Release .. makesudo make installpcl-trunk:svn co http://svn.pointclouds.org/pcl/trunk pcl-trunk
did as the website indicated, but I got compiling failure as below.
[ 16%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_grabber.cpp.o
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp: In member function ‘bool pcl::ImageGrabberBase::ImageGrabberImpl::getCloudVTK(size_t, sensor_msgs::PointCloud2&, Eigen::Vector4f&, Eigen::Quaternionf&) const’:
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:634:34: error: no match for ‘operator=’ in ‘cloud_color.pcl::PointCloud<pcl::PointXYZRGBA>::header.std_msgs::Header_<std::allocator<void> >::stamp = timestamp’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:634:34: note: candidate is:
/opt/ros/fuerte/include/ros/time.h:169:22: note: ros::Time& ros::Time::operator=(const ros::Time&)
/opt/ros/fuerte/include/ros/time.h:169:22: note:   no known conversion for argument 1 from ‘uint64_t {aka long unsigned int}’ to ‘const ros::Time&’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:670:28: error: no match for ‘operator=’ in ‘cloud.pcl::PointCloud<pcl::PointXYZ>::header.std_msgs::Header_<std::allocator<void> >::stamp = timestamp’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:670:28: note: candidate is:
/opt/ros/fuerte/include/ros/time.h:169:22: note: ros::Time& ros::Time::operator=(const ros::Time&)
/opt/ros/fuerte/include/ros/time.h:169:22: note:   no known conversion for argument 1 from ‘uint64_t {aka long unsigned int}’ to ‘const ros::Time&’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp: In member function ‘bool pcl::ImageGrabberBase::ImageGrabberImpl::getCloudPCLZF(size_t, sensor_msgs::PointCloud2&, Eigen::Vector4f&, Eigen::Quaternionf&, double&, double&, double&, double&) const’:
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:765:34: error: no match for ‘operator=’ in ‘cloud_color.pcl::PointCloud<pcl::PointXYZRGBA>::header.std_msgs::Header_<std::allocator<void> >::stamp = timestamp’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:765:34: note: candidate is:
/opt/ros/fuerte/include/ros/time.h:169:22: note: ros::Time& ros::Time::operator=(const ros::Time&)
/opt/ros/fuerte/include/ros/time.h:169:22: note:   no known conversion for argument 1 from ‘uint64_t {aka long unsigned int}’ to ‘const ros::Time&’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:810:28: error: no match for ‘operator=’ in ‘cloud.pcl::PointCloud<pcl::PointXYZ>::header.std_msgs::Header_<std::allocator<void> >::stamp = timestamp’
/home/user/fuerte_workspace/my_pkg/pcl-trunk/io/src/image_grabber.cpp:810:28: note: candidate is:
/opt/ros/fuerte/include/ros/time.h:169:22: note: ros::Time& ros::Time::operator=(const ros::Time&)
/opt/ros/fuerte/include/ros/time.h:169:22: note:   no known conversion for argument 1 from ‘uint64_t {aka long unsigned int}’ to ‘const ros::Time&’
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/image_grabber.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2

perception_pcl_unstable:eigen:roboearth:
Here's how i installed roboearth:
 www.ros.org/wiki/roboearth_stack 

1.

rosinstall ~/ros /opt/ros/fuerte 'http://www.ros.org/wiki/roboearth?action=AttachFile&do=get&target=roboearth.rosinstall'
That gave me an error, so i just downloaded the roboearth.rosinstall file and used the path to that instead of the url.
sudo apt-get install swi-prolog
sudo apt-get install libjson-java
sudo apt-get install libjson-glib-dev
sudo apt-get install swi-prolog-odbc


2.Added "source ~/ros/setup.bash" to the .bashrc (just like for the normal ros installation, don't know if that's necessary)

3.sudo apt-get install ros-fuerte-ias-common ros-fuerte-perception-pcl ros-fuerte-opencv2 ros-fuerte-octomap-mapping ros-fuerte-client-rosjava-jni libsuitesparse-devAnd what is important but not listed theresudo apt-get install ros-fuerte-knowrob

4.rosmake roboearthNow the rosmake should complain about errors in some .java-files. The path to those should be written in the error messages. In those filesyou need to changeimport de.tum.in.fipm.kipm.gui.visualisation.applets.CommunicationVisApplet;toimport edu.tum.cs.ias.knowrob.vis.applets.CommunicationVisApplet;(following the help on http://answers.ros.org/question/51730/re_comm-build-error-in-roboearth-installation-ros-fuerte-ubuntu-1204/)When all files are changed the rosmake should work without errors and therefore roboearth be installed.





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值