Skip to content

Select install directory to build#18

Open
fmrico wants to merge 18 commits intoesteve:masterfrom
fmrico:master
Open

Select install directory to build#18
fmrico wants to merge 18 commits intoesteve:masterfrom
fmrico:master

Conversation

@fmrico
Copy link
Copy Markdown
Contributor

@fmrico fmrico commented Apr 14, 2018

By setting the environment variable BASE_ROOT, you are able to select where to create the System directory where to install, instead of a fixed .ros_root in the root project directory.

If you do not set BASE_ROOT, the System directory where to install will be in the root project directory.

@fmrico
Copy link
Copy Markdown
Contributor Author

fmrico commented Apr 14, 2018

appveyor check failed? :S

Everitying is building for me...

@esteve
Copy link
Copy Markdown
Owner

esteve commented Apr 19, 2018

@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
Copy link
Copy Markdown
Owner

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#

Copy link
Copy Markdown
Owner

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
PYTHON2_VERSION=${PYTHON2_MAJOR_VERSION}.${PYTHON2_MINOR_VERSION}.${PYTHON2_PATCH_VERSION}

INSTALL_ROOT=.ros-root
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Owner

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
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"
Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Owner

@esteve esteve Apr 19, 2018

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
Copy link
Copy Markdown
Owner

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"

PYTHON2_VERSION=2.7.13

INSTALL_ROOT=.ros-root
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System
Copy link
Copy Markdown
Owner

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"

@@ -1,11 +1,12 @@
#!/bin/bash

HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System
Copy link
Copy Markdown
Owner

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_ROOT=.ros-root
HOST_INSTALL_ROOT="${BASE_ROOT:-${PWD}}/"System
PEPPER_INSTALL_ROOT=System
Copy link
Copy Markdown
Owner

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)

Copy link
Copy Markdown
Contributor Author

@fmrico fmrico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made:

  1. BASE_ROOT changed to PEPPER_ROS_BASE_ROOT
  2. Updated Readme for removing .root-root
  3. Updated Readme for changing scp by rsync (much faster)

@esteve
Copy link
Copy Markdown
Owner

esteve commented Apr 29, 2018

@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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/export export/export/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!!

@fmrico
Copy link
Copy Markdown
Contributor Author

fmrico commented May 22, 2018

@esteve Rebased!!!

@fmrico
Copy link
Copy Markdown
Contributor Author

fmrico commented May 25, 2018

@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
Copy link
Copy Markdown
Owner

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


```
$ scp -r .ros-root nao@IP_ADDRESS_OF_YOUR_ROBOT:.ros-root
$ sync -avz System User nao@pepper.local:~/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rsync instead of sync


```
$ scp -r .ros-root nao@IP_ADDRESS_OF_YOUR_ROBOT:.ros-root
$ sync -avz System User nao@pepper.local:~/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rsync

k-okada added a commit to k-okada/ros2_pepper that referenced this pull request Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants