Skip to content
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

Install update #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 44 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ From top to bottom, the released repositories are:
### From Source

You can install all the BWI components normally built from source on
either ROS Indigo or Kinetic.
either ROS Indigo, Kinetic, or Melodic. For the V4 bots, use Melodic.

First, install ROS
[Indigo](http://wiki.ros.org/indigo/Installation/Ubuntu), or
[Kinetic](http://wiki.ros.org/indigo/Installation/Ubuntu).

[Indigo](http://wiki.ros.org/indigo/Installation/Ubuntu),
[Kinetic](http://wiki.ros.org/kinetic/Installation/Ubuntu), or
[Melodic](http://wiki.ros.org/melodic/Installation/Ubuntu).
The Kinetic version is only supported on Ubuntu Xenial, and is
only partially functional.

Expand Down Expand Up @@ -61,6 +61,10 @@ $ rosdep update
$ rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
```


**If you are setting up a workspace on a BWIbot V4 in Anna Hiss Gym, continue from here with the "Special Installation Instructions for Version 4 Robots" below.**


Then, build everything. On a slow computer:
```
$ catkin build -j2
Expand All @@ -80,9 +84,26 @@ package is *required* for building on ROS Kinetic and Melodic. On ROS Indigo, yo
can still use **catkin_make** instead, although the newer build tool
is recommended.

### For Version 4 Robot

The V4 base uses slightly different values for some environment variables. It's important to export them into your environment after you source the workspace. Add the convenience function sws to the bottom of your .bashrc file found at ~/.bashrc.
## Special Installation Instructions for Version 4 Robots:

The V4 bots at AHG use some additional branches of the utexas-bwi repo. To install these, run the following commands from your ~/catkin_ws directory:

```
$ git checkout https://github.com/utexas-bwi/bwi/tree/architecture-update
$ git checkout https://github.com/utexas-bwi/bwi_common/tree/architecture-update
$ git checkout https://github.com/utexas-bwi/ahg_common/tree/ahg2s_map

$ git submodule init
$ git submodule update
```

Then build everything:
```
$ catkin build -j6
```

The V4 base uses slightly different values for some environment variables. It's important to export them into your environment after sourcing the workspace. To automate that, add the convenience function "sws" to the bottom of your .bashrc file found at ~/.bashrc.
```
sws() {
source ~/catkin_ws/devel/setup.bash
Expand All @@ -98,3 +119,20 @@ After building your workspace or packages, instead of using "source devel/setup.
```
$ sws
```

Next, update pyYAML:
```
$ pip install -U pyYAML
```

Then you will need to create a password for postgres. To do so, run the script below and follow the promts to enter a password that is not empty:
```
$ run bwi_common/knowledge_representation/scripts/configure_postgresql.sh
```

Finally, run the command prepare_knowledge_bwi_ahg:
```
$ prepare_knowledge_bwi_ahg
```

At this point, you should be able to run the BWIbot V4 visit doors demo in Anna Hiss Gym. See the [demo instructions](https://github.com/utexas-bwi/bwi/blob/master/demo_v4.md) in this directory.
29 changes: 7 additions & 22 deletions demo.md → demo_v2.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# How to Run a BWIbot Demo
# How to Run a BWIbot V2 Demo

**Purpose:**
To perform a demo of the BWIbots for visitors, or to test an installation of the code base on a BWIbot machine.

**Requirements:**
- a BWIbot V2 or V4
- a BWIbot V2
- a user account on the bot computer
- completion of the [code base installation](https://github.com/utexas-bwi/bwi)
- completion of the [code base installation](https://github.com/utexas-bwi/bwi/README.md)

## Instruction

As a demonstration of the BWIbots' abilities to navigate a building, avoid visitors, and perform tasks, you can use the "Visit Doors" executables that are part of the bwi_tasks package.
As a demonstration of the BWIbots' abilities to navigate a building, avoid visitors, and perform tasks, you can use the "Visit Door List" executables that are part of the bwi_tasks package.

## For V2 Bots:
### Turn on the robot
1. Disconnect the charging cable.
- Find the cable leading from the wall-powered charging brick to the robot main power box and disconnect it. Detach by holding the connectors only, and don't pull the connection apart using the wires as they may break off.
Expand Down Expand Up @@ -47,8 +46,8 @@ Note that you can halt moves by pressing the spacebar.
### Orient the robot in space
1. Go to the RViz window that opened when you ran the launch file.
2. Take a look at the map and identify the robot's new location and heading in the hallway.
3. Click the "(BUTTON NAME)" at the top of the RViz window to activate the tool.
4. Move the pointer to the robot's location on the map, then click and drag in the direction of heading.
3. Click the "2D pose estimate" button at the top of the RViz window to activate the tool.
4. Move the mouse pointer to the robot's location on the map, then click and drag in the direction of heading.
5. You should see green points around the robot indicating that the robot is sensing walls and other obstacles.
### Run the demo routine
Now you are ready to run the demo routine. Open another terminal window and type:
Expand All @@ -65,18 +64,4 @@ The robot will begin visiting doors on the floor. To stop the program, type "ct
5. Turn OFF the laptop.
6. Plug in the charging cable.
7. Switch the power switch on the main power box from "BATTERY" to "CHARGER".
8. Make sure the v2 wall charger is running - it should make noise. If not, turn it off and on again.

## For V4 Bots:
### Turn on the robot
1. Disconnect the battery from the wall charger: the V4 bot charger cable is connected to the back of the robot base via a serial connector. Make sure the screws on the connector are loose before disconnecting.
2. Verify that the e-stop (red button located on the power box in the mid-section of the robot) is disengaged (pulled all the way up).
3. Press the small metal button on the power box. The base should turn on and the power button will illuminate.
4. Verify that the 3-position switch next to the power button is in the Neutral position (DIAG - NEUTRAL - BL).

You should now be able to use the robot.

### Move the robot to starting position
### Orient the robot in space
### Run the demo routine
### Turn off the robot
8. Make sure the v2 wall charger is running - it should make noise. If not, turn it off and on again.
68 changes: 68 additions & 0 deletions demo_v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# How to Run a BWIbot V4 Demo

**Purpose:**
To perform a demo of the BWIbots for visitors at Anna Hiss Gym, or to test an installation of the code base on a BWIbot machine.

**Requirements:**
- a BWIbot V4
- a user account on the bot computer
- completion of the [code base installation](https://github.com/utexas-bwi/bwi/README.md)

## Instruction

As a demonstration of the BWIbots' abilities to navigate a building, avoid visitors, and perform tasks, you can use the "Visit Door List" executables that are part of the bwi_tasks package.

### Turn on the robot
1. Disconnect the battery from the wall charger: the V4 bot charger cable is connected to the back of the robot base via a serial connector. Make sure the screws on the connector are loose before disconnecting.
2. Verify that the e-stop (red button located on the power box in the mid-section of the robot) is disengaged (pulled all the way up).
3. Press the small metal button on the power box. The base should turn on and the power button will illuminate.
4. Verify that the 3-position switch next to the power button is in the Neutral position (DIAG - NEUTRAL - BL).

You should now be able to use the robot.

### Move the robot to starting position

You will use the computer keyboard to control the robot, but first you must run the segbot launch file. In a terminal window, type:
```
roslaunch bwi_launch segbot_v4_ahg.launch
```
Then open another terminal window to run the teleop keyboard:
```
rosrun segbot_bringup teleop_twist_keyboard
```
Follow the instructions in the teleop keyboard terminal window to move the robot into the hallway adjacent to the large gym area on level 2 of AHG. **Before executing move commands**, reduce the robot speed settings below 0.5 by pressing "z" (speed settings will display in the terminal window).
Note that you can halt moves by pressing the spacebar. To stop ALL robot processes and do an immediate shut-down, you can press the red E-Stop button on the power-box. You will have to restart the robot completely afterwards.

### Orient the robot in space

1. Go to the RViz window that opened when you ran the launch file.
2. Take a look at the map and identify the robot's new location and heading in the hallway.
3. Click the "2D pose estimate" button at the top of the RViz window to activate the tool.
4. Move the mouse pointer to the robot's location on the map, then click and drag in the direction of heading.
5. You should see green points around the robot indicating that the robot is sensing walls and other obstacles.

### Run the demo routine

Now you are ready to run the demo routine. Open another terminal window and type:
```
rosrun bwi_tasks visit_door_list_smach
```
The robot will begin visiting doors on the floor. To stop the program, type "ctrl+C", but note that the robot will continue to its next goal door before stopping.

>*If you see errors about packages for the robot arm, you must ignore the bad packages by typing:*
Copy link
Member

Choose a reason for hiding this comment

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

I believe I fixed the complaints around the segbot_arm stack with 4f3e39a in the segbot repo. I tried running the new architecture on the V2s after making that commit and there were no compliation errors. If this is repeatable, no CATKIN_IGNOREs are required.

>```
>CATKIN_IGNORE (bad packages)
>```
>*Then build and source the workspace:*
>```
>catkin build -j6
>sws
>```

### Turn off the robot

1. Move the robot back to its charging area in the AHG gym using the teleop keyboard program.
2. Cancel/Kill all running ROS programs by typing "ctrl+C" in each terminal.
3. Shutdown the computer.
4. Press the small metal button on the power box in the middle of the robot body. The base should turn off and the power button light will turn off after a short time. At this point you can move the bot by hand if you need to make any adjustments to its position.
5. When the bot has powered down, plug the charger into the back of the robot base and ensure that it is securely connected using the screw terminals on the connector.