diff --git a/README.md b/README.md index 129ab3a..e84585d 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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 @@ -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. \ No newline at end of file diff --git a/demo.md b/demo_v2.md similarity index 77% rename from demo.md rename to demo_v2.md index cbee085..2e41764 100644 --- a/demo.md +++ b/demo_v2.md @@ -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. @@ -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: @@ -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. \ No newline at end of file diff --git a/demo_v4.md b/demo_v4.md new file mode 100644 index 0000000..89381ba --- /dev/null +++ b/demo_v4.md @@ -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:* +>``` +>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.