solution of ROS install issue

A Problem of Ubuntu installation of ROS Melodic

1 sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’

2 sudo apt-key adv –keyserver ‘hkp://keyserver.ubuntu.com:80’ –recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

if occur “gpg: keyserver receive failed: Connection timed out “

sudo su

curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -

or

gpg --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

B Open Anaconda Prompt (base):

  1. Update conda:
conda update -n base -c defaults conda

  1. Create new environment with Python 3.8:
conda create -n python38 python=3.8

  1. Activate your new Python 3.8 environment:
conda activate python38

  1. Start Python 3.8:
python

C Pip Usage

1 pip show numpy (pip3 show numpy )

 pip show numpy

Name: numpy
Version: 1.20.1
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /home/xerob/anaconda3/envs/python38/lib/python3.8/site-packages
Requires: 
Required-by: scs, scipy, qdldl, osqp, matplotlib, ecos, cvxpy

2 pip list (pip3 list)

pip show numpy

The showing is as follows:

Package                       Version
----------------------------- -------------------
actionlib                     1.12.1
angles                        1.9.12
bondpy                        1.8.5
camera-calibration            1.15.0
camera-calibration-parsers    1.11.13
catkin                        0.7.29
certifi                       2020.12.5
controller-manager            0.18.3
controller-manager-msgs       0.18.3
cv-bridge                     1.13.0
cvxopt                        1.2.6
cvxpy                         1.1.10
cycler                        0.10.0
diagnostic-analysis           1.9.7
diagnostic-common-diagnostics 1.9.7
diagnostic-updater            1.9.7
dynamic-reconfigure           1.6.3
ecos                          2.0.7.post1
gazebo-plugins                2.8.7
gazebo-ros                    2.8.7
gencpp                        0.6.5
geneus                        2.2.6
genlisp                       0.4.16
genmsg                        0.5.16

D Roscore issue

 << roscore

Command ‘roscore’ not found, but can be installed with: sudo apt install python-roslaunch

<< sudo apt install python-roslaunch

Reading package lists… Done

Building dependency tree

Reading state information… Done

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 solution of this issue is

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

OR

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

正文完