[0354]★★_CDNを変更してみる

cd /home/pi/gopigo_ws/src/webjoy_example/www




を、下記に書き換える
https://groups.google.com/forum/m/#!msg/robot-web-tools/plGsZWwtNv8/1M3QCCV3AgAJ
を参照しました!




で、どうだ!?

★★★★★★★★★★ここまでのコマンド★★★★★★★★★★★
roscore
rosrun libuvc_camera camera_node
rosrun web_video_server web_video_server
roslaunch rosbridge_server rosbridge_websocket.launch
roslaunch roswww roswww.launch

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
一発で起動するコマンド
roslaunch webjoy_example webjoy_example.launch
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

■■■■■■■■■■■■■■■■■■■■■■■■
http://192.168.0.10:8080/stream_viewer?topic=/image_raw
■■■■■■■■■■■■■■■■■■■■■■■■
http://192.168.0.10:8085/webjoy_example/index.html
http://192.168.0.12:8085/webjoy_example/index.html
■■■■■■■■■■■■■■■■■■■■■■■■

よっしゃー!!!(映った!!!)

ここでいよいよ、
「ROSでgopigo3を走らせる」
https://qiita.com/cut0ter/items/0326f5dee89456e47001
をマージしてみる!

roscore
python gopigo3_ros.py
で動く準備ができているから・・・・

同じようにしてみる・・・・

rosでモーターを動かす.
~/Dexter/GoPiGo3/Software/Python
ディレクトリにモーター制御のコードを書いていく
https://qiita.com/cut0ter/items/0326f5dee89456e47001
ファイル名は、
gopigo3_ros.py
で、下記コマンドを追加!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
roscore
rosrun libuvc_camera camera_node
rosrun web_video_server web_video_server
roslaunch rosbridge_server rosbridge_websocket.launch
roslaunch roswww roswww.launch
python gopigo3_ros.py  <===追加!!!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

OK!!!動いた!映った!!!!!

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
一発で起動するコマンド も修正!
でも難しいから、当面は2行コマンドでやろう・・・・・
roslaunch webjoy_example webjoy_example.launch
python /home/pi/Dexter/GoPiGo3/Software/Python/gopigo3_ros.py
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

[0353]★★★_piでubuntuやってみる

■[0331]

[0331]_ROSkineticをUbuntu16.04にインストール


を参考に

———————–
Ubuntu1604の焼き付け
———————–
SD Card準備
———————–
日本語locale設定
———————–
http://www.dreamedge.net/archives/111
# apt-get install language-pack-ja
$ export LANG=ja_JP.UTF-8
# update-locale LANG=ja_JP.UTF-8
$ LANG=C xdg-user-dirs-gtk-update

———————–
SSH設定
———————–
ssh Serverをインストールします。
$ sudo apt-get install ssh
インストール後 デーモンを起動
$ sudo /etc/init.d/ssh start
これでリモートから接続可能になりました。
自動起動のセットも。
$ sudo vi /etc/rc.local
rc.local
#!/bin/sh -e
・・・・・
# By default this script does nothing.
sudo /etc/init.d/ssh start <----を追加!! exit 0 ----------------------- ubuntuで無線LAN設定 ----------------------- https://askubuntu.com/questions/775597/how-to-use-onboard-wifi-on-raspberry-pi-3-with-ubuntu-server-16-04 が参考になりそう $ lsusb $ sudo apt-get install wireless-tools $ sudo apt-get install wpasupplicant add to /etc/network/interfaces: --------------- auto wlan0 iface wlan0 inet dhcp wpa-essid smile wpa-psk 9D5BE022868CF ----------------------- sudo apt-get update sudo apt-get upgrade -------------------- Raspberry Pi の I2C を有効化 -------------------- $ sudo apt-get update $ sudo apt-get install i2c-tools 初期設定画面を起動します。 $ sudo raspi-config ■ROSkineticをUbuntu16.04にインストールする http://blog.livedoor.jp/gigakosuto-research/archives/803548.html https://codezine.jp/article/detail/9829?p=5 を参考に $ sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list’
$ sudo apt-key adv –keyserver hkp://ha.pool.sks-keyservers.net:80 –recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-desktop-full
(sudo apt-get install ros-kinetic-desktop)
(時間かかるワ・・)

rosdepのインストールと初期化
$ sudo apt-get install python-rosdep
$ sudo rosdep init
$ rosdep update

ROSの環境変数をシステムに反映
$ echo “source /opt/ros/kinetic/setup.bash” >> ~/.bashrc
$ source ~/.bashrc

rosinstallのインストール
$ sudo apt-get install python-rosinstall

(なんとか、roscoreまで動いた!)

(これ、飛ばす・・・)
■8.ワークスペースの設置
①ホームディレクトリにワークスペースを設置する。
($ rosws init ~/workspace /opt/ros/kinetic)
$ rosws init ~/gopigo_ws /opt/ros/kinetic

②サンドボックスディレクトリの作成
($ mkdir ~/workspace/sandbox)
$ mkdir ~/gopigo_ws/src

sandboxディレクトリを作成したことでワークスペースの構成要素が変更されたので、setup.bashを読み込む。
($ source ~/workspace/setup.bash)
$ source ~/gopigo_ws/setup.bash

③そしてroswsを使ってパッケージディレクトリとして登録する。
$ rosws set ~/workspace/sandbox
$ rosws set ~/gopigo_ws/src

再度setup.bashを読み込みパス登録
$ source ~/workspace/setup.bash
$ source ~/gopigo_ws/setup.bash

※設定後のパスは次のコマンドで確認
echo $ROS_PACKAGE_PATH
結果は次のようになることを確認。
 /home/your_user_name/workspace/sandbox:/opt/ros/kinetic/share
(はい、なってます。。。ありがとうございます!)

■ROSでgopigo3を走らせる
https://qiita.com/cut0ter/items/0326f5dee89456e47001
を参考に
gopigo3のドライバをインストールする
sudo curl -kL dexterindustries.com/update_gopigo3 | bash

sudo reboot

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

The directory ‘/home/pi/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

The directory ‘/home/pi/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied (use –upgrade to upgrade): numpy in /usr/lib/python2.7/dist-packages

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

The directory ‘/home/pi/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

The directory ‘/home/pi/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied (use –upgrade to upgrade): numpy in /usr/lib/python3/dist-packages

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

==========モータ動作は後で試す、まずはカメラを=============

cd ~/Dexter/GoPiGo3/Software/Python/Examples
python easy_Motors.py #これでモーターが動いたらインストール完了

(これ、飛ばす・・・ここから再開・・・・)
■【3】GoPiGoのROS用ドライバーを入れる
多分、ropigoのインストールで以下も必要と思う・・・・
$ sudo apt-get install build-essential tmux vim -y
$ mkdir ~/gopigo_ws
$ cd ~/gopigo_ws
$ wget https://raw.githubusercontent.com/ros-gopigo/rosinstall-repo/master/ros-gopigo.rosinstall
$ wstool init src ros-gopigo.rosinstall
$ rosdep install –from-paths src –ignore-src –rosdistro $ROS_DISTRO

$ catkin_make
(catkin_makeが通ればビルド完了)

ビルド済みバイナリをROSで使えるように、そのパスを.bashrcに書き込んでいます
$ echo “source ~/gopigo_ws/devel/setup.bash” >> ~/.bashrc
$ source ~/.bashrc

■[0333]WebCameraまでOK、モータ動かず
https://codezine.jp/article/detail/10068
を参考に

【1】準備
必要なROSパッケージのインストール

$ sudo apt-get update
(Indigoでなくてkineticだよ!)
$ sudo apt-get install ros-indigo-rosbridge-suite ros-indigo-roswww ros-indigo-libuvc-camera ros-indigo-web-video-serve
なので、、、上記でなくて・・・(エラーになる)
$ sudo apt-get install ros-kinetic-rosbridge-suite ros-kinetic-roswww ros-kinetic-libuvc-camera ros-kinetic-web-video-server
を実施
$ rospack profile

新規に/etc/udev/rules.d/99-uvc.rulesというファイルを作り、下記をコピペ
$ sudo vi /etc/udev/rules.d/99-uvc.rules
SUBSYSTEMS==”usb”, ENV{DEVTYPE}==”usb_device”, ATTRS{idVendor}==”046d”, ATTRS{idProduct}==”0825″, MODE=”0666″

ROSマスターの起[[8動
$ roscore
次に、カメラ画像を取得するためにカメラノードを起動します。
USBカメラノードを起動
$ rosrun libuvc_camera camera_node
前回解説したように、コマンドラインでノード名の一覧を表示しましょう。カメラノード名を確認します。
ノード名の一覧表示
$ rosnode list
/libuvc_camera
/rosout

動画ストリーミングサーバ起動
$ rosrun web_video_server web_video_server
[ INFO] [1490083960.186788634]: Waiting For connections on 0.0.0.0:8080

http://GoPiGoのIPアドレス:8080/stream_viewer?topic=/image_raw
http://192.168.0.10:8080/stream_viewer?topic=/image_raw
http://192.168.0.12:8080/stream_viewer?topic=/image_raw
(OK!映っている!!)

https://codezine.jp/article/detail/10068?p=3
スマホからGoPiGoを操作できるようにする
を参考に

新規パッケージの作成
$ cd ~/gopigo_ws/src
$ catkin_create_pkg webjoy_example

webjoy_exampleフォルダ内にコピーして、以下の構成になるようにしてください。
webjoy_example
├── CMakeLists.txt
├── launch
│ └── webjoy_example.launch
├── package.xml
└── www
├── index.html
└── webjoy.js

パッケージのビルドと読み込み
$ cd .. && catkin_make

$ source ~/gopigo_ws/devel/setup.bash
(source ~/workspace/devel/setup.bash)
Webサーバの起動
$ roslaunch roswww roswww.launch

Webサーバの起動後、下記にアクセスしてみましょう。
http://GoPiGoのIPアドレス:8085/webjoy_example/index.html
なので
(http://192.168.0.10:8085/webjoy_example/index.html)
http://192.168.0.12:8085/webjoy_example/index.html

★★★★★★★★★★ここにgopigo3のドライバをインストール★★★★★★★★★★★

★★★★★★★★★★★★★★★
(おおお!、ついに書いてくれたあ!!!!)
https://qiita.com/cut0ter/items/0326f5dee89456e47001
参考
★★★★★★★★★★★★★★★

GoPiGo3 Tutorials & Documentation

sudo curl -kL dexterindustries.com/update_gopigo3 | bash
sudo reboot

cd ~/Dexter/GoPiGo3/Software/Python/Examples
python easy_Motors.py #これでモーターが動いたらインストール完了
(うん、動いた!OK!)

cd /home/pi/gopigo_ws
sudo curl -kL dexterindustries.com/update_gopigo3 >> update_gopigo3.sh

cd ~/Dexter/GoPiGo3/Software/Python
vi gopigo3_ros.py

==============================
以下、頂いたコード(gopigo3_ros.py)
==============================
#!/usr/bin/env python

import rospy
import math
from std_msgs.msg import Int16
from geometry_msgs.msg import Twist
import easygopigo3 as easy

gpg = easy.EasyGoPiGo3()

def callback(data):
t = data.linear.x;
r = data.angular.z;

mag = math.sqrt(pow(t,2)+pow(r,2));

if mag <= 0.1: motor1(0); motor2(0); else: m1 = 0; m2 = 0; m1 = t/mag * abs(t); m2 = t/mag * abs(t); m1 += r/mag * abs(r); m2 += -r/mag * abs(r); m1 = m1/abs(m1) * min(abs(m1), 1.0); m2 = m2/abs(m2) * min(abs(m2), 1.0); motor1(m1*255) motor2(m2*255) def motor1(dps): gpg.set_motor_dps(gpg.MOTOR_RIGHT, dps) def motor2(dps): gpg.set_motor_dps(gpg.MOTOR_LEFT, dps) def listener(): rospy.init_node('listener', anonymous=True) rospy.Subscriber("cmd_vel", Twist, callback) lwheel = rospy.Publisher("lwheel", Int16, queue_size=1) rwheel = rospy.Publisher("rwheel", Int16, queue_size=1) init_encoders = gpg.read_encoders() init_lwheel = init_encoders[0] init_rwheel = init_encoders[1] r = rospy.Rate(20) while not rospy.is_shutdown(): encoders = gpg.read_encoders() lwheel.publish(encoders[0] - init_encoders[0]) rwheel.publish(encoders[1] - init_encoders[1]) r.sleep() motor1(0) motor2(0) if __name__ == '__main__': listener() ============================== ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ http://192.168.0.9:8085/webjoy_example/index.html ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ 一発で起動するコマンド も修正! でも難しいから、当面は2行コマンドでやろう・・・・・ roslaunch webjoy_example webjoy_example.launch (ubuntu #2はこっち↓) python /home/pi/Dexter/GoPiGo3/Software/Python/gopigo3_ros.py (ubuntu #1はこっち↓) python /home/pi/GoPiGo3/Software/Python/gopigo3_ros.py ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ <<<<以下はm、いらないかも・・・(苦労話だけ・・)>>>> ★★★★★★★★★★ここまでのコマンド★★★★★★★★★★★ roscore rosrun libuvc_camera camera_node rosrun web_video_server web_video_server roslaunch rosbridge_server rosbridge_websocket.launch roslaunch roswww roswww.launch roslaunch ropigo ropigo.launch ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ 一発で起動するコマンド roslaunch webjoy_example webjoy_example.launch ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ /home/pi/workspace/sandbox に webjoy_example ├── CMakeLists.txt ├── launch │ └── webjoy_example.launch ├── package.xml └── www ├── index.html └── webjoy.js を構築してみる・・・ ==========ここから============= /home/pi/workspace/ で 作ってみる。 $ wget https://raw.githubusercontent.com/ros-gopigo/rosinstall-repo/master/ros-gopigo.rosinstall $ wstool init src ros-gopigo.rosinstall $ rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO $ catkin_make (catkin_makeが通ればビルド完了) gopigo_ws以下のパッケージをROSに読み込み $ echo "source ~/workspace/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

でどうか?(ダメかあ・・・・・・・・)

core service [/rosout] found
process[roswww-1]: started with pid [2889]
2017-11-22 22:03:28,835 – roswww – INFO – roswww : # of packages : 181
2017-11-22 22:03:28,836 – roswww – INFO – roswww : Weg Page root : www
2017-11-22 22:03:29,110 – roswww – INFO – roswww : Initialised
2017-11-22 22:03:29,111 – roswww – INFO – roswww : Attempting to start webserver on port 8085
2017-11-22 22:03:29,119 – roswww – INFO – roswww : Webserver successfully started on port 8085
WARNING:tornado.access:404 GET /webjoy_example/index.html (192.168.0.12) 5.38ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 4.93ms
WARNING:tornado.access:404 GET /webjoy_example/index.html (192.168.0.12) 2.82ms
WARNING:tornado.access:404 GET /webjoy_example/index.html (192.168.0.12) 5.87ms

==========ここから=============
Unable to read from GoPiGo (errno 9): Bad file descriptor
Unable to read from GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor
Unable to read from GoPiGo (errno 9): Bad file descriptor
Unable to read from GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor
Unable to read from GoPiGo (errno 9): Bad file descriptor
Unable to read from GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor
Error writing to GoPiGo (errno 9): Bad file descriptor

==========まだまだ=============
なんちゃらファイルの読み込みができてないみたいなので、
i2c-1が+rwできてないから、そのファイルの復活(っていうか見える化)から。

https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q11144293451
を参考
/boot/config.txt
の末尾に
dtparam=i2c_arm=on
を追加して、
/etc/modules
の末尾に
i2c-dev
を追加して、リブートします。
わたしの、Raspberry PI 2 は、これで、
/dev/i2c-1
が出来ましたよ。

==========まだまだ=============
WARNING:tornado.access:404 GET /webjoy.js (192.168.0.12) 3.07ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 2.72ms

WARNING:tornado.access:404 GET /webjoy_example/www/webjoy.js (192.168.0.12) 4.18ms
WARNING:tornado.access:404 GET /webjoy_example/www/webjoy.js (192.168.0.12) 3.23ms
WARNING:tornado.access:404 GET /webjoy_example/www/webjoy.js (192.168.0.12) 3.42ms

WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 2.87ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 2.66ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 5.48ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 5.80ms

==========まだまだ=============
(11/24)
Nodejsをインストールしたけど・・・・
http://co.bsnws.net/article/121
参考

sudo apt-get install -y nodejs
node -v

でもダメ・・・・表示されず・・・・

==========まだまだ=============
(11/24)
nodejsをインストール
https://qiita.com/suzuki-sapporo/items/1748dcaacfe244010980
を参考

2. 展開
tar xvf node-v8.9.1-linux-x64.tar.xz
3. シンボリックリンクを張る。
ln -s node-v8.9.1-linux-x64 node
4. PATHを通す。
.profile に以下の行を追加する。
export NODE_HOME=$HOME/node
export NODE_PATH=$NODE_HOME/lib/node_modules
export PATH=$NODE_HOME/bin:$PATH
PATHを適用する。
source .profile
5. 動作確認
node –version

==========まだまだ=============
初アクセスすると、
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.12) 5.58ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.0.6) 5.26ms
がサーバ側の履歴に必ず出る・・・・

pip install tornado
pip install –upgrade pip

==========まだまだ=============
roslibjsをインストールしてみる

https://github.com/RobotWebTools/roslibjs.git

==========まだまだ=============
8.ワークスペースの設置
①ホームディレクトリにワークスペースを設置する。
$ rosws init ~/workspace /opt/ros/kinetic
②サンドボックスディレクトリの作成
$ mkdir ~/workspace/sandbox
sandboxディレクトリを作成したことでワークスペースの構成要素が変更されたので、setup.bashを読み込む。
$ source ~/workspace/setup.bash
③そしてroswsを使ってパッケージディレクトリとして登録する。
$ rosws set ~/workspace/sandbox
再度setup.bashを読み込みパス登録
$ source ~/workspace/setup.bash

※設定後のパスは次のコマンドで確認
echo $ROS_PACKAGE_PATH
結果は次のようになることを確認。
/home/your_user_name/workspace/sandbox:/opt/ros/kinetic/share

rosinstallのインストール
$ sudo apt-get install python-rosinstall

==========まだまだ=============
/workspace/sandboxでやってみる

$ cd ~/workspace/sandbox
$ catkin_create_pkg webjoy_example

webjoy_example
├── CMakeLists.txt
├── launch
│ └── webjoy_example.launch
├── package.xml
└── www
├── index.html
└── webjoy.js

$ cd .. && catkin_make
$ source ~/gopigo_ws/devel/setup.bash

==========まだまだ=============
index.htmlに直接webjoy.jsを書き込んでもダメ・・・

==========まだまだ=============
i2c-toolsを導入し、i2cグループにユーザーubuntu(pi)を追加

サンプルページ


をやってみる

$ sudo apt-get update
$ sudo apt-get install i2c-tools
$ sudo groups pi
pi : pi adm cdrom sudo dip video plugdev input lpadmin gpio i2c spi sambashare
$ sudo usermod -aG i2c pi
$ sudo groups pi
pi : pi adm cdrom sudo dip video plugdev input lpadmin gpio i2c spi sambashare
(既にやってるので変わらん・・・・)

==========まだまだ=============
roswwwを再インストールしてみる
http://flow-developers.hatenablog.com/category/ROS
参考
roswwをRaspberrypiにinstallするコマンド
# roswwwのUsrageはこちら.

# ROSのworkspaceに移動する.
cd ~/gopigo_ws/src

# 最新のroswwwを取得する.
git clone https://github.com/tork-a/roswww.git

# catkin_makeを実行する.
cd ~/gopigo_ws

sudo ./src/catkin/bin/catkin_make_isolated –install –install-space /opt/ros/kinetic –pkg roswww
source /opt/ros/indigo/setup.bash

# [TIPS] launchファイルが2か所に同じ名前であるので、どちらかを消す.
/opt/ros/kinetic/share/roswww

~/gopigo_ws/src/roswww/launch
どちらかの
roswww.launch と start_bridge.launch
を消す.※中身は同じですが競合してlaunch実行がErrになるため.

# 最後にサーバー立つか,実行して確認しinstall完了.
roslaunch roswww webjoy_example.launch
roslaunch webjoy_example webjoy_example.launch

(これやったら、壊れた。。)
pi@pi3:~/gopigo_ws$ roslaunch webjoy_example webjoy_example.launch
プログラム ‘roslaunch’ はまだインストールされていません。 次のように入力することでインストールできます:
sudo apt install python-roslaunch
pi@pi3:~/gopigo_ws$ sudo apt install python-roslaunch
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
インストールすることができないパッケージがありました。おそらく、あり得
ない状況を要求したか、(不安定版ディストリビューションを使用しているの
であれば) 必要なパッケージがまだ作成されていなかったり Incoming から移
動されていないことが考えられます。
以下の情報がこの問題を解決するために役立つかもしれません:

以下のパッケージには満たせない依存関係があります:
python-roslaunch : 依存: python-roslib しかし、インストールされようとしていません
E: 問題を解決することができません。壊れた変更禁止パッケージがあります。

(ああーーーーーーあ・・)
==========まだまだ=============

pipをアップグレードしてみる
https://askubuntu.com/questions/744377/cache-pip-disabled-immediately-after-instalation-of-pip
参考
sudo -H pip install –upgrade pip

AWS CLIをpipインストールした際にエラーとなった時の対処方法について


参考
$ sudo python -m pip install –upgrade pip
でも、pip8.1.1のまま、pip9.0.1にはならず・・・・

https://askubuntu.com/questions/744377/cache-pip-disabled-immediately-after-instalation-of-pip
参考で
sudo apt-get install python-pip
もやっておく

pip3 install -U pip

pipをアップグレードする方法
http://kaworu.jpn.org/python/Pythonのパッケージ管理システムpipをアップグレードする方法
参考
sudo pip install –upgrade pip
sudo pip install –upgrade pip

==========まだまだ=============

Python-2.7.14.tar.xz

tar.xz
圧縮
tar -Jcvf xxxx.tar.xz directory
解凍
tar -Jxvf Python-2.7.14.tar.xz

python-3.6.3-embed-amd64.zip

[0352]_★ros_kinetic_install

スライド1


を参考に写すと、
$ sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX
$ sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu trusty main” > /etc/apt/sources.list.d/ros-latest.list’
$ sudo apt-key adv –keyserver hkp://ha.pool.sks-keyservers.net –recv-key 0xB01FA116
$ sudo apt-get update
$ sudo apt-get install ros-indigo-ros-base -y
なので、、、、

http://wiki.ros.org/action/show/kinetic/Installation/Ubuntu?action=show&redirect=kinetic%2FInstallation%2FUbuntuARM
参考でkineticに書き換えると、、
sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX
sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’
sudo apt-key adv –keyserver hkp://ha.pool.sks-keyservers.net:80 –recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-ros-base

rosdepのインストールと初期化
sudo rosdep init
rosdep update

ROSの環境変数をシステムに反映
echo “source /opt/ros/kinetic/setup.bash” >> ~/.bashrc
source ~/.bashrc

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

rosinstallのインストール
sudo apt-get install python-rosinstall

gopigo3のドライバーをインストール
https://pypkg.com/pypi/gopigo3-test/
参考
sudo pip install gopigo3-test
/usr/local/lib/python2.7/dist-packages

★★★★★★★★★★★★★★★
(おおお!、ついに書いてくれたあ!!!!)
https://qiita.com/cut0ter/items/0326f5dee89456e47001
参考
★★★★★★★★★★★★★★★
1つめ
roscore

2つめ
(roslaunch ropigo ropigo.launchのコマンドでなく・・・・Web作者が作ってくれたpythonで動かす)
/home/pi/Dexter/GoPiGo3/Software/Python
python gopigo3_ros.py

3つめ
rostopic pub /cmd_vel geometry_msgs/Twist ‘[0.2, 0.0, 0.0]’ ‘[0.0, 0.0, 0.0]’
rostopic pub /cmd_vel geometry_msgs/Twist ‘[0.0, 0.0, 0.0]’ ‘[0.0, 0.0, 0.2]’

動いた・・・・・やった・・・でも画像がでない・・・

なので・・まとめると、
ここまで起動中のコマンド
$ roscore
$ rosrun libuvc_camera camera_node
$ rosrun web_video_server web_video_server
$ roslaunch rosbridge_server rosbridge_websocket.launch
$ roslaunch roswww roswww.launch
GoPiGoの台車ノードの起動
$ cd /home/pi/Dexter/GoPiGo3/Software/Python
$ python gopigo3_ros.py
GoPiGoの台車ノードの起動
http://GoPiGoのIPアドレス:8085/webjoy_example/index.html
http://192.168.0.10:8085/webjoy_example/index.html

(11/10)
なので、カメラの部分を再度構築しなおす(インストールしなおす)
https://codezine.jp/article/detail/10068
参考

パッケージのインストール(kineticだよ!!)
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-rosbridge-suite ros-kinetic-roswww ros-kinetic-libuvc-camera ros-kinetic-web-video-server
$ rospack profile

$ roscore
$ rosrun libuvc_camera camera_node

動画ストリーミングサーバ起動
$ rosrun web_video_server web_video_server

http://GoPiGoのIPアドレス:8080/stream_viewer?topic=/image_raw
http://192.168.0.10:8080/stream_viewer?topic=/image_raw
(うん!映ってる・・・OK!)

$ cd /home/pi/gopigo_ws
$ catkin_make
$ source ~/gopigo_ws/devel/setup.bash

Webサーバの起動
$ roslaunch roswww roswww.launch

Webサーバの起動後、下記にアクセスしてみましょう。
http://GoPiGoのIPアドレス:8085/webjoy_example/index.html
http://192.168.0.9:8085/webjoy_example/index.html
(あれーーーダメだな・・・NG)

一発で起動するコマンド
$ roslaunch webjoy_example webjoy_example.launch

[0351]_★package [ropigo] nor is [ropigo] a launch file nameの対策

package [ropigo] nor is [ropigo] a launch file nameの対策

https://answers.ros.org/question/143496/roslaunch-is-neither-a-launch-file-in-package-nor-is-a-launch-file-name/
参考

pi@pi-Raspberry3:~$ roslaunch ropigo ropigo.launch
[ropigo.launch] is neither a launch file in package [ropigo] nor is [ropigo] a launch file name
The traceback for the exception was written to the log file

とエラー出たら・・・・

$ source /home/pi/catkin_ws/devel/setup.bash
のコマンドでなんとかエラー解決・・・

$ source /home/pi/gopigo_ws/devel/setup.bash
のコマンドでなんとかエラー解決・・・

$ source /home/pi/catkin_workspace/devel/setup.bash
$ source /home/pi/workspace/devel/setup.bash

以上

$ echo “source /home/pi/gopigo_ws/devel/setup.bash” >> ~/.bashrc
$ source ~/.bashrc

で直しておく。(2017/12/16)