-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select install directory to build #18
base: master
Are you sure you want to change the base?
Conversation
appveyor check failed? :S Everitying is building for me... |
@fmrico Thanks for the PR! Don't worry about Appveyor, I added it as a test, but I don't think I'll keep using it for the time being. |
README.md
Outdated
If you want to set the install directory (instead of the project root directory), set the `BASE_ROOT` environment variable: | ||
|
||
``` | ||
export export BASE_ROOT=/home/mihome/pepper_root/ <-- Or wherever you want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s#export export#export#
s#/home/mihome#$HOME#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it'd be better to prefix this variable with PEPPER_
or PEPPER_ROS_
to avoid any conflicts, BASE_ROOT
is too generic
build_ros1.sh
Outdated
@@ -5,7 +5,8 @@ PYTHON2_PATCH_VERSION=13 | |||
|
|||
PYTHON2_VERSION=${PYTHON2_MAJOR_VERSION}.${PYTHON2_MINOR_VERSION}.${PYTHON2_PATCH_VERSION} | |||
|
|||
INSTALL_ROOT=.ros-root | |||
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/System"
install.sh
Outdated
if [ ! -d "$(pwd)/.ros-root" ]; then | ||
echo "ERROR: .ros-root directory is not found" 1>&2 | ||
if [ ! -d "${HOST_INSTALL_ROOT}" ]; then | ||
echo "ERROR: System directory is not found" 1>&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System directory not found
install.sh
Outdated
@@ -29,9 +31,9 @@ if [ -z "$master_ip" ]; then | |||
master_ip=$local_ip | |||
fi | |||
# Set ROS Master URI to ip of which ros is installed (this most probably will te the ros master) | |||
copy_script="sed -i.bak 's/^\(export\s*ROS_MASTER_URI\s*=\s*\).*$/\http:\/\/$master_ip:11311/' .ros-root/setup_ros1_pepper.bash" | |||
copy_script="sed -i.bak 's/^\(export\s*ROS_MASTER_URI\s*=\s*\).*$/\http:\/\/$master_ip:11311/' System/setup_ros1_pepper.bash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${HOST_INSTALL_ROOT}/setup_ros1_pepper.bash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think it should be PEPPER_INSTALL_ROOT
install.sh
Outdated
@@ -1,8 +1,10 @@ | |||
#! /bin/bash | |||
|
|||
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/System"
prepare_requirements_ros1.sh
Outdated
@@ -4,7 +4,10 @@ set -euf -o pipefail | |||
|
|||
PYTHON2_VERSION=2.7.13 | |||
|
|||
INSTALL_ROOT=.ros-root | |||
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/System"
prepare_requirements_ros2.sh
Outdated
@@ -1,11 +1,12 @@ | |||
#!/bin/bash | |||
|
|||
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/System"
build_ros1.sh
Outdated
@@ -5,7 +5,8 @@ PYTHON2_PATCH_VERSION=13 | |||
|
|||
PYTHON2_VERSION=${PYTHON2_MAJOR_VERSION}.${PYTHON2_MINOR_VERSION}.${PYTHON2_PATCH_VERSION} | |||
|
|||
INSTALL_ROOT=.ros-root | |||
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System | |||
PEPPER_INSTALL_ROOT=System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes where the ROS files are installed, it should be up to the user to decide, or at least keep the current directory (.ros-root
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made:
- BASE_ROOT changed to PEPPER_ROS_BASE_ROOT
- Updated Readme for removing .root-root
- Updated Readme for changing scp by rsync (much faster)
@fmrico there's a few conflicts with master, could you rebase? Thanks! I'm also thinking that using environment variables for setting the destination directory is just too fragile and it should be an argument that is passed to the scripts, what do you think? |
README.md
Outdated
If you want to set the install directory (instead of the project root directory), set the `PEPPER_ROS_BASE_ROOT` environment variable: | ||
|
||
``` | ||
export export PEPPER_ROS_BASE_ROOT=/home/mihome/pepper_root/ <-- Or wherever you want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/export export/export/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!!
@esteve Rebased!!! |
Readme updated z# modified: setup_ros2_pepper.bash
Readme updated z# modified: setup_ros2_pepper.bash
Readme updated z# modified: setup_ros2_pepper.bash
Readme updated z# modified: setup_ros2_pepper.bash
@esteve , Comments are applied! |
If you want to set the install directory (instead of the project root directory), set the `PEPPER_ROS_BASE_ROOT` environment variable: | ||
|
||
``` | ||
export PEPPER_ROS_BASE_ROOT=/home/mihome/pepper_root/ <-- Or wherever you want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace /home/mihome
with $HOME
|
||
We're going to copy these to the robot, assuming that your robot is connected to your network, type the following: | ||
|
||
``` | ||
$ scp -r .ros-root nao@IP_ADDRESS_OF_YOUR_ROBOT:.ros-root | ||
$ sync -avz System User nao@pepper.local:~/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rsync
instead of sync
|
||
We're going to copy these to the robot, assuming that your robot is connected to your network, type the following: | ||
|
||
``` | ||
$ scp -r .ros-root nao@IP_ADDRESS_OF_YOUR_ROBOT:.ros-root | ||
$ sync -avz System User nao@pepper.local:~/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rsync
By setting the environment variable
BASE_ROOT
, you are able to select where to create theSystem
directory where to install, instead of a fixed.ros_root
in the root project directory.If you do not set
BASE_ROOT
, theSystem
directory where to install will be in the root project directory.