diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..209181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +pepper-lite.taz +*.gz diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c55a58a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,202 @@ +FROM tiryoh/ros-desktop-vnc:kinetic + +ENV DEBCONF_NOWARNINGS=yes +ENV DEBIAN_FRONTEND noninteractive +ENV ROS_PYTHON_VERSION 1 +SHELL ["/bin/bash", "-c"] + +RUN sed -i 's@archive.ubuntu.com@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.list + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install --no-install-recommends -y \ + build-essential \ + dkms \ + openssh-server && \ + apt-get -y clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir /var/run/sshd && \ + echo 'root:ubuntu' | chpasswd && \ + sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ + sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd + +EXPOSE 22 + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install --no-install-recommends -y \ + python-catkin-tools \ + python-rosdep \ + openssh-server \ + ros-kinetic-driver-base \ + ros-kinetic-move-base-msgs \ + ros-kinetic-octomap \ + ros-kinetic-octomap-msgs \ + ros-kinetic-humanoid-msgs \ + ros-kinetic-humanoid-nav-msgs \ + ros-kinetic-camera-info-manager \ + ros-kinetic-camera-info-manager-py \ + libccd-dev \ + libccd2 \ + libfcl-0.5-dev \ + libfcl0.5 \ + libglew-dev \ + libglew1.13 \ + python-bs4 \ + python-html5lib \ + python-lxml \ + ros-kinetic-ackermann-steering-controller \ + ros-kinetic-chomp-motion-planner \ + ros-kinetic-combined-robot-hw \ + ros-kinetic-combined-robot-hw-tests \ + ros-kinetic-control-toolbox \ + ros-kinetic-controller-interface \ + ros-kinetic-controller-manager \ + ros-kinetic-controller-manager-msgs \ + ros-kinetic-controller-manager-tests \ + ros-kinetic-diff-drive-controller \ + ros-kinetic-effort-controllers \ + ros-kinetic-force-torque-sensor-controller \ + ros-kinetic-forward-command-controller \ + ros-kinetic-gazebo-ros-control \ + ros-kinetic-gripper-action-controller \ + ros-kinetic-hardware-interface \ + ros-kinetic-imu-sensor-controller \ + ros-kinetic-joint-limits-interface \ + ros-kinetic-joint-state-controller \ + ros-kinetic-joint-trajectory-controller \ + ros-kinetic-moveit-core \ + ros-kinetic-moveit-fake-controller-manager \ + ros-kinetic-moveit-kinematics \ + ros-kinetic-moveit-msgs \ + ros-kinetic-moveit-planners-ompl \ + ros-kinetic-moveit-ros-move-group \ + ros-kinetic-moveit-ros-perception \ + ros-kinetic-moveit-ros-planning \ + ros-kinetic-moveit-simple-controller-manager \ + ros-kinetic-naoqi-bridge-msgs \ + ros-kinetic-naoqi-dcm-driver \ + ros-kinetic-naoqi-driver \ + ros-kinetic-naoqi-driver-py \ + ros-kinetic-naoqi-libqi \ + ros-kinetic-naoqi-libqicore \ + ros-kinetic-naoqi-pose \ + ros-kinetic-naoqi-sensors-py \ + ros-kinetic-object-recognition-msgs \ + ros-kinetic-ompl \ + ros-kinetic-pepper-bringup \ + ros-kinetic-pepper-control \ + ros-kinetic-pepper-dcm-bringup \ + ros-kinetic-pepper-description \ + ros-kinetic-pepper-gazebo-plugin \ + ros-kinetic-pepper-moveit-config \ + ros-kinetic-pepper-robot \ + ros-kinetic-pepper-sensors-py \ + ros-kinetic-position-controllers \ + ros-kinetic-realtime-tools \ + ros-kinetic-rgbd-launch ros-kinetic-ros-control \ + ros-kinetic-ros-controllers \ + ros-kinetic-rqt-joint-trajectory-controller \ + ros-kinetic-srdfdom \ + ros-kinetic-transmission-interface \ + ros-kinetic-urdfdom-py \ + ros-kinetic-velocity-controllers \ + libgflags2v5 \ + tmux \ + python-pyassimp \ + ros-kinetic-dsr-description \ + ros-kinetic-eigenpy \ + ros-kinetic-graph-msgs \ + ros-kinetic-moveit \ + ros-kinetic-moveit-chomp-optimizer-adapter \ + ros-kinetic-moveit-commander \ + ros-kinetic-moveit-config-m0609 \ + ros-kinetic-moveit-config-m0617 \ + ros-kinetic-moveit-config-m1013 \ + ros-kinetic-moveit-config-m1509 \ + ros-kinetic-moveit-controller-manager-example \ + ros-kinetic-moveit-experimental \ + ros-kinetic-moveit-opw-kinematics-plugin \ + ros-kinetic-moveit-planners \ + ros-kinetic-moveit-planners-chomp \ + ros-kinetic-moveit-plugins \ + ros-kinetic-moveit-pr2 ros-kinetic-moveit-python \ + ros-kinetic-moveit-resources \ + ros-kinetic-moveit-ros \ + ros-kinetic-moveit-ros-benchmarks \ + ros-kinetic-moveit-ros-control-interface \ + ros-kinetic-moveit-ros-manipulation \ + ros-kinetic-moveit-ros-planning-interface \ + ros-kinetic-moveit-ros-robot-interaction \ + ros-kinetic-moveit-ros-visualization \ + ros-kinetic-moveit-ros-warehouse \ + ros-kinetic-moveit-runtime \ + ros-kinetic-moveit-setup-assistant \ + ros-kinetic-moveit-sim-controller \ + ros-kinetic-moveit-visual-tools \ + ros-kinetic-pr2-controllers-msgs \ + ros-kinetic-pr2-description \ + ros-kinetic-pr2-mechanism-msgs \ + ros-kinetic-pr2-moveit-config \ + ros-kinetic-pr2-moveit-plugins \ + ros-kinetic-ros-control-boilerplate \ + ros-kinetic-rosparam-shortcuts \ + ros-kinetic-rviz-visual-tools \ + ros-kinetic-warehouse-ros \ + iputils-ping \ + ros-kinetic-joint-trajectory-* \ + ros-kinetic-move-base \ + ros-kinetic-teleop-twist-keyboard && \ + apt-get -y clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /home/ubuntu/catkin_ws/src && \ + /bin/bash -c "source /opt/ros/kinetic/setup.bash ; cd /home/ubuntu/catkin_ws/src ; catkin_init_workspace" && \ + /bin/bash -c "source /opt/ros/kinetic/setup.bash ; cd /home/ubuntu/catkin_ws && catkin build" && \ + echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc && \ + echo "source /home/ubuntu/catkin_ws/devel/setup.bash" >> ~/.bashrc && \ + echo "export ROS_PACKAGE_PATH=\${ROS_PACKAGE_PATH}:/home/ubuntu/catkin_ws" >> ~/.bashrc && \ + echo "export ROS_WORKSPACE=/home/ubuntu/catkin_ws" >> ~/.bashrc && \ + echo "alias cm='cd ~/catkin_ws;catkin build'" >> ~/.bashrc && \ + echo "alias cs='cd ~/catkin_ws/src'" >> ~/.bashrc + +RUN apt-get update && \ + apt-get upgrade -y && \ + cd /home/ubuntu/catkin_ws && \ + catkin build && \ + cd /home/ubuntu/catkin_ws/src && \ + git clone https://github.com/ros-naoqi/naoqi_driver.git && \ + rosdep install -i --from-paths . --ignore-src --rosdistro kinetic -y ./naoqi_driver && \ + git clone https://github.com/SoftbankRoboticsChina/pepper-ros-navigation.git && \ + rosdep install -i --from-paths . --ignore-src --rosdistro kinetic -y ./pepper-ros-navigation && \ + cd /home/ubuntu/catkin_ws && \ + catkin build && \ + apt-get autoremove -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /home/ubuntu/catkin_ws/src && \ + catkin_create_pkg create_speech rospy std_msgs --rosdistro kinetic && \ + cd create_speech && \ + curl -o create_speech.py https://raw.githubusercontent.com/ykoga-kyutech/pepper_ros_handson/master/scripts/create_speech_template.py && \ + chmod +x create_speech.py && \ + cd /home/ubuntu/catkin_ws && \ + catkin build + +# Install pynaoqi 2.5.5 library +COPY ./scripts/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz /home/ubuntu/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz +COPY ./scripts/naoqi-sdk-2.5.5.5-linux64.tar.gz /home/ubuntu/naoqi-sdk-2.5.5.5-linux64.tar.gz +RUN tar -xvzf /home/ubuntu/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz -C /home/ubuntu/ && \ + rm /home/ubuntu/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz && \ + tar -xvzf /home/ubuntu/naoqi-sdk-2.5.5.5-linux64.tar.gz -C /home/ubuntu/ && \ + rm /home/ubuntu/naoqi-sdk-2.5.5.5-linux64.tar.gz + +RUN echo "export PYTHONPATH=\${PYTHONPATH}:/home/ubuntu/naoqi-sdk-2.5.5.5-linux64/lib" >> ~/.bashrc && \ + echo "export PYTHONPATH=\${PYTHONPATH}:/home/ubuntu/pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages" >> ~/.bashrc + +COPY ./scripts/startup.sh /startup.sh +COPY ./scripts/connectPEPPER.sh /home/ubuntu/connectPEPPER.sh +COPY ./scripts/pepper.rviz /home/ubuntu/pepper.rviz +COPY ./scripts/launchdemo.txt /home/ubuntu/launchdemo.txt + diff --git a/buildPEPPER.sh b/buildPEPPER.sh new file mode 100755 index 0000000..5c6b398 --- /dev/null +++ b/buildPEPPER.sh @@ -0,0 +1,7 @@ +if [ ! -e ./scripts/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz ]; then + wget -P ./scripts https://community-static.aldebaran.com/resources/2.5.5/sdk-python/pynaoqi-python2.7-2.5.5.5-linux64.tar.gz +fi +if [ ! -e ./scripts/naoqi-sdk-2.5.5.5-linux64.tar.gz ]; then + wget -P ./scripts https://community-static.aldebaran.com/resources/2.5.5/naoqi-sdk/naoqi-sdk-2.5.5.5-linux64.tar.gz +fi +docker build -t pepper . diff --git a/exportPEPPER.sh b/exportPEPPER.sh new file mode 100755 index 0000000..c4193b6 --- /dev/null +++ b/exportPEPPER.sh @@ -0,0 +1,6 @@ +#!/bin/bash +read -p "Please open new terminal and run ./runPEPPER.sh after that hit Enter key" +echo "export container id is " +docker ps -q +read -p "When the string GET /api/health HTTP/1.1 is displayed, please hit Enter key" +docker export $(docker ps -q) | gzip -c > pepper-lite.taz diff --git a/importPEPPERLITE.sh b/importPEPPERLITE.sh new file mode 100755 index 0000000..ba3250f --- /dev/null +++ b/importPEPPERLITE.sh @@ -0,0 +1 @@ +cat pepper-lite.taz | docker import - pepper-lite:latest diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..f40371c --- /dev/null +++ b/readme.txt @@ -0,0 +1,25 @@ +--- +IMPORT and EXECUTE + +> ./importPEPPERLITE.sh +> ./runPEPPERLITE.sh + +open +http://docker_ip:6080 +ssh +ssh ubuntu@docker_ip -p 2222 +--- +BUILD LITE IMAGE + +> ./buildPEPPER.sh +> ./runPEPPER.sh + +Reconstruction of a single layer image may take up to 20 minutes to merge multi-layer images. + +> cat exportPEPPER.txt +> docker container ls +> docker export PEPPER_containerID | gzip -c > pepper-lite.taz +> docker image ls +> docker image rm pepper_imageID +--- + diff --git a/runPEPPER.sh b/runPEPPER.sh new file mode 100755 index 0000000..4a63d4f --- /dev/null +++ b/runPEPPER.sh @@ -0,0 +1 @@ +docker run --rm -p 6080:80 -p 2222:22 --shm-size=512m -e HOME=/home/ubuntu -e SHELL=/bin/bash --entrypoint '/startup.sh' pepper diff --git a/runPEPPERLITE.sh b/runPEPPERLITE.sh new file mode 100755 index 0000000..71451cb --- /dev/null +++ b/runPEPPERLITE.sh @@ -0,0 +1 @@ +docker run --rm -p 6080:80 -p 2222:22 --shm-size=512m --net bridge -e HOME=/home/ubuntu -e SHELL=/bin/bash --entrypoint '/startup.sh' pepper-lite diff --git a/scripts/connectPEPPER.sh b/scripts/connectPEPPER.sh new file mode 100755 index 0000000..42120cf --- /dev/null +++ b/scripts/connectPEPPER.sh @@ -0,0 +1,3 @@ +sudo apt update +sudo apt install ros-kinetic-pepper-meshes +roslaunch pepper_bringup pepper_full_py.launch nao_ip:=192.168.100.3 roscore_ip:=127.0.0.1 diff --git a/scripts/launchdemo.txt b/scripts/launchdemo.txt new file mode 100755 index 0000000..9253f98 --- /dev/null +++ b/scripts/launchdemo.txt @@ -0,0 +1,101 @@ +sudo apt install ros-kinetic-pepper-mesh* + +open 192.168.100.3 +ID nao +PW kobaken + +roslaunch pepper-bringup pepper_full_py.launch nao_ip=192.168.100.3 +rosrun rviz rviz -d ~/catkin_ws/src/pepper-ros-navigation/config/pepper.rviz + +roslaunch pepper_moveit_config demo.launch +rosservice call /pepper_robot/pose/life/disable "{}" +rosservice call /pepper_robot/pose/wakeup "{}" +rostopic pub -l /speech std_msgs/String "Hogehoge" + + +See Programming Robots with ROS, O'RELLY + + +roslaunch pepper-ros-navigation gmapping.launch +rosrun map_server map_saver -f /tmp/my_map + +roslaunch pepper-ros-navigation navigation.launch map_file:=/tmp/my_map + +rostopic echo /move_base_simple/goal + + +How to speech +>> python +>> from naoqi import ALProxy +>> tts=ALProxy("ALTextToSpeech","192.168.100.3",9559) +>> tts.say("hogehoge") + + +roslaunch pepper_bringup pepper.launch nao_ip:=192.168.0.4 network_interface:=wlan1 +roslaunch pepper_bringup pepper_full_py.launch nao_ip:=192.168.0.4 network_interface:=wlan1 + +rostopic pub -1 /speech std_msgs/String "法政大学理工学部創生科学科へようこそ" +rostopic pub -1 /speech std_msgs/String "ほうせいだいがくりこうがくぶそうせいかがくかへようそこ" +rostopic pub /cmd_vel geometory_msgs/Twist '{linear:{x:0.0,y:0.0,z:0.0},angular:{x:0.0,y:0.0,z:0.2}}' +rostopic pub /cmd_vel geometory_msgs/Twist -- '[0,0,0]' '[0,0,0.2]' + +roslaunch naoqi_sensors camera.launch nao_ip:=192.168.0.4 +rosrun image_view image_view image:=/camera/front/image_raw + +# バンパーセンサ +rostopic echo /pepper_robot/bumper + +# 頭タッチセンサ +rostopic echo /pepper_robot/tactile_touch + +# 脚部ソナーセンサ(前後) +rostopic echo /pepper_robot/sonar/front +rostopic echo /pepper_robot/sonar/back + +# 加速度センサ(脚部、胸部) +rostopic echo /pepper_robot/imu/base +rostopic echo /pepper_robot/imu/torso + +# 1Dデータをプロット +rqt_plot + +# 画像表示 +rqt_image_view + +/* ---------------------- + 3. アクションを取らせる +------------------------- */ + +/* ---------------------- + 1. 画像の学習、認識 +------------------------- */ + +# 画像学習、認識を行うノードを起動 +rosrun find_object_2d find_object_2d image:=/pepper_robot/camera/front/image_raw + +# 認識結果を表示 +rostopic echo /objects + + +/* ---------------------- + 2. Pythonコード作成 +------------------------- */ + +# パッケージ作成 +cd ~/catkin_ws/src +catkin_create_pkg create_speech rospy std_msgs + +# Python雛形コードのダウンロードとパッケージのビルド +cd create_speech +mkdir scripts && cd scripts +curl -o create_speech.py https://raw.githubusercontent.com/ykoga-kyutech/pepper_ros_handson/master/scripts/create_speech_template.py +chmod +x create_speech.py +cd ~/catkin_ws && catkin_make +source ~/catkin_ws/devel/setup.bash + +# create_speechノードの実行 +rosrun create_speech create_speech.py + +# Pythonコードの編集 +emacs ~/catkin_ws/src/create_speech/scripts/create_speech.py + diff --git a/scripts/pepper.rviz b/scripts/pepper.rviz new file mode 100755 index 0000000..3e5a26b --- /dev/null +++ b/scripts/pepper.rviz @@ -0,0 +1,769 @@ +Panels: + - Class: rviz/Displays + Help Height: 0 + Name: Displays + Property Tree Widget: + Expanded: + - /Global Options1 + - /Status1 + - /DepthCloud1/Status1 + - /DepthCloud1/Auto Size1 + - /DepthCloud1/Occlusion Compensation1 + - /Image1/Status1 + Splitter Ratio: 0.5 + Tree Height: 284 + - Class: rviz/Selection + Name: Selection + - Class: rviz/Tool Properties + Expanded: + - /2D Pose Estimate1 + - /2D Nav Goal1 + - /Publish Point1 + Name: Tool Properties + Splitter Ratio: 0.588679 + - Class: rviz/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 + - Class: rviz/Time + Experimental: true + Name: Time + SyncMode: 0 + SyncSource: Image +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.03 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Alpha: 1 + Class: rviz/RobotModel + Collision Enabled: false + Enabled: true + Links: + All Links Enabled: true + BumperB_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + BumperFL_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + BumperFR_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraBottom_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraBottom_optical_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraDepth_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraDepth_optical_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraTop_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + CameraTop_optical_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + ChestButton_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Head: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + HeadTouchFront_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + HeadTouchMiddle_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + HeadTouchRear_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Hip: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + ImuBaseAccelerometer_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + ImuBaseGyrometer_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + ImuTorsoAccelerometer_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + ImuTorsoGyrometer_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + LBicep: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LElbow: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger11_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger12_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger13_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger21_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger22_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger23_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger31_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger32_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger33_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger41_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger42_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LFinger43_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LForeArm: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LHandTouchBack_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + LShoulder: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LSpeaker_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + LThumb1_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + LThumb2_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Link Tree Style: Links in Alphabetic Order + Neck: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Pelvis: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RBicep: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RElbow: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger11_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger12_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger13_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger21_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger22_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger23_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger31_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger32_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger33_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger41_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger42_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RFinger43_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RForeArm: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RHandTouchBack_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + RShoulder: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RSpeaker_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + RThumb1_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + RThumb2_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + ShovelLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SonarBack_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SonarFront_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingFrontLaser_device_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingFrontLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingLeftLaser_device_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingLeftLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingRightLaser_device_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + SurroundingRightLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Tablet_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Tibia: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + VerticalLeftLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + VerticalRightLaser_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + WheelB_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + WheelFL_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + WheelFR_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_footprint: + Alpha: 1 + Show Axes: false + Show Trail: false + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + l_gripper: + Alpha: 1 + Show Axes: false + Show Trail: false + l_wrist: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper: + Alpha: 1 + Show Axes: false + Show Trail: false + r_wrist: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + torso: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Name: RobotModel + Robot Description: robot_description + TF Prefix: "" + Update Interval: 0 + Value: true + Visual Enabled: true + - Alpha: 1 + Auto Size: + Auto Size Factor: 1 + Value: true + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/DepthCloud + Color: 255; 255; 255 + Color Image Topic: /pepper_robot/camera/front/camera/image_raw + Color Transformer: RGB8 + Color Transport Hint: raw + Decay Time: 0 + Depth Map Topic: /pepper_robot/camera/depth/camera/image_raw + Depth Map Transport Hint: raw + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: DepthCloud + Occlusion Compensation: + Occlusion Time-Out: 30 + Value: false + Position Transformer: XYZ + Queue Size: 5 + Selectable: true + Size (Pixels): 3 + Style: Flat Squares + Topic Filter: false + Use Fixed Frame: true + Use rainbow: true + Value: true + - Class: rviz/Image + Enabled: true + Image Topic: /pepper_robot/camera/front/camera/image_raw + Max Value: 1 + Median window: 5 + Min Value: 0 + Name: Image + Normalize Range: true + Queue Size: 2 + Transport Hint: raw + Value: true + - Alpha: 0.5 + Buffer Length: 1 + Class: rviz/Range + Color: 255; 255; 255 + Enabled: true + Name: Range + Queue Size: 100 + Topic: /pepper_robot/sonar/front/sonar + Value: true + - Alpha: 0.5 + Buffer Length: 1 + Class: rviz/Range + Color: 255; 255; 255 + Enabled: true + Name: Range + Queue Size: 100 + Topic: /pepper_robot/sonar/back/sonar + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Squares + Topic: /laser/ground_left/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Squares + Topic: /laser/ground_right/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Squares + Topic: /pepper/laser/srd_left/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Squares + Topic: /pepper/laser/srd_right/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Boxes + Topic: /pepper/laser/ground_left/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 10 + Min Value: -10 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz/PointCloud2 + Color: 255; 255; 255 + Color Transformer: Intensity + Decay Time: 0 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: PointCloud2 + Position Transformer: XYZ + Queue Size: 10 + Selectable: true + Size (Pixels): 3 + Size (m): 0.05 + Style: Boxes + Topic: /pepper/laser/ground_right/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true + - Class: rviz/TF + Enabled: false + Frame Timeout: 15 + Frames: + All Enabled: true + Marker Scale: 1 + Name: TF + Show Arrows: true + Show Axes: true + Show Names: true + Tree: + {} + Update Interval: 0 + Value: false + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Fixed Frame: base_footprint + Frame Rate: 30 + Name: root + Tools: + - Class: rviz/Interact + Hide Inactive Objects: true + - Class: rviz/MoveCamera + - Class: rviz/Select + - Class: rviz/FocusCamera + - Class: rviz/Measure + - Class: rviz/SetInitialPose + Topic: /initialpose + - Class: rviz/SetGoal + Topic: /move_base_simple/goal + - Class: rviz/PublishPoint + Single click: true + Topic: /clicked_point + Value: true + Views: + Current: + Class: rviz/XYOrbit + Distance: 3.5673 + Enable Stereo Rendering: + Stereo Eye Separation: 0.06 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false + Focal Point: + X: 0.549272 + Y: 0.416871 + Z: -1.19209e-07 + Name: Current View + Near Clip Distance: 0.01 + Pitch: 0.195204 + Target Frame: + Value: XYOrbit (rviz) + Yaw: 3.1604 + Saved: ~ +Window Geometry: + Displays: + collapsed: false + Height: 795 + Hide Left Dock: false + Hide Right Dock: false + Image: + collapsed: false + QMainWindow State: 000000ff00000000fd00000004000000000000013c00000278fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f0070006500720074006900650073020000017b000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000410000015d000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d00610067006501000001a4000001150000001600ffffff000000010000010f00000294fc0200000003fb0000000a00560069006500770073000000004100000294000000b000fffffffb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004640000003efc0100000002fb0000000800540069006d00650100000000000004640000031b00fffffffb0000000800540069006d00650100000000000004500000000000000000000003220000027800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Selection: + collapsed: false + Time: + collapsed: false + Tool Properties: + collapsed: false + Views: + collapsed: false + Width: 1124 + X: 347 + Y: 124 diff --git a/scripts/startup.sh b/scripts/startup.sh new file mode 100755 index 0000000..8eb5e9f --- /dev/null +++ b/scripts/startup.sh @@ -0,0 +1,72 @@ +#!/bin/bash +/usr/sbin/sshd -D & +if [ -n "$VNC_PASSWORD" ]; then + echo -n "$VNC_PASSWORD" > /.password1 + x11vnc -storepasswd $(cat /.password1) /.password2 + chmod 400 /.password* + sed -i 's/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf + export VNC_PASSWORD= +fi + +if [ -n "$X11VNC_ARGS" ]; then + sed -i "s/^command=x11vnc.*/& ${X11VNC_ARGS}/" /etc/supervisor/conf.d/supervisord.conf +fi + +if [ -n "$OPENBOX_ARGS" ]; then + sed -i "s#^command=/usr/bin/openbox.*#& ${OPENBOX_ARGS}#" /etc/supervisor/conf.d/supervisord.conf +fi + +if [ -n "$RESOLUTION" ]; then + sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh +fi + +USER=${USER:-root} +HOME=/root +if [ "$USER" != "root" ]; then + echo "* enable custom user: $USER" + useradd --create-home --shell /bin/bash --user-group --groups adm,sudo $USER + if [ -z "$PASSWORD" ]; then + echo " set default password to \"ubuntu\"" + PASSWORD=ubuntu + fi + HOME=/home/$USER + echo "$USER:$PASSWORD" | chpasswd + cp -r /root/{.gtkrc-2.0,.asoundrc} ${HOME} + [ -d "/dev/snd" ] && chgrp -R adm /dev/snd +fi +sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf + +# home folder +mkdir -p $HOME/.config/pcmanfm/LXDE/ +ln -sf /usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf $HOME/.config/pcmanfm/LXDE/ +chown -R $USER:$USER $HOME + +# nginx workers +sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf + +# nginx ssl +if [ -n "$SSL_PORT" ] && [ -e "/etc/nginx/ssl/nginx.key" ]; then + echo "* enable SSL" + sed -i 's|#_SSL_PORT_#\(.*\)443\(.*\)|\1'$SSL_PORT'\2|' /etc/nginx/sites-enabled/default + sed -i 's|#_SSL_PORT_#||' /etc/nginx/sites-enabled/default +fi + +# nginx http base authentication +if [ -n "$HTTP_PASSWORD" ]; then + echo "* enable HTTP base authentication" + htpasswd -bc /etc/nginx/.htpasswd $USER $HTTP_PASSWORD + sed -i 's|#_HTTP_PASSWORD_#||' /etc/nginx/sites-enabled/default +fi + +# dynamic prefix path renaming +if [ -n "$RELATIVE_URL_ROOT" ]; then + echo "* enable RELATIVE_URL_ROOT: $RELATIVE_URL_ROOT" + sed -i 's|#_RELATIVE_URL_ROOT_||' /etc/nginx/sites-enabled/default + sed -i 's|_RELATIVE_URL_ROOT_|'$RELATIVE_URL_ROOT'|' /etc/nginx/sites-enabled/default +fi + +# clearup +PASSWORD= +HTTP_PASSWORD= +echo "Please execute -> sudo apt install ros-kinetic-peper-meshes" +exec /bin/tini -- /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf