Ask Your Question
4

Updated install.bash for ros-electric-turtlebot's upstart

asked 2011-11-04 21:27:08 -0500

Alaina gravatar image

updated 2011-11-04 21:45:13 -0500

I am pretty excited to have Turtlebot on Electric! I'm keen to try it on 11.10 at some point, but I'm still using Natty for now.

I've just done the upgrade to ros-electric-turtlebot (finally!) and had an upstart problem along the way. In install.bash, the chmods are pointed at /usr/bin (should be /usr/sbin), and the mkdirs error out if you've already run the script once or otherwise created the stuff in /etc/ros.

There are easy fixes for both of these: point the chmods at /usr/sbin, and add -p to the mkdir calls.

Here's my install.bash. Feel free to use it, of course, if it correctly fixes the problems:

#!/bin/bash

# Run this as root, from the directory containing it!
#
# USAGE: sudo ./install.bash
#  or
# sudo ./install.bash usb0
#
# where usb0 is whatever network interface you want to set the robot
# up for.  wlan0 is the default.

interface=wlan0

if [ $# -gt 0 ]; then
    if [ "$1" != "" ]; then
        interface=$1
    fi
fi

echo "Installing using network interface $interface."

sed "s/wlan0/$interface/g" < turtlebot-start > /usr/sbin/turtlebot-start
chmod +x /usr/sbin/turtlebot-start
sed "s/wlan0/$interface/g" < turtlebot-stop > /usr/sbin/turtlebot-stop
chmod +x /usr/sbin/turtlebot-stop
sed "s/wlan0/$interface/g" < turtlebot.conf > /etc/init/turtlebot.conf

# Copy files into /etc/ros/electric/turtlebot
mkdir -p /etc/ros
mkdir -p /etc/ros/electric
cat turtlebot.launch > /etc/ros/electric/turtlebot.launch

echo '. /opt/ros/electric/setup.bash; export ROS_PACKAGE_PATH=/home/turtlebot/ros:${ROS_PACKAGE_PATH}' > /etc/ros/setup.bash
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2011-11-04 22:04:45 -0500

fergs gravatar image

The /sbin has already been fixed in trunk, and will soon be in debs (we had some delays due to spinning up for Oneric). I just added the mkdir -p, thanks.

In the future, things that are clearly a bug/defect are best posted as a ticket on the appropriate Trac instance (for turtlebot, that is https://kforge.ros.org/turtlebot/trac)

edit flag offensive delete link more

Comments

Can I ask has this been added to the debs yet?
NeuralJuiceBox gravatar imageNeuralJuiceBox ( 2011-12-06 09:10:59 -0500 )edit
Yes, this should be in current debs
fergs gravatar imagefergs ( 2011-12-06 12:16:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-04 21:27:08 -0500

Seen: 239 times

Last updated: Nov 04 '11