├── .gitignore ├── README.md ├── README_Melodic.md ├── bv80bot ├── bv80bot_node │ ├── CMakeLists.txt │ ├── config │ │ └── rviz.rviz │ ├── launch │ │ ├── bv80bot_base_map.launch │ │ ├── bv80bot_base_nav.launch │ │ ├── bv80bot_base_only.launch │ │ ├── bv80bot_gui_only.launch │ │ ├── bv80bot_map_gui.launch │ │ ├── bv80bot_nav_gui.launch │ │ └── include │ │ │ ├── bv80bot_base.launch │ │ │ ├── bv80bot_base_cam.launch │ │ │ ├── bv80bot_gui.launch │ │ │ ├── bv80bot_map.launch │ │ │ ├── bv80bot_nav.launch │ │ │ ├── keyboard_teleop.launch │ │ │ ├── logitech_teleop.launch │ │ │ ├── ps3_teleop.launch │ │ │ ├── velocity_smoother.launch │ │ │ └── xbox360_teleop.launch │ ├── package.xml │ ├── param │ │ ├── defaults │ │ │ └── smoother.yaml │ │ └── mux.yaml │ └── scripts │ │ ├── BumperToLaser.py │ │ ├── bumper.py │ │ └── test_odom.sh └── neato_robot │ ├── README.md │ ├── neato_2dnav │ ├── .gitignore │ ├── CMakeLists.txt │ ├── launch │ │ ├── amcl.launch │ │ └── move_base.launch │ ├── package.xml │ └── param │ │ ├── base_local_planner_params.yaml │ │ ├── costmap_common_params.yaml │ │ ├── global_costmap_params.yaml │ │ └── local_costmap_params.yaml │ ├── neato_driver │ ├── CMakeLists.txt │ ├── package.xml │ ├── rosdoc.yaml │ ├── setup.py │ └── src │ │ └── neato_driver │ │ ├── __init__.py │ │ ├── neato_driver.py │ │ └── neato_driver.py_bk │ ├── neato_node │ ├── CMakeLists.txt │ ├── launch │ │ └── bringup.launch │ ├── meshes │ │ ├── neato.dae │ │ └── neato.skp │ ├── msg │ │ ├── Button.msg │ │ └── Sensor.msg │ ├── neato.rviz │ ├── nodes │ │ └── neato.py │ ├── package.xml │ └── urdf │ │ └── neato.urdf.xacro │ └── neato_robot │ ├── CMakeLists.txt │ └── package.xml ├── documents ├── Roll Your Own Turtlebot Part II.odt ├── SV ROS Class 2.odp ├── SV ROS Class1 ROS.odp ├── Simulation Notes ├── botvacusb.jpg ├── readme.txt └── ros_messages_keynote.tar.gz └── sample_code ├── beginner_tutorials ├── CMakeLists.txt ├── msg │ └── distance.msg ├── package.xml ├── scripts │ ├── AdcToDistance.py │ ├── AdcToDistance_Client.py │ ├── Sonar_Node.py │ └── bumper.py └── srv │ ├── AdcToDistance.srv │ ├── AddTwoInts.srv │ └── AnalogToDistance.srv └── svros_single_sonar └── svros_single_sonar.ino /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | bin/ 3 | lib/ 4 | msg_gen/ 5 | srv_gen/ 6 | msg/*Action.msg 7 | msg/*ActionFeedback.msg 8 | msg/*ActionGoal.msg 9 | msg/*ActionResult.msg 10 | msg/*Feedback.msg 11 | msg/*Goal.msg 12 | msg/*Result.msg 13 | msg/_*.py 14 | 15 | # Generated by dynamic reconfigure 16 | *.cfgc 17 | /cfg/cpp/ 18 | /cfg/*.py 19 | 20 | # Ignore generated docs 21 | *.dox 22 | *.wikidoc 23 | 24 | # eclipse stuff 25 | .project 26 | .cproject 27 | 28 | # qcreator stuff 29 | CMakeLists.txt.user 30 | 31 | srv/_*.py 32 | *.pcd 33 | *.pyc 34 | qtcreator-* 35 | *.user 36 | 37 | /planning/cfg 38 | /planning/docs 39 | /planning/src 40 | 41 | *~ 42 | 43 | # Emacs 44 | .#* 45 | 46 | # Catkin custom files 47 | CATKIN_IGNORE 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # intro_to_ros 2 | Repository of packages and info for the SV-ROS Intro To ROS training series 3 | 4 | This repo will contain the software and documents for the SV-ROS 2015 Intro to Ros training series. 5 | 6 | As of January, 2018, many updates have occurred, so we will be updating the documentation. 7 | 8 | The series involves a set of talks presenting a general introduction to ROS and building ROS Robots. 9 | 10 | Reference Robot designs are provided as a guide to getting started. 11 | 12 | The first of these is a robot built on the Neato BV80 base and using a Raspberry PI III. The PI III has built in WiFi and Blue Tooth, but because of this the default names of ttyUSB0 needs to be changed to ttyACM0 in order to connect to the robot. 13 | 14 | The ROS packages and drivers for this robot can be found in the bv80bot folder(s). 15 | 16 | The driver is based on a modified Neato Driver first created by Michael Ferguson. 17 | 18 | 19 | ## Background info 20 | The following link provides the basic command set for the BV80 over the USB serial port. 21 | 22 | Also type HELP in a terminal connected to the port to get the built in command help info. 23 | 24 | USB Serial API doc - https://tinyurl.com/Neato-Programmers-Manual 25 | 26 | Other useful info on the Lidar 27 | 28 | https://github.com/rohbotics/xv11hacking/tree/master/mainSpace 29 | 30 | -- 31 | ## Settingup the Robot/Rasperry PI 32 | ------- 33 | 34 | ### Initial SD Card Image 35 | 36 | The robot is built from a Raspberry PI III SBC and a Neato BV80 or later robot vacuum base. 37 | 38 | To start use a blank 16Gb or 32Gb SDcard and install the Ubuntu Image from Ubiquity robotics: 39 | 40 | Follow the instructions from Ubiquity Robotics for building a ROS image on the PI. 41 | https://downloads.ubiquityrobotics.com This will allow you to place a ROS image on a 16Gb or 32Gb SD card which can 42 | then directly boot the PI with ubuntu 16.04 and ROS Kinetic pre installed. Since this image is for another robot, 43 | additional modifications to the PI's OS will be required to make a working robot as detailed below. 44 | 45 | ### Setup the Intro to ROS Packages 46 | 47 | After creating the SDCard insert it into the Rasperry PI and boot it - at this point its best if you have an HDMI monitor, mouse and keyboard attached or you can work via an SSH terminal session. 48 | 49 | Initial login using: 50 | 51 | user - ubuntu 52 | password- ubuntu 53 | 54 | First disable the pre loaded ubiquity robotics ROS stacks that are auto started with the following command: 55 | 56 | ```sudo systemctl disable magni-base``` 57 | 58 | If you don't always want to login as the ubuntu user you may want to create a new user - just follow standard Ubuntu admin steps to do this. 59 | 60 | Login as your prefered user. 61 | 62 | Use the normal Ubuntu networking steps to connect to a suitable WiFi network. 63 | 64 | Now update the installed image: 65 | 66 | ``` 67 | sudo apt-get update 68 | sudo apt-get upgrade 69 | ``` 70 | 71 | Make sure ROS files are up to date: 72 | 73 | ``` 74 | rosdep update 75 | ``` 76 | 77 | Create a new ROS catkin workspace under your home directory, then git clone the intro_to_ros repo to the catkin_ws/src folder. 78 | 79 | Note: do this on both your PC/Laptop and the Raspberry PI., 80 | 81 | you need copies of the files on both computers. 82 | 83 | ``` 84 | mkdir -p ~/catkin_ws/src 85 | cd ~/catkin_ws/src 86 | git clone https://github.com/SV-ROS/intro_to_ros.git 87 | ``` 88 | Optional, but highly recommended: 89 | 90 | ``` 91 | git clone https://github.com/pirobot/rbx1 92 | git clone https://github.com/vanadiumlabs/arbotix_ros 93 | ``` 94 | 95 | 96 | Also install the depedancies using the following command: 97 | 98 | 99 | ``` 100 | cd ~/catkin_ws 101 | 102 | rosdep install --from-paths src --ignore-src -r -y 103 | ``` 104 | 105 | If you receive an error: 106 | ```'Cannot locate rosdep definition for [yocs-velocity-smoother]'``` 107 | you will need to install it manualy 108 | 109 | ```sudo apt-get install ros--yocs-velocity-smoother``` 110 | 111 | 112 | do a catkin_make on the workspace (on both computers) 113 | 114 | ``` 115 | cd ~/catkin_ws 116 | catkin_make 117 | ``` 118 | 119 | Now you can update the .bashrc file in your home directory. 120 | 121 | open ~/.bashrc in vi or whatever text editor you prefer. 122 | 123 | Near the end find the line: 124 | 125 | ``` 126 | source /opt/ros//setup.bash 127 | ``` 128 | 129 | comment out this line and replace it as shown: 130 | 131 | ``` 132 | # source /opt/ros//setup.bash 133 | source ~/catkin_ws/devel/setup.bash 134 | ``` 135 | 136 | Note: in the above change <distro> to kinetic or melodic depending on what platform you are using 137 | 138 | Save and close the editor 139 | 140 | now close and reopen a terminal or just source ~/.bashrc 141 | 142 | You should now be able to launch the ROS code as discussed below. 143 | 144 | 145 | 146 | 147 | ## Running the Robot 148 | 149 | There are a number of different way to launch the robot depending on where you want to run the packages. 150 | 151 | The robot can be run in two modes - mapping and navigation, you must first run the robot in mapping mode to create a map to use later for navigation. 152 | 153 | 154 | Packages for mapping an navigation can be run either on the robot or the PC/Laptop, the following gives the launch commands for each configuration: 155 | 156 | Mapping Mode: 157 | 158 | Launch the ros packages for mapping on the robot: 159 | 160 | on the Raspberry PI -- roslaunch bv80bot_node bv80bot_base_map.launch 161 | on the PC/Laptop -- roslaunch bv80bot_node bv80bot_gui_only.launch 162 | 163 | 164 | Launch the ros packages for mapping on the PC/Laptop: 165 | 166 | on the Raspberry PI -- roslaunch bv80bot_node bv80bot_base_only.launch 167 | on the PC/Laptop -- roslaunch bv80bot_node bv80bot_map_gui.launch 168 | 169 | Drive around with the joystick/keyboard until you have a good enough map (see below for telop configuration). 170 | 171 | Once you have crated a map you like you must save it before you stop running the nodes launched above. 172 | You can save the map to the PI or the Laptop/PC, you should save it to the computer you intend to run the nav nodes on later. 173 | 174 | So on the appropriate computer, (PC/Laptop or the PI) save the map as follows: 175 | ``` 176 | roscd neato_2dnav/maps 177 | rosrun map_server map_saver 178 | ``` 179 | The map will be saved as two files in the .../neato_2dnav/maps folder, map.yaml, map.pgm 180 | 181 | 182 | Navigation Mode: 183 | 184 | Launch the ros packages for navigation on the robot (if you saved your map to the PI): 185 | 186 | on the Raspberry PI -- roslaunch bv80bot_node bv80bot_base_nav.launch 187 | on the PC/Laptop -- roslaunch bv80bot_node bv80bot_gui_only.launch 188 | 189 | 190 | Launch the ros packages for navigation on the PC/Laptop (if you saved your map to the PC/Laptop): 191 | 192 | on the Raspberry PI -- roslaunch bv80bot_node bv80bot_base_only.launch 193 | on the PC/Laptop -- roslaunch bv80bot_node bv80bot_nav_gui.launch 194 | 195 | You should now be able to set the robots pose in rviz and set nav goals for the robot to goto with the 2d nav goal button in rviz. 196 | 197 | 198 | Teleop Configuration: 199 | 200 | The launch files mentioned can be configured to use 1 of 4 teleop controllers: 201 | - ps3 joystick 202 | - xbox360 joystick 203 | - logitech joypad 204 | - keyboard 205 | 206 | There is an argument at the top of the bv80bot_base.launch file as shown below: 207 | 208 | ~/catkin_ws/src/intro_to_ros/bv80bot/bv80bot_node/launch/include/bv80bot_base.launch 209 | ``` 210 | 211 | 217 | 218 | ``` 219 | 220 | Change the value of the default argument shown above to one of the indicated choices to change your controler settings/configuration. 221 | 222 | 223 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /README_Melodic.md: -------------------------------------------------------------------------------- 1 | Here are some quick notes on running under Ubuntu 18.04 and ROS-Melodic. 2 | I was able to get it working with some minor headaches. 3 | 4 | After a full install of Ubuntu 18.04 and ros-melodic-ddesktop-full 5 | 6 | add the default user to the dialout group 7 | apt install or check that openssh-server is installed 8 | apt install ros-melodic-turtlebot* (may be overkill) and ros-melodic-yocs* 9 | so far I havent been able to locate the turtlebot-teleop-joy node in melodic, 10 | so I don't have a joystick working. 11 | 12 | Assuming you've built a catkin_ws, git clone this repository and catkin_make 13 | 14 | I was using an older Acer small laptop originally supplied with a Turtlebot2. 15 | Make sure your dev/tty is USB0 or ACM0 and that it is properly noted in the bv80bot drivers, 16 | by default it is ttyACM0, but some computers point to ttyUSB0. 17 | 18 | If you are attached to the Botvac USB port, launching the bv80bot_node base_only.launch should start the Lidar spinning. 19 | 20 | There will be some error messages about not finding the joystick. 21 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(bv80bot_node) 3 | 4 | ## Find catkin macros and libraries 5 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 6 | ## is used, also find other catkin packages 7 | find_package(catkin REQUIRED) 8 | 9 | ## System dependencies are found with CMake's conventions 10 | # find_package(Boost REQUIRED COMPONENTS system) 11 | 12 | 13 | ## Uncomment this if the package has a setup.py. This macro ensures 14 | ## modules and global scripts declared therein get installed 15 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 16 | # catkin_python_setup() 17 | 18 | ################################################ 19 | ## Declare ROS messages, services and actions ## 20 | ################################################ 21 | 22 | ## To declare and build messages, services or actions from within this 23 | ## package, follow these steps: 24 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 25 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 26 | ## * In the file package.xml: 27 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 28 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 29 | ## pulled in transitively but can be declared for certainty nonetheless: 30 | ## * add a build_depend tag for "message_generation" 31 | ## * add a run_depend tag for "message_runtime" 32 | ## * In this file (CMakeLists.txt): 33 | ## * add "message_generation" and every package in MSG_DEP_SET to 34 | ## find_package(catkin REQUIRED COMPONENTS ...) 35 | ## * add "message_runtime" and every package in MSG_DEP_SET to 36 | ## catkin_package(CATKIN_DEPENDS ...) 37 | ## * uncomment the add_*_files sections below as needed 38 | ## and list every .msg/.srv/.action file to be processed 39 | ## * uncomment the generate_messages entry below 40 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 41 | 42 | ## Generate messages in the 'msg' folder 43 | # add_message_files( 44 | # FILES 45 | # Message1.msg 46 | # Message2.msg 47 | # ) 48 | 49 | ## Generate services in the 'srv' folder 50 | # add_service_files( 51 | # FILES 52 | # Service1.srv 53 | # Service2.srv 54 | # ) 55 | 56 | ## Generate actions in the 'action' folder 57 | # add_action_files( 58 | # FILES 59 | # Action1.action 60 | # Action2.action 61 | # ) 62 | 63 | ## Generate added messages and services with any dependencies listed here 64 | # generate_messages( 65 | # DEPENDENCIES 66 | # std_msgs # Or other packages containing msgs 67 | # ) 68 | 69 | ################################### 70 | ## catkin specific configuration ## 71 | ################################### 72 | ## The catkin_package macro generates cmake config files for your package 73 | ## Declare things to be passed to dependent projects 74 | ## INCLUDE_DIRS: uncomment this if you package contains header files 75 | ## LIBRARIES: libraries you create in this project that dependent projects also need 76 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 77 | ## DEPENDS: system dependencies of this project that dependent projects also need 78 | catkin_package( 79 | # INCLUDE_DIRS include 80 | # LIBRARIES bv80bot 81 | # CATKIN_DEPENDS other_catkin_pkg 82 | # DEPENDS system_lib 83 | ) 84 | 85 | ########### 86 | ## Build ## 87 | ########### 88 | 89 | ## Specify additional locations of header files 90 | ## Your package locations should be listed before other locations 91 | # include_directories(include) 92 | 93 | ## Declare a cpp library 94 | # add_library(bv80bot 95 | # src/${PROJECT_NAME}/bv80bot.cpp 96 | # ) 97 | 98 | ## Declare a cpp executable 99 | # add_executable(bv80bot_node src/bv80bot_node.cpp) 100 | 101 | ## Add cmake target dependencies of the executable/library 102 | ## as an example, message headers may need to be generated before nodes 103 | # add_dependencies(bv80bot_node bv80bot_generate_messages_cpp) 104 | 105 | ## Specify libraries to link a library or executable target against 106 | # target_link_libraries(bv80bot_node 107 | # ${catkin_LIBRARIES} 108 | # ) 109 | 110 | ############# 111 | ## Install ## 112 | ############# 113 | 114 | # all install targets should use catkin DESTINATION variables 115 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 116 | 117 | ## Mark executable scripts (Python etc.) for installation 118 | ## in contrast to setup.py, you can choose the destination 119 | # install(PROGRAMS 120 | # scripts/my_python_script 121 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 122 | # ) 123 | 124 | ## Mark executables and/or libraries for installation 125 | # install(TARGETS bv80bot bv80bot_node 126 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 127 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 128 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 129 | # ) 130 | 131 | ## Mark cpp header files for installation 132 | # install(DIRECTORY include/${PROJECT_NAME}/ 133 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 134 | # FILES_MATCHING PATTERN "*.h" 135 | # PATTERN ".svn" EXCLUDE 136 | # ) 137 | 138 | ## Mark other files for installation (e.g. launch and bag files, etc.) 139 | # install(FILES 140 | # # myfile1 141 | # # myfile2 142 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 143 | # ) 144 | 145 | ############# 146 | ## Testing ## 147 | ############# 148 | 149 | ## Add gtest based cpp test target and link libraries 150 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_bv80bot.cpp) 151 | # if(TARGET ${PROJECT_NAME}-test) 152 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 153 | # endif() 154 | 155 | ## Add folders to be run by python nosetests 156 | # catkin_add_nosetests(test) 157 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/config/rviz.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | - /Map1 10 | - /RobotModel1 11 | - /LaserScan1 12 | - /Pose1 13 | - /Global Cost Map1 14 | - /Local Cost Map1 15 | - /Path1 16 | Splitter Ratio: 0.5 17 | Tree Height: 1088 18 | - Class: rviz/Selection 19 | Name: Selection 20 | - Class: rviz/Tool Properties 21 | Expanded: 22 | - /2D Pose Estimate1 23 | - /2D Nav Goal1 24 | - /Publish Point1 25 | Name: Tool Properties 26 | Splitter Ratio: 0.5886790156364441 27 | - Class: rviz/Views 28 | Expanded: 29 | - /Current View1 30 | Name: Views 31 | Splitter Ratio: 0.5 32 | - Class: rviz/Time 33 | Experimental: false 34 | Name: Time 35 | SyncMode: 0 36 | SyncSource: LaserScan 37 | Preferences: 38 | PromptSaveOnExit: true 39 | Toolbars: 40 | toolButtonStyle: 2 41 | Visualization Manager: 42 | Class: "" 43 | Displays: 44 | - Alpha: 0.5 45 | Cell Size: 1 46 | Class: rviz/Grid 47 | Color: 160; 160; 164 48 | Enabled: true 49 | Line Style: 50 | Line Width: 0.029999999329447746 51 | Value: Lines 52 | Name: Grid 53 | Normal Cell Count: 0 54 | Offset: 55 | X: 0 56 | Y: 0 57 | Z: 0 58 | Plane: XY 59 | Plane Cell Count: 10 60 | Reference Frame: 61 | Value: true 62 | - Alpha: 0.699999988079071 63 | Class: rviz/Map 64 | Color Scheme: map 65 | Draw Behind: true 66 | Enabled: true 67 | Name: Map 68 | Topic: /map 69 | Unreliable: false 70 | Use Timestamp: false 71 | Value: true 72 | - Alpha: 1 73 | Class: rviz/RobotModel 74 | Collision Enabled: false 75 | Enabled: true 76 | Links: 77 | All Links Enabled: true 78 | Expand Joint Details: false 79 | Expand Link Details: false 80 | Expand Tree: false 81 | Link Tree Style: Links in Alphabetic Order 82 | base_footprint: 83 | Alpha: 1 84 | Show Axes: false 85 | Show Trail: false 86 | base_link: 87 | Alpha: 1 88 | Show Axes: false 89 | Show Trail: false 90 | Value: true 91 | Name: RobotModel 92 | Robot Description: robot_description 93 | TF Prefix: "" 94 | Update Interval: 0 95 | Value: true 96 | Visual Enabled: true 97 | - Alpha: 1 98 | Autocompute Intensity Bounds: true 99 | Autocompute Value Bounds: 100 | Max Value: 10 101 | Min Value: -10 102 | Value: true 103 | Axis: Z 104 | Channel Name: intensity 105 | Class: rviz/LaserScan 106 | Color: 255; 0; 0 107 | Color Transformer: Intensity 108 | Decay Time: 0 109 | Enabled: true 110 | Invert Rainbow: false 111 | Max Color: 255; 255; 255 112 | Max Intensity: 2669 113 | Min Color: 0; 0; 0 114 | Min Intensity: 10 115 | Name: LaserScan 116 | Position Transformer: XYZ 117 | Queue Size: 10 118 | Selectable: true 119 | Size (Pixels): 3 120 | Size (m): 0.029999999329447746 121 | Style: Flat Squares 122 | Topic: /scan 123 | Unreliable: false 124 | Use Fixed Frame: true 125 | Use rainbow: true 126 | Value: true 127 | - Alpha: 1 128 | Axes Length: 1 129 | Axes Radius: 0.10000000149011612 130 | Class: rviz/Pose 131 | Color: 255; 25; 0 132 | Enabled: true 133 | Head Length: 0.30000001192092896 134 | Head Radius: 0.10000000149011612 135 | Name: Pose 136 | Shaft Length: 1 137 | Shaft Radius: 0.05000000074505806 138 | Shape: Arrow 139 | Topic: /move_base_simple/goal 140 | Unreliable: false 141 | Value: true 142 | - Alpha: 0.20000000298023224 143 | Class: rviz/Map 144 | Color Scheme: costmap 145 | Draw Behind: false 146 | Enabled: true 147 | Name: Global Cost Map 148 | Topic: /move_base/global_costmap/costmap 149 | Unreliable: false 150 | Use Timestamp: false 151 | Value: true 152 | - Alpha: 0.4000000059604645 153 | Class: rviz/Map 154 | Color Scheme: costmap 155 | Draw Behind: false 156 | Enabled: true 157 | Name: Local Cost Map 158 | Topic: /move_base/local_costmap/costmap 159 | Unreliable: false 160 | Use Timestamp: false 161 | Value: true 162 | - Class: rviz/TF 163 | Enabled: false 164 | Frame Timeout: 15 165 | Frames: 166 | All Enabled: true 167 | Marker Scale: 1 168 | Name: TF 169 | Show Arrows: true 170 | Show Axes: true 171 | Show Names: true 172 | Tree: 173 | {} 174 | Update Interval: 0 175 | Value: false 176 | - Alpha: 1 177 | Buffer Length: 1 178 | Class: rviz/Path 179 | Color: 25; 255; 0 180 | Enabled: true 181 | Head Diameter: 0.30000001192092896 182 | Head Length: 0.20000000298023224 183 | Length: 0.30000001192092896 184 | Line Style: Lines 185 | Line Width: 0.029999999329447746 186 | Name: Path 187 | Offset: 188 | X: 0 189 | Y: 0 190 | Z: 0 191 | Pose Color: 255; 85; 255 192 | Pose Style: None 193 | Radius: 0.029999999329447746 194 | Shaft Diameter: 0.10000000149011612 195 | Shaft Length: 0.10000000149011612 196 | Topic: /move_base/NavfnROS/plan 197 | Unreliable: false 198 | Value: true 199 | Enabled: true 200 | Global Options: 201 | Background Color: 48; 48; 48 202 | Default Light: true 203 | Fixed Frame: map 204 | Frame Rate: 30 205 | Name: root 206 | Tools: 207 | - Class: rviz/Interact 208 | Hide Inactive Objects: true 209 | - Class: rviz/MoveCamera 210 | - Class: rviz/Select 211 | - Class: rviz/FocusCamera 212 | - Class: rviz/Measure 213 | - Class: rviz/SetInitialPose 214 | Theta std deviation: 0.2617993950843811 215 | Topic: /initialpose 216 | X std deviation: 0.5 217 | Y std deviation: 0.5 218 | - Class: rviz/SetGoal 219 | Topic: /move_base_simple/goal 220 | - Class: rviz/PublishPoint 221 | Single click: true 222 | Topic: /clicked_point 223 | Value: true 224 | Views: 225 | Current: 226 | Class: rviz/Orbit 227 | Distance: 28.85738182067871 228 | Enable Stereo Rendering: 229 | Stereo Eye Separation: 0.05999999865889549 230 | Stereo Focal Distance: 1 231 | Swap Stereo Eyes: false 232 | Value: false 233 | Focal Point: 234 | X: -2.3600056171417236 235 | Y: -0.19190384447574615 236 | Z: -1.2856594324111938 237 | Focal Shape Fixed Size: true 238 | Focal Shape Size: 0.05000000074505806 239 | Invert Z Axis: false 240 | Name: Current View 241 | Near Clip Distance: 0.009999999776482582 242 | Pitch: 0.9748003482818604 243 | Target Frame: 244 | Value: Orbit (rviz) 245 | Yaw: 1.8972197771072388 246 | Saved: ~ 247 | Window Geometry: 248 | Displays: 249 | collapsed: false 250 | Height: 1385 251 | Hide Left Dock: false 252 | Hide Right Dock: false 253 | QMainWindow State: 000000ff00000000fd000000040000000000000229000004cbfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f00700065007200740069006500730200000780000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000004cb000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000004cbfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000004cb000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000009bd0000003efc0100000002fb0000000800540069006d00650100000000000009bd000002eb00fffffffb0000000800540069006d0065010000000000000450000000000000000000000679000004cb00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 254 | Selection: 255 | collapsed: false 256 | Time: 257 | collapsed: false 258 | Tool Properties: 259 | collapsed: false 260 | Views: 261 | collapsed: false 262 | Width: 2493 263 | X: 3067 264 | Y: 59 265 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_base_map.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_base_nav.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_base_only.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_gui_only.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_map_gui.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/bv80bot_nav_gui.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/bv80bot_base.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/bv80bot_base_cam.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/bv80bot_gui.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/bv80bot_map.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/bv80bot_nav.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/keyboard_teleop.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/logitech_teleop.launch: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/ps3_teleop.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/velocity_smoother.launch: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/launch/include/xbox360_teleop.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | bv80bot_node 4 | 0.0.0 5 | The bv80bot_node package provides the drivers and configuration for using a Neato BV80 with a raspberry PI II SBC 6 | 7 | 8 | 9 | 10 | ralph 11 | 12 | 13 | 14 | 15 | 16 | BSD 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | yocs_cmd_vel_mux 45 | xacro 46 | yocs_velocity_smoother 47 | teleop_twist_joy 48 | teleop_twist_keyboard 49 | joy 50 | roscpp 51 | sensor_msgs 52 | move_base 53 | map_server 54 | amcl 55 | gmapping 56 | dwa_local_planner 57 | 58 | catkin 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/param/defaults/smoother.yaml: -------------------------------------------------------------------------------- 1 | # Default parameters used by the yocs_velocity_smoother module. 2 | # This isn't used by minimal.launch per se, rather by everything 3 | # which runs on top. 4 | 5 | # Mandatory parameters 6 | speed_lim_v: 0.8 7 | speed_lim_w: 5.4 8 | 9 | accel_lim_v: 0.6 10 | accel_lim_w: 5.4 11 | 12 | # Optional parameters 13 | frequency: 20.0 14 | decel_factor: 1.0 15 | 16 | # Robot velocity feedback type: 17 | # 0 - none (default) 18 | # 1 - odometry 19 | # 2 - end robot commands 20 | robot_feedback: 1 21 | 22 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/param/mux.yaml: -------------------------------------------------------------------------------- 1 | # Created on: Oct 29, 2012 2 | # Author: jorge 3 | # Configuration for subscribers to multiple cmd_vel sources. 4 | # 5 | # Individual subscriber configuration: 6 | # name: Source name 7 | # topic: The topic that provides cmd_vel messages 8 | # timeout: Time in seconds without incoming messages to consider this topic inactive 9 | # priority: Priority: an UNIQUE unsigned integer from 0 (lowest) to MAX_INT 10 | # short_desc: Short description (optional) 11 | 12 | subscribers: 13 | - name: "Teleoperation" 14 | topic: "input/teleop" 15 | timeout: 0.2 16 | priority: 7 17 | - name: "Navigation" 18 | topic: "input/navi" 19 | timeout: 2.0 20 | priority: 5 21 | 22 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/scripts/BumperToLaser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # license removed for brevity 3 | import roslib; roslib.load_manifest("neato_node") 4 | import rospy 5 | from neato_node.msg import Button, Sensor 6 | from sensor_msgs.msg import LaserScan 7 | 8 | class NeatoNode: 9 | 10 | def __init__(self): 11 | self.default_frame_id = '/base_laser_link' 12 | self.sequence = 1 13 | self.pub = rospy.Publisher('scan', LaserScan, queue_size=1) 14 | self.sensorPub = rospy.Publisher('sensor', Sensor, queue_size=10) 15 | sensor = Sensor() 16 | 17 | def callback(self, sensor): 18 | #rospy.loginfo(rospy.get_caller_id() + ' I heard %s',sensor.name) 19 | 20 | laserscan = LaserScan() 21 | laserscan.header.stamp = rospy.Time.now() 22 | laserscan.header.seq = self.sequence 23 | laserscan.header.frame_id = self.default_frame_id 24 | self.sequence = self.sequence + 1 25 | if (sensor.name == "Left_Side_Bumper"): 26 | laserscan.angle_min = 0.6 27 | laserscan.angle_max = 1 28 | laserscan.range_min = 0.0 29 | laserscan.range_max = 0.3 30 | laserscan.ranges = [0.29, 0.29] 31 | elif (sensor.name == "Left_Bumper"): 32 | laserscan.angle_min = 0.6 33 | laserscan.angle_max = 1 34 | laserscan.range_min = 0.0 35 | laserscan.range_max = 0.3 36 | laserscan.ranges = [0.29, 0.29] 37 | elif (sensor.name == "Right_Bumper"): 38 | laserscan.angle_min = -0.6 39 | laserscan.angle_max = 0 40 | laserscan.range_min = 0.0 41 | laserscan.range_max = 0.3 42 | laserscan.ranges = [0.29, 0.29] 43 | elif (sensor.name == "Right_Side_Bumper"): 44 | laserscan.angle_min = -0.6 45 | laserscan.angle_max = 0 46 | laserscan.range_min = 0.0 47 | laserscan.range_max = 0.3 48 | laserscan.ranges = [0.29, 0.29] 49 | 50 | #rospy.loginfo(laserscan) 51 | self.pub.publish(laserscan) 52 | 53 | def listener(self): 54 | rospy.init_node('bumperToLaser', anonymous=True) 55 | rospy.loginfo(rospy.get_caller_id() + 'listener start') 56 | # In ROS, nodes are uniquely named. If two nodes with the same 57 | # name are launched, the previous one is kicked off. The 58 | # anonymous=True flag means that rospy will choose a unique 59 | # name for our 'listener' node so that multiple listeners can 60 | # run simultaneously. 61 | rospy.loginfo(rospy.get_caller_id() + 'listener init_node') 62 | 63 | rospy.Subscriber('sensor', Sensor, self.callback) 64 | rospy.loginfo(rospy.get_caller_id() + 'listener set subscriber') 65 | 66 | # spin() simply keeps python from exiting until this node is stopped 67 | rospy.spin() 68 | 69 | if __name__ == '__main__': 70 | print("main start") 71 | node = NeatoNode() 72 | node.listener() 73 | #### 74 | 75 | 76 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/scripts/bumper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2008, Willow Garage, Inc. 3 | # All rights reserved. 4 | # 5 | ## Simple talker demo that listens to std_msgs/Strings published 6 | ## to the 'chatter' topic 7 | # 8 | # 2017 Alan Federman SV-ROS 9 | # 10 | # A simple listener for the SV_ROS (from neato_node) the listens to see if 11 | # the bumper has been pressed on a Botvac. 12 | # 13 | # This code can be incuded in navigation scripts to halt or turn the robot if 14 | # the bumper has been pressed 15 | # 16 | # the values are Left_Bumper Right_Bumper Left_Side_Bumper Right_Side_Bumper 17 | # 18 | # to use install in catkin_ws in a node subdirectory on your laptop for example 19 | # /catkin_ws/src/test/src and rosrun test bumper.py -- of course set the master 20 | # and launch the base on the Botvac. 21 | # 22 | import roslib; roslib.load_manifest("neato_node") 23 | import rospy 24 | from math import sin,cos,pi 25 | 26 | from neato_node.msg import Button, Sensor 27 | 28 | class NeatoNode: 29 | 30 | def __init__(self): 31 | 32 | self.sensorPub = rospy.Publisher('sensor', Sensor, queue_size=10) 33 | sensor = Sensor() 34 | 35 | def callback(sensor): 36 | rospy.loginfo(rospy.get_caller_id() + ' I heard %s',sensor.name) 37 | 38 | def listener(): 39 | 40 | # In ROS, nodes are uniquely named. If two nodes with the same 41 | # name are launched, the previous one is kicked off. The 42 | # anonymous=True flag means that rospy will choose a unique 43 | # name for our 'listener' node so that multiple listeners can 44 | # run simultaneously. 45 | rospy.init_node('listener', anonymous=True) 46 | 47 | rospy.Subscriber('sensor', Sensor, callback) 48 | 49 | # spin() simply keeps python from exiting until this node is stopped 50 | rospy.spin() 51 | 52 | if __name__ == '__main__': 53 | listener() 54 | 55 | -------------------------------------------------------------------------------- /bv80bot/bv80bot_node/scripts/test_odom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rostopic pub --once /cmd_vel geometry_msgs/Twist "[0.0,0,0]" "[0,0,3]" 4 | rostopic pub --once /cmd_vel geometry_msgs/Twist "[0.0,0,0]" "[0,0,0]" 5 | 6 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/README.md: -------------------------------------------------------------------------------- 1 | Copy of the neato_robot package containing the Neato robot Drivers and nodes. 2 | 3 | Remove other copies before uing this repo. 4 | 5 | Changes to Origional 6 | 7 | -updated coms software in the driver (multi thread reads) 8 | 9 | -updated URDF 10 | 11 | -Added base_footprint frame 12 | 13 | -AMCL and Move base tuning updates 14 | 15 | -Added arg to switch from mapping and nav modes 16 | 17 | See Top level README.md for more details. 18 | 19 | 20 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/.gitignore: -------------------------------------------------------------------------------- 1 | maps 2 | 3 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(neato_2dnav) 3 | 4 | find_package(catkin REQUIRED) 5 | catkin_package(DEPENDS) 6 | 7 | install(DIRECTORY launch 8 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 9 | ) 10 | 11 | install(DIRECTORY maps 12 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 13 | ) 14 | 15 | install(DIRECTORY params 16 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 17 | ) 18 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/launch/amcl.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/launch/move_base.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/package.xml: -------------------------------------------------------------------------------- 1 | 2 | neato_2dnav 3 | 0.2.0 4 | 5 | This package contains configuration and launch files for using the navigation stack with Neato robots. 6 | 7 | Michael Ferguson 8 | Michael Ferguson 9 | BSD 10 | http://ros.org/wiki/neato_2dnav 11 | 12 | catkin 13 | 14 | neato_node 15 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/param/base_local_planner_params.yaml: -------------------------------------------------------------------------------- 1 | base_global_planner: navfn/NavfnROS 2 | base_local_planner: dwa_local_planner/DWAPlannerROS 3 | 4 | 5 | planner_frequency: 2.0 6 | controller_frequency: 1.5 7 | 8 | planner_patience: 5.0 9 | controller_patience: 5.0 10 | 11 | conservative_reset_dist: 6.0 12 | 13 | recovery_behavior_enabled: true 14 | clearing_rotation_allowed: true 15 | 16 | shutdown_cost_maps: true 17 | 18 | oscillation_timeout: 9.0 19 | oscillation_distance: 0.25 20 | 21 | 22 | 23 | DWAPlannerROS: 24 | 25 | max_vel_trans: 0.15 26 | min_vel_trans: 0.015 27 | 28 | max_vel_x: 0.15 29 | min_vel_x: -0.07 30 | 31 | max_vel_y: 0.01 32 | min_vel_y: -0.01 33 | 34 | max_vel_theta: 0.5 35 | min_vel_theta: 0.002 36 | 37 | acc_lim_x: 0.1 38 | acc_lim_y: 0.0 39 | acc_lim_theta: 0.5 40 | acc_lim_trans: 0.1 41 | 42 | xy_goal_tolerance: 0.075 43 | yaw_goal_tolerance: 0.25 44 | latch_xy_goal_tolerance: true 45 | prune_plan: true 46 | 47 | trans_stopped_vel: 0.1 48 | theta_stopped_vel: 0.1 49 | 50 | sim_time: 3.0 51 | sim_granularity: 0.025 52 | 53 | angular_sim_granularity: 0.015 54 | 55 | path_distance_bias: 50.0 56 | goal_distance_bias: 30.0 57 | occdist_scale: 0.9 58 | 59 | stop_time_buffer: 1.0 60 | 61 | oscillation_reset_dist: 0.05 62 | oscillation_reset_angle: 0.3 63 | 64 | forward_point_distance: 0.433 65 | 66 | scaling_speed: 0.5 67 | max_scaling_factor: 1.17 68 | 69 | vx_samples: 20 70 | vy_samples: 10 71 | vth_samples: 20 72 | 73 | use_dwa: true 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/param/costmap_common_params.yaml: -------------------------------------------------------------------------------- 1 | obstacle_range: 1.75 2 | raytrace_range: 5.0 3 | 4 | footprint: [[0.18, 0.18], [0.18, -0.18], [-0.08, -0.18], [-0.2, -0.060],[-0.2,0.060],[-0.08, 0.18]] 5 | 6 | observation_sources: scan 7 | scan: {sensor_frame: base_laser_link, data_type: LaserScan, topic: /scan, marking: true, clearing: true} 8 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/param/global_costmap_params.yaml: -------------------------------------------------------------------------------- 1 | global_costmap: 2 | transform_tolerance: 2.0 3 | 4 | update_frequency: 1.0 5 | publish_frequency: 2.0 6 | 7 | resolution: 0.05 8 | 9 | robot_radius: 0.0 10 | 11 | footprint_padding: 0.0 12 | 13 | 14 | static_map: true 15 | 16 | global_frame: map 17 | robot_base_frame: base_footprint 18 | 19 | inflation_layer: 20 | inflation_radius: 0.26 21 | cost_scaling_factor: 9.0 22 | 23 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_2dnav/param/local_costmap_params.yaml: -------------------------------------------------------------------------------- 1 | local_costmap: 2 | 3 | transform_tolerance: 1.0 4 | 5 | update_frequency: 2.0 6 | publish_frequency: 2.0 7 | 8 | width: 3.0 9 | height: 3.0 10 | 11 | rolling_window: true 12 | 13 | resolution: 0.05 14 | robot_radius: 0.23 15 | 16 | footprint_padding: 0.01 17 | 18 | global_frame: odom 19 | robot_base_frame: base_footprint 20 | 21 | inflation_layer: 22 | inflation_radius: 0.26 23 | cost_scaling_factor: 9.0 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(neato_driver) 3 | 4 | find_package(catkin REQUIRED) 5 | catkin_package() 6 | catkin_python_setup() 7 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/package.xml: -------------------------------------------------------------------------------- 1 | 2 | neato_driver 3 | 0.2.0 4 | 5 | This is a generic driver for the Neato's robotic vacuums. 6 | 7 | Michael Ferguson 8 | Michael Ferguson 9 | BSD 10 | http://ros.org/wiki/neato_driver 11 | 12 | catkin 13 | 14 | python-serial 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/rosdoc.yaml: -------------------------------------------------------------------------------- 1 | - builder: epydoc 2 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from distutils.core import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | d = generate_distutils_setup( 7 | packages=['neato_driver'], 8 | package_dir={'': 'src'}, 9 | ) 10 | 11 | setup(**d) 12 | 13 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/src/neato_driver/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/bv80bot/neato_robot/neato_driver/src/neato_driver/__init__.py -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/src/neato_driver/neato_driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Generic driver for the Neato XV-11 Robot Vacuum 4 | # Copyright (c) 2010 University at Albany. All right reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the University at Albany nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL VANADIUM LABS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 23 | # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | """ 29 | neato_driver.py is a generic driver for the Neato XV-11 Robotic Vacuum. 30 | ROS Bindings can be found in the neato_node package. 31 | """ 32 | 33 | __author__ = "ferguson@cs.albany.edu (Michael Ferguson)" 34 | 35 | import serial 36 | import rospy 37 | import time 38 | import threading 39 | 40 | BASE_WIDTH = 248 # millimeters 41 | MAX_SPEED = 300 # millimeters/second 42 | 43 | xv11_analog_sensors = [ "WallSensorInMM", 44 | "BatteryVoltageInmV", 45 | "LeftDropInMM", 46 | "RightDropInMM", 47 | "RightMagSensor", 48 | "LeftMagSensor", 49 | "XTemp0InC", 50 | "XTemp1InC", 51 | "VacuumCurrentInmA", 52 | "ChargeVoltInmV", 53 | "NotConnected1", 54 | "BatteryTemp1InC", 55 | "NotConnected2", 56 | "CurrentInmA", 57 | "NotConnected3", 58 | "BatteryTemp0InC" ] 59 | 60 | xv11_digital_sensors = [ "SNSR_DC_JACK_CONNECT", 61 | "SNSR_DUSTBIN_IS_IN", 62 | "SNSR_LEFT_WHEEL_EXTENDED", 63 | "SNSR_RIGHT_WHEEL_EXTENDED", 64 | "LSIDEBIT", 65 | "LFRONTBIT", 66 | "RSIDEBIT", 67 | "RFRONTBIT" ] 68 | 69 | xv11_motor_info = [ "Brush_MaxPWM", 70 | "Brush_PWM", 71 | "Brush_mVolts", 72 | "Brush_Encoder", 73 | "Brush_RPM", 74 | "Vacuum_MaxPWM", 75 | "Vacuum_PWM", 76 | "Vacuum_CurrentInMA", 77 | "Vacuum_Encoder", 78 | "Vacuum_RPM", 79 | "LeftWheel_MaxPWM", 80 | "LeftWheel_PWM", 81 | "LeftWheel_mVolts", 82 | "LeftWheel_Encoder", 83 | "LeftWheel_PositionInMM", 84 | "LeftWheel_RPM", 85 | "RightWheel_MaxPWM", 86 | "RightWheel_PWM", 87 | "RightWheel_mVolts", 88 | "RightWheel_Encoder", 89 | "RightWheel_PositionInMM", 90 | "RightWheel_RPM", 91 | "Laser_MaxPWM", 92 | "Laser_PWM", 93 | "Laser_mVolts", 94 | "Laser_Encoder", 95 | "Laser_RPM", 96 | "Charger_MaxPWM", 97 | "Charger_PWM", 98 | "Charger_mAH" ] 99 | 100 | xv11_charger_info = [ "FuelPercent", 101 | "BatteryOverTemp", 102 | "ChargingActive", 103 | "ChargingEnabled", 104 | "ConfidentOnFuel", 105 | "OnReservedFuel", 106 | "EmptyFuel", 107 | "BatteryFailure", 108 | "ExtPwrPresent", 109 | "ThermistorPresent[0]", 110 | "ThermistorPresent[1]", 111 | "BattTempCAvg[0]", 112 | "BattTempCAvg[1]", 113 | "VBattV", 114 | "VExtV", 115 | "Charger_mAH", 116 | "MaxPWM" ] 117 | 118 | 119 | #class xv11(): 120 | class Botvac(): 121 | def __init__(self, port="/dev/ttyUSB0"): 122 | 123 | self.port = serial.Serial(port,115200,timeout=0.1) 124 | 125 | if not self.port.isOpen(): 126 | rospy.logerror("Failed To Open Serial Port") 127 | return 128 | 129 | rospy.loginfo("Open Serial Port %s ok" % port) 130 | 131 | 132 | 133 | # Storage for motor and sensor information 134 | self.state = {"LeftWheel_PositionInMM": 0, "RightWheel_PositionInMM": 0,"LSIDEBIT":0,"RSIDEBIT":0,"LFRONTBIT":0,"RFRONTBIT":0} 135 | 136 | self.stop_state = True 137 | # turn things on 138 | 139 | 140 | self.comsData = [] 141 | self.responseData= [] 142 | self.currentResponse=[] 143 | 144 | self.reading = False 145 | 146 | self.readLock = threading.RLock() 147 | self.readThread = threading.Thread(None,self.read) 148 | self.readThread.start() 149 | 150 | self.port.flushInput() 151 | self.sendCmd("\n\n\n") 152 | self.port.flushInput() 153 | 154 | 155 | self.setTestMode("on") 156 | self.setLDS("on") 157 | 158 | time.sleep(0.5) 159 | self.setLed("ledgreen") 160 | 161 | self.base_width = BASE_WIDTH 162 | self.max_speed = MAX_SPEED 163 | 164 | self.flush() 165 | 166 | rospy.loginfo("Init Done") 167 | 168 | 169 | def exit(self): 170 | self.setLDS("off") 171 | self.setLed("buttonoff") 172 | 173 | time.sleep(1) 174 | 175 | self.setTestMode("off") 176 | self.port.flush() 177 | 178 | self.reading=False 179 | self.readThread.join() 180 | 181 | self.port.close() 182 | 183 | 184 | def setTestMode(self, value): 185 | """ Turn test mode on/off. """ 186 | self.sendCmd("testmode " + value) 187 | 188 | def setLDS(self, value): 189 | self.sendCmd("setldsrotation " + value ) 190 | 191 | def requestScan(self): 192 | """ Ask neato for an array of scan reads. """ 193 | self.sendCmd("getldsscan") 194 | 195 | def getScanRanges(self): 196 | 197 | """ Read values of a scan -- call requestScan first! """ 198 | ranges = list() 199 | intensities = list() 200 | 201 | angle = 0 202 | 203 | if not self.readTo("AngleInDegrees"): 204 | self.flush() 205 | return [] 206 | 207 | last=False 208 | while not last: #angle < 360: 209 | try: 210 | vals,last = self.getResponse() 211 | except Exception as ex: 212 | rospy.logerr("Exception Reading Neato lidar: " + str(ex)) 213 | last=True 214 | vals=[] 215 | 216 | vals = vals.split(",") 217 | 218 | if ((not last) and ord(vals[0][0])>=48 and ord(vals[0][0])<=57 ): 219 | #print angle, vals 220 | try: 221 | a = int(vals[0]) 222 | r = int(vals[1]) 223 | i = int(vals[2]) 224 | e = int(vals[3]) 225 | 226 | while (angle < a): 227 | ranges.append(0) 228 | intensities.append(0) 229 | angle +=1 230 | 231 | if(e==0): 232 | ranges.append(r/1000.0) 233 | intensities.append(i) 234 | else: 235 | ranges.append(0) 236 | intensities.append(0) 237 | except: 238 | ranges.append(0) 239 | intensities.append(0) 240 | 241 | angle += 1 242 | 243 | if len(ranges) != 360: 244 | rospy.loginfo( "Missing laser scans: got %d points" %len(ranges)) 245 | 246 | return ranges, intensities 247 | 248 | def setMotors(self, l, r, s): 249 | """ Set motors, distance left & right + speed """ 250 | #This is a work-around for a bug in the Neato API. The bug is that the 251 | #robot won't stop instantly if a 0-velocity command is sent - the robot 252 | #could continue moving for up to a second. To work around this bug, the 253 | #first time a 0-velocity is sent in, a velocity of 1,1,1 is sent. Then, 254 | #the zero is sent. This effectively causes the robot to stop instantly. 255 | if (int(l) == 0 and int(r) == 0 and int(s) == 0): 256 | if (not self.stop_state): 257 | self.stop_state = True 258 | l = 1 259 | r = 1 260 | s = 1 261 | else: 262 | self.stop_state = False 263 | 264 | self.sendCmd("setmotor" + 265 | " lwheeldist " + str(int(l)) + 266 | " rwheeldist " + str(int(r)) + 267 | " speed " + str(int(s))) 268 | 269 | def getMotors(self): 270 | """ Update values for motors in the self.state dictionary. 271 | Returns current left, right encoder values. """ 272 | 273 | self.sendCmd("getmotors") 274 | 275 | if not self.readTo("Parameter"): 276 | self.flush() 277 | return [0,0] 278 | 279 | last=False 280 | while not last: 281 | #for i in range(len(xv11_motor_info)): 282 | try: 283 | vals,last = self.getResponse() 284 | #print vals,last 285 | values = vals.split(",") 286 | self.state[values[0]] = float(values[1]) 287 | except Exception as ex: 288 | rospy.logerr("Exception Reading Neato motors: " + str(ex)) 289 | 290 | return [self.state["LeftWheel_PositionInMM"],self.state["RightWheel_PositionInMM"]] 291 | 292 | def getAnalogSensors(self): 293 | """ Update values for analog sensors in the self.state dictionary. """ 294 | 295 | self.sendCmd("getanalogsensors") 296 | 297 | if not self.readTo("SensorName"): 298 | self.flush() 299 | return 300 | 301 | last =False 302 | while not last: #for i in range(len(xv11_analog_sensors)): 303 | try: 304 | vals,last = self.getResponse() 305 | values = vals.split(",") 306 | self.state[values[0]] = int(values[1]) 307 | except Exception as ex: 308 | rospy.logerr("Exception Reading Neato Analog sensors: " + str(ex)) 309 | 310 | def getDigitalSensors(self): 311 | """ Update values for digital sensors in the self.state dictionary. """ 312 | 313 | 314 | self.sendCmd("getdigitalsensors") 315 | 316 | if not self.readTo("Digital Sensor Name"): 317 | self.flush() 318 | return [0, 0, 0, 0] 319 | 320 | last =False 321 | while not last: #for i in range(len(xv11_digital_sensors)): 322 | try: 323 | vals,last = self.getResponse() 324 | #print vals 325 | values = vals.split(",") 326 | self.state[values[0]] = int(values[1]) 327 | #print "Got Sensor: %s=%s" %(values[0],values[1]) 328 | except Exception as ex: 329 | rospy.logerr("Exception Reading Neato Digital sensors: " + str(ex)) 330 | return [self.state["LSIDEBIT"], self.state["RSIDEBIT"], self.state["LFRONTBIT"], self.state["RFRONTBIT"]] 331 | 332 | def getButtons(self): 333 | return [0,0,0,0,0] 334 | 335 | def getCharger(self): 336 | """ Update values for charger/battery related info in self.state dictionary. """ 337 | 338 | self.sendCmd("getcharger") 339 | 340 | if not self.readTo("Label"): 341 | self.flush() 342 | return 343 | 344 | last =False 345 | while not last: #for i in range(len(xv11_charger_info)): 346 | 347 | vals,last = self.getResponse() 348 | values=vals.split(",") 349 | try: 350 | self.state[values[0]] = int(values[1]) 351 | 352 | except Exception as ex: 353 | rospy.logerr("Exception Reading Neato charger info: " + str(ex)) 354 | 355 | def setBacklight(self, value): 356 | if value > 0: 357 | self.sendCmd("setled backlighton") 358 | else: 359 | self.sendCmd("setled backlightoff") 360 | 361 | def setLed(self,cmd): 362 | self.sendCmd("setled %s" % cmd) 363 | 364 | def setLED(self,cmd): 365 | self.setLed(cmd) 366 | 367 | def sendCmd(self,cmd): 368 | #rospy.loginfo("Sent command: %s"%cmd) 369 | self.port.write("%s\n" % cmd) 370 | 371 | def readTo(self,tag,timeout=1): 372 | try: 373 | line,last = self.getResponse(timeout) 374 | except: 375 | return False 376 | 377 | if line=="": 378 | return False 379 | 380 | while line.split(",")[0] != tag: 381 | try: 382 | line,last = self.getResponse(timeout) 383 | if line=="": 384 | return False 385 | except: 386 | return False 387 | 388 | return True 389 | 390 | # thread to read data from the serial port 391 | # buffers each line in a list (self.comsData) 392 | # when an end of response (^Z) is read, adds the complete list of response lines to self.responseData and resets the comsData list for the next command response. 393 | def read(self): 394 | self.reading = True 395 | line="" 396 | 397 | while(self.reading and not rospy.is_shutdown()): 398 | try: 399 | val = self.port.read(1) # read from serial 1 char at a time so we can parse each character 400 | except Exception as ex: 401 | rospy.logerr("Exception Reading Neato Serial: " + str(ex)) 402 | val=[] 403 | 404 | if len(val) > 0: 405 | 406 | ''' 407 | if ord(val[0]) < 32: 408 | print("'%s'"% hex(ord(val[0]))) 409 | else: 410 | print ("'%s'"%str(val)) 411 | ''' 412 | 413 | if ord(val[0]) ==13: # ignore the CRs 414 | pass 415 | 416 | elif ord(val[0]) == 26: # ^Z (end of response) 417 | if len(line) > 0: 418 | self.comsData.append(line) # add last line to response set if it is not empty 419 | #print("Got Last Line: %s" % line) 420 | line="" # clear the line buffer for the next line 421 | 422 | #print ("Got Last") 423 | with self.readLock: # got the end of the command response so add the full set of response data as a new item in self.responseData 424 | self.responseData.append(list(self.comsData)) 425 | 426 | self.comsData = [] # clear the bucket for the lines of the next command response 427 | 428 | elif ord(val[0]) == 10: # NL, terminate the current line and add it to the response data list (comsData) (if it is not a blank line) 429 | if len(line) > 0: 430 | self.comsData.append(line) 431 | #print("Got Line: %s" % line) 432 | line = "" # clear the bufer for the next line 433 | else: 434 | line=line+val # add the character to the current line buffer 435 | 436 | # read response data for a command 437 | # returns tuple (line,last) 438 | # line is one complete line of text from the command response 439 | # last = true if the line was the last line of the response data (indicated by a ^Z from the neato) 440 | # returns the next line of data from the buffer. 441 | # if the line was the last line last = true 442 | # if no data is avaialable and we timeout returns line="" 443 | def getResponse(self,timeout=1): 444 | 445 | # if we don't have any data in currentResponse, wait for more data to come in (or timeout) 446 | while (len(self.currentResponse)==0) and (not rospy.is_shutdown()) and timeout > 0: 447 | 448 | with self.readLock: # pop a new response data list out of self.responseData (should contain all data lines returned for the last sent command) 449 | if len(self.responseData) > 0: 450 | self.currentResponse = self.responseData.pop(0) 451 | #print "New Response Set" 452 | else: 453 | self.currentResponse=[] # no data to get 454 | 455 | if len(self.currentResponse)==0: # nothing in the buffer so wait (or until timeout) 456 | time.sleep(0.010) 457 | timeout=timeout-0.010 458 | 459 | # default to nothing to return 460 | line = "" 461 | last=False 462 | 463 | # if currentResponse has data pop the next line 464 | if not len(self.currentResponse)==0: 465 | line = self.currentResponse.pop(0) 466 | #print line,len(self.currentResponse) 467 | if len(self.currentResponse)==0: 468 | last=True # if this was the last line in the response set the last flag 469 | else: 470 | print("Time Out") # no data so must have timedout 471 | 472 | #rospy.loginfo("Got Response: %s, Last: %d" %(line,last)) 473 | return (line,last) 474 | 475 | def flush(self): 476 | while(1): 477 | l,last= self.getResponse(1) 478 | if l=="": 479 | return 480 | 481 | #SetLED - Sets the specified LED to on,off,blink, or dim. (TestMode Only) 482 | #BacklightOn - LCD Backlight On (mutually exclusive of BacklightOff) 483 | #BacklightOff - LCD Backlight Off (mutually exclusive of BacklightOn) 484 | #ButtonAmber - Start Button Amber (mutually exclusive of other Button options) 485 | #ButtonGreen - Start Button Green (mutually exclusive of other Button options) 486 | #LEDRed - Start Red LED (mutually exclusive of other Button options) 487 | #LEDGreen - Start Green LED (mutually exclusive of other Button options) 488 | #ButtonAmberDim - Start Button Amber Dim (mutually exclusive of other Button options) 489 | #ButtonGreenDim - Start Button Green Dim (mutually exclusive of other Button options) 490 | #ButtonOff - Start Button Off 491 | 492 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_driver/src/neato_driver/neato_driver.py_bk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Generic driver for the Neato XV-11 Robot Vacuum 4 | # Copyright (c) 2010 University at Albany. All right reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the University at Albany nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL VANADIUM LABS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 23 | # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | """ 29 | neato_driver.py is a generic driver for the Neato XV-11 Robotic Vacuum. 30 | ROS Bindings can be found in the neato_node package. 31 | """ 32 | 33 | __author__ = "ferguson@cs.albany.edu (Michael Ferguson)" 34 | 35 | import serial 36 | 37 | """ 38 | This driver has been changed from the original version in order to support 39 | a wider range of neato models and firmware versions. 40 | 41 | The expected responses are not hardcoded in this driver anymore. 42 | 43 | This driver reads responses until it receives a control-z. Neato Robotics has 44 | documented that all responses have a control-Z (^Z) at the end of the 45 | response string: http://www.neatorobotics.com.au/programmer-s-manual 46 | """ 47 | 48 | 49 | class Botvac(): 50 | 51 | def __init__(self, port="/dev/ttyUSB0"): 52 | self.port = serial.Serial(port,115200) 53 | # Storage for motor and sensor information 54 | self.state = {"FuelPercent": 0, "LeftWheel_PositionInMM": 0, "RightWheel_PositionInMM": 0, "LSIDEBIT": 0, 55 | "RSIDEBIT": 0, "LFRONTBIT": 0, "RFRONTBIT": 0, "BTN_SOFT_KEY": 0, "BTN_SCROLL_UP": 0, 56 | "BTN_START": 0, "BTN_BACK": 0, "BTN_SCROLL_DOWN": 0} 57 | self.stop_state = True 58 | 59 | self.base_width = 248 # millimeters 60 | self.max_speed = 300 # millimeters/second 61 | self.crtl_z = chr(26) 62 | # turn things on 63 | self.port.flushInput() 64 | self.port.write("\n") 65 | self.setTestMode("on") 66 | self.setLDS("on") 67 | 68 | def exit(self): 69 | self.port.flushInput() 70 | self.port.write("\n") 71 | self.setLDS("off") 72 | self.setTestMode("off") 73 | 74 | def setTestMode(self, value): 75 | """ Turn test mode on/off. """ 76 | self.port.write("testmode " + value + "\n") 77 | self.readResponseString() 78 | 79 | def setLDS(self, value): 80 | self.port.write("setldsrotation " + value + "\n") 81 | self.readResponseString() 82 | 83 | def requestScan(self): 84 | """ Ask neato for an array of scan reads. """ 85 | self.port.flushInput() 86 | self.port.flushOutput() 87 | self.port.write("getldsscan\n") 88 | response = self.readResponseString() 89 | return response 90 | 91 | def readResponseString(self): 92 | """ Returns the entire response from neato in one string. """ 93 | response = str() 94 | self.port.timeout = 0.001 95 | while True: 96 | try: 97 | buf = self.port.read(1024) 98 | except: 99 | return "" 100 | if len(buf) == 0: 101 | self.port.timeout *= 2 102 | else: 103 | response += buf 104 | if buf[len(buf)-1] == self.crtl_z: 105 | break 106 | self.port.timeout = None 107 | return response 108 | 109 | def getScanRanges(self): 110 | """ Read values of a scan -- call requestScan first! """ 111 | ranges = list() 112 | response = self.requestScan() 113 | for line in response.splitlines(): 114 | #print line 115 | vals = line.split(",") 116 | # vals[[0] angle, vals[1] range, vals[2] intensity, vals[3] error code 117 | if len(vals) >= 2 and vals[0].isdigit() and vals[1].isdigit(): 118 | ranges.append(int(vals[1])/1000.0) 119 | # sanity check 120 | if len(ranges) != 360: 121 | return [] 122 | return ranges 123 | 124 | def setMotors(self, l, r, s): 125 | """ Set motors, distance left & right + speed """ 126 | #This is a work-around for a bug in the Neato API. The bug is that the 127 | #robot won't stop instantly if a 0-velocity command is sent - the robot 128 | #could continue moving for up to a second. To work around this bug, the 129 | #first time a 0-velocity is sent in, a velocity of 1,1,1 is sent. Then, 130 | #the zero is sent. This effectively causes the robot to stop instantly. 131 | if (int(l) == 0 and int(r) == 0 and int(s) == 0): 132 | if (not self.stop_state): 133 | self.stop_state = True 134 | l = 1 135 | r = 1 136 | s = 1 137 | else: 138 | self.stop_state = False 139 | self.port.write("setmotor "+str(int(l))+" "+str(int(r))+" "+str(int(s))+"\n") 140 | 141 | def readResponseAndUpdateState(self): 142 | """ Read neato's response and update self.state dictionary. 143 | Call this function only after sending a command. """ 144 | response = self.readResponseString() 145 | for line in response.splitlines(): 146 | vals = line.split(",") 147 | if len(vals) >= 2 and vals[0].replace('_', '').isalpha() and vals[1].isdigit(): 148 | self.state[vals[0]] = int(vals[1]) 149 | 150 | def getMotors(self): 151 | """ Update values for motors in the self.state dictionary. 152 | Returns current left, right encoder values. """ 153 | self.port.flushInput() 154 | self.port.write("getmotors\n") 155 | self.readResponseAndUpdateState() 156 | return [self.state["LeftWheel_PositionInMM"], self.state["RightWheel_PositionInMM"]] 157 | 158 | def getAnalogSensors(self): 159 | """ Update values for analog sensors in the self.state dictionary. """ 160 | self.port.write("getanalogsensors\n") 161 | self.readResponseAndUpdateState() 162 | 163 | def getDigitalSensors(self): 164 | """ Update values for digital sensors in the self.state dictionary. """ 165 | self.port.write("getdigitalsensors\n") 166 | self.readResponseAndUpdateState() 167 | return [self.state["LSIDEBIT"], self.state["RSIDEBIT"], self.state["LFRONTBIT"], self.state["RFRONTBIT"]] 168 | 169 | def getButtons(self): 170 | """ Update values for digital buttons in the self.state dictionary. """ 171 | self.port.write("getbuttons\n") 172 | self.readResponseAndUpdateState() 173 | return [self.state["BTN_SOFT_KEY"], self.state["BTN_SCROLL_UP"], self.state["BTN_START"], self.state["BTN_BACK"], self.state["BTN_SCROLL_DOWN"]] 174 | 175 | def getCharger(self): 176 | """ Update values for charger/battery related info in self.state dictionary. """ 177 | self.port.write("getcharger\n") 178 | self.readResponseAndUpdateState() 179 | return self.state["FuelPercent"] 180 | 181 | def setBacklight(self, value): 182 | 183 | if value > 0: 184 | self.port.write("setled backlighton\n") 185 | else: 186 | self.port.write("setled backlightoff\n") 187 | #self.readResponseString() 188 | 189 | def setLED(self, value): 190 | 191 | if value == "Green": 192 | self.port.write("setled ButtonGreen\n") 193 | if value == "Amber": 194 | self.port.write("setled ButtonAmber\n") 195 | if value == "Red": 196 | self.port.write("setled LEDRed\n") 197 | if value == "Off": 198 | self.port.write("setled ButtonOff\n") 199 | if value == "DimGreen": 200 | self.port.write("setled ButtonGreenDim\n") 201 | if value == "DimAmber": 202 | self.port.write("setled ButtonAmberDim\n") 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(neato_node) 3 | 4 | find_package(catkin REQUIRED message_generation) 5 | 6 | add_message_files( 7 | FILES 8 | Button.msg 9 | Sensor.msg 10 | ) 11 | 12 | generate_messages( 13 | DEPENDENCIES 14 | ) 15 | 16 | #catkin_package(DEPENDS message_runtime ) 17 | 18 | install(DIRECTORY launch 19 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 20 | ) 21 | 22 | install(DIRECTORY nodes 23 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 24 | ) 25 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/launch/bringup.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/meshes/neato.dae: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SketchUp 15.3.329 6 | 7 | 2015-03-29T20:44:52Z 8 | 2015-03-29T20:44:52Z 9 | 10 | Z_UP 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 5.3806317 9.7427711 2.8149501 5.6747406 9.3594809 2.5605627 5.6747406 9.3594809 2.8149501 5.3806317 9.7427711 2.5605627 6.0580309 9.0653720 2.8149501 6.0580309 9.0653720 2.5605627 5.1957471 10.1891220 2.8149501 5.1957471 11.1471091 2.8149501 5.1326864 10.6681156 2.8149501 5.3806317 9.7427711 2.8149501 5.3806317 11.5934600 2.8149501 5.6747406 9.3594809 2.8149501 5.6747406 11.9767502 2.8149501 6.0580309 9.0653720 2.8149501 6.0580309 12.2708592 2.8149501 6.5043818 8.8804874 2.8149501 6.5043818 12.4557438 2.8149501 6.9833753 8.8174267 2.8149501 6.9833753 12.5188045 2.8149501 7.4623689 8.8804874 2.8149501 7.4623689 12.4557438 2.8149501 7.9087198 9.0653720 2.8149501 7.9087198 12.2708592 2.8149501 8.2920100 9.3594809 2.8149501 8.2920100 11.9767502 2.8149501 8.5861189 9.7427711 2.8149501 8.5861189 11.5934600 2.8149501 8.7710035 10.1891220 2.8149501 8.7710035 11.1471091 2.8149501 8.8340642 10.6681156 2.8149501 5.1957471 10.1891220 2.8149501 5.1957471 10.1891220 2.5605627 6.5043818 8.8804874 2.8149501 6.5043818 8.8804874 2.5605627 6.9833753 8.8174267 2.8149501 6.9833753 8.8174267 2.5605627 7.4623689 8.8804874 2.8149501 7.4623689 8.8804874 2.5605627 7.9087198 9.0653720 2.8149501 7.9087198 9.0653720 2.5605627 8.2920100 9.3594809 2.8149501 8.2920100 9.3594809 2.5605627 8.5861189 9.7427711 2.5605627 8.5861189 9.7427711 2.8149501 8.7710035 10.1891220 2.5605627 8.7710035 10.1891220 2.8149501 8.8340642 10.6681156 2.5605627 8.8340642 10.6681156 2.8149501 8.7710035 11.1471091 2.5605627 8.8340642 10.6681156 2.8149501 8.8340642 10.6681156 2.5605627 8.7710035 11.1471091 2.8149501 8.5861189 11.5934600 2.5605627 8.5861189 11.5934600 2.8149501 8.2920100 11.9767502 2.5605627 8.2920100 11.9767502 2.8149501 7.9087198 12.2708592 2.8149501 7.9087198 12.2708592 2.5605627 7.4623689 12.4557438 2.8149501 7.4623689 12.4557438 2.5605627 6.9833753 12.5188045 2.8149501 6.9833753 12.5188045 2.5605627 6.5043818 12.4557438 2.8149501 6.5043818 12.4557438 2.5605627 6.0580309 12.2708592 2.8149501 6.0580309 12.2708592 2.5605627 5.6747406 11.9767502 2.8149501 5.6747406 11.9767502 2.5605627 5.3806317 11.5934600 2.5605627 5.3806317 11.5934600 2.8149501 5.1957471 11.1471091 2.5605627 5.1957471 11.1471091 2.8149501 5.1326864 10.6681156 2.5605627 5.1326864 10.6681156 2.8149501 5.1326864 10.6681156 2.8149501 5.1326864 10.6681156 2.5605627 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -0.8660254 -0.5000000 -0.0000000 -0.7071068 -0.7071068 -0.0000000 -0.7071068 -0.7071068 -0.0000000 -0.8660254 -0.5000000 -0.0000000 -0.5000000 -0.8660254 -0.0000000 -0.5000000 -0.8660254 -0.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.9659258 -0.2588190 -0.0000000 -0.9659258 -0.2588190 -0.0000000 -0.2588190 -0.9659258 -0.0000000 -0.2588190 -0.9659258 -0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 0.2588190 -0.9659258 0.0000000 0.2588190 -0.9659258 0.0000000 0.5000000 -0.8660254 0.0000000 0.5000000 -0.8660254 0.0000000 0.7071068 -0.7071068 0.0000000 0.7071068 -0.7071068 0.0000000 0.8660254 -0.5000000 0.0000000 0.8660254 -0.5000000 0.0000000 0.9659258 -0.2588190 0.0000000 0.9659258 -0.2588190 0.0000000 0.9914449 -0.1305262 0.0000000 0.9914449 -0.1305262 0.0000000 0.9659258 0.2588190 0.0000000 0.9914449 0.1305262 0.0000000 0.9914449 0.1305262 0.0000000 0.9659258 0.2588190 0.0000000 0.8660254 0.5000000 0.0000000 0.8660254 0.5000000 0.0000000 0.7071068 0.7071068 0.0000000 0.7071068 0.7071068 0.0000000 0.5000000 0.8660254 0.0000000 0.5000000 0.8660254 0.0000000 0.2588190 0.9659258 0.0000000 0.2588190 0.9659258 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 -0.2588190 0.9659258 -0.0000000 -0.2588190 0.9659258 -0.0000000 -0.5000000 0.8660254 -0.0000000 -0.5000000 0.8660254 -0.0000000 -0.7071068 0.7071068 -0.0000000 -0.7071068 0.7071068 -0.0000000 -0.8660254 0.5000000 -0.0000000 -0.8660254 0.5000000 -0.0000000 -0.9659258 0.2588190 -0.0000000 -0.9659258 0.2588190 -0.0000000 -0.9914449 0.1305262 -0.0000000 -0.9914449 0.1305262 -0.0000000 -0.9914449 -0.1305262 -0.0000000 -0.9914449 -0.1305262 -0.0000000 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |

0 1 2 1 0 3 4 1 5 1 4 2 6 7 8 7 6 9 7 9 10 10 9 11 10 11 12 12 11 13 12 13 14 14 13 15 14 15 16 16 15 17 16 17 18 18 17 19 18 19 20 20 19 21 20 21 22 22 21 23 22 23 24 24 23 25 24 25 26 26 25 27 26 27 28 28 27 29 30 3 0 3 30 31 32 5 33 5 32 4 34 33 35 33 34 32 36 35 37 35 36 34 38 37 39 37 38 36 40 39 41 39 40 38 42 40 41 40 42 43 44 43 42 43 44 45 46 45 44 45 46 47 48 49 50 49 48 51 52 51 48 51 52 53 54 53 52 53 54 55 56 54 57 54 56 55 58 57 59 57 58 56 60 59 61 59 60 58 62 61 63 61 62 60 64 63 65 63 64 62 66 65 67 65 66 64 66 68 69 68 66 67 69 70 71 70 69 68 71 72 73 72 71 70 74 31 30 31 74 75

93 |
94 |
95 |
96 | 97 | 98 | 99 | 8.9930967 1.1710206 2.5605627 8.8512374 2.4621199 2.5605627 8.8512374 1.2032662 2.5605627 8.9942385 2.4950690 2.5605627 9.1375687 1.1539405 2.5605627 9.1399702 2.5123093 2.5605627 9.2830365 1.1522170 2.5605627 9.2867121 2.5136374 2.5605627 9.4278725 1.1658696 2.5605627 9.4327319 2.4990374 2.5605627 9.5704560 1.1947453 2.5605627 9.5763059 2.4686818 2.5605627 9.7091915 1.2385211 2.5605627 9.7157392 2.4229290 2.5605627 9.8425266 1.2967072 2.5605627 9.8493857 2.3623190 2.5605627 9.9689692 1.3686524 2.5605627 9.9756677 2.2875673 2.5605627 10.0871046 1.4535516 2.5605627 10.0930944 2.1995565 2.5605627 10.1956108 1.5504550 2.5605627 10.2002797 2.0993254 2.5605627 10.2932737 1.6582781 2.5605627 10.2959582 1.9880573 2.5605627 10.3790004 1.7758145 2.5605627 10.3790004 1.8670658 2.5605627 4.6221950 2.4621199 2.5605627 4.6221950 1.2032662 2.5605627 8.8512374 2.4621199 2.5605627 8.8512374 1.2032662 1.7543672 8.8512374 1.2032662 2.5605627 8.8512374 2.4621199 1.7543672 3.1833425 1.8670658 2.5605627 0.6776958 8.5429638 2.5605627 0.6776958 1.8670658 2.5605627 3.2573765 1.9861386 2.5605627 3.3443827 2.0960899 2.5605627 3.4432483 2.1955132 2.5605627 3.5527085 2.2831365 2.5605627 12.6481501 8.5429638 2.5605627 3.6713631 2.3578390 2.5605627 3.7976942 2.4186651 2.5605627 3.9300859 2.4648368 2.5605627 4.0668445 2.4957634 2.5605627 4.2062207 2.5110492 2.5605627 4.3464315 2.5104989 2.5605627 4.4856834 2.4941192 2.5605627 4.6221950 2.4621199 2.5605627 8.8512374 2.4621199 2.5605627 8.9942385 2.4950690 2.5605627 9.1399702 2.5123093 2.5605627 9.2867121 2.5136374 2.5605627 9.4327319 2.4990374 2.5605627 9.5763059 2.4686818 2.5605627 9.7157392 2.4229290 2.5605627 9.8493857 2.3623190 2.5605627 9.9756677 2.2875673 2.5605627 10.0930944 2.1995565 2.5605627 10.2002797 2.0993254 2.5605627 10.2959582 1.9880573 2.5605627 10.3790004 1.8670658 2.5605627 12.6481501 1.8670658 2.5605627 8.8512374 2.4621199 2.5605627 4.6221950 2.4621199 1.7543672 8.8512374 2.4621199 1.7543672 4.6221950 2.4621199 2.5605627 4.6221950 2.4621199 1.7543672 4.6221950 1.2032662 2.5605627 4.6221950 1.2032662 1.7543672 4.6221950 2.4621199 2.5605627 4.6221950 1.2032662 2.5605627 8.8512374 1.2032662 1.7543672 4.6221950 1.2032662 1.7543672 8.8512374 1.2032662 2.5605627 8.8512374 1.2032662 1.7543672 4.6221950 2.4621199 1.7543672 4.6221950 1.2032662 1.7543672 8.8512374 2.4621199 1.7543672 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 0.0000000 -0.0000000 1.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 |

0 1 2 1 0 3 3 0 4 3 4 5 5 4 6 5 6 7 7 6 8 7 8 9 9 8 10 9 10 11 11 10 12 11 12 13 13 12 14 13 14 15 15 14 16 15 16 17 17 16 18 17 18 19 19 18 20 19 20 21 21 20 22 21 22 23 23 22 24 23 24 25 2 26 27 26 2 1 28 29 30 29 28 31 32 33 34 33 32 35 33 35 36 33 36 37 33 37 38 33 38 39 39 38 40 39 40 41 39 41 42 39 42 43 39 43 44 39 44 45 39 45 46 39 46 47 39 47 48 39 48 49 39 49 50 39 50 51 39 51 52 39 52 53 39 53 54 39 54 55 39 55 56 39 56 57 39 57 58 39 58 59 39 59 60 39 60 61 62 63 64 63 62 65 66 67 68 67 66 69 70 71 72 71 70 73 74 75 76 75 74 77

125 |
126 |
127 |
128 | 129 | 130 | 131 | 1.3355720 11.2457314 2.5605627 0.5169116 9.9689022 -0.0000000 0.5169116 9.9689022 2.5605627 1.3355720 11.2457314 -0.0000000 3.2489965 1.7385094 2.5605627 3.2573765 1.9861386 2.5605627 3.1833425 1.8670658 2.5605627 3.3297069 1.6188306 2.5605627 3.3443827 2.0960899 2.5605627 3.4242905 1.5097842 2.5605627 3.4432483 2.1955132 2.5605627 3.5313605 1.4129689 2.5605627 3.5527085 2.2831365 2.5605627 3.6493471 1.3298043 2.5605627 3.6713631 2.3578390 2.5605627 3.7765203 1.2615097 2.5605627 3.7976942 2.4186651 2.5605627 3.9110155 1.2090863 2.5605627 3.9300859 2.4648368 2.5605627 4.0508609 1.1733029 2.5605627 4.0668445 2.4957634 2.5605627 4.1940060 1.1546840 2.5605627 4.2062207 2.5110492 2.5605627 4.3383521 1.1535028 2.5605627 4.3464315 2.5104989 2.5605627 4.4817827 1.1697764 2.5605627 4.4856834 2.4941192 2.5605627 4.6221950 1.2032662 2.5605627 4.6221950 2.4621199 2.5605627 -0.0000000 0.0000000 2.5605627 0.6776958 1.8670658 2.5605627 -0.0000000 3.6512535 2.5605627 13.2890548 0.0000000 2.5605627 -0.0000000 8.5429638 2.5605627 0.5169116 9.9689022 2.5605627 8.8512374 1.2032662 2.5605627 8.9930967 1.1710206 2.5605627 9.1375687 1.1539405 2.5605627 9.2830365 1.1522170 2.5605627 9.4278725 1.1658696 2.5605627 9.5704560 1.1947453 2.5605627 9.7091915 1.2385211 2.5605627 9.8425266 1.2967072 2.5605627 9.9689692 1.3686524 2.5605627 10.0871046 1.4535516 2.5605627 10.1956108 1.5504550 2.5605627 10.2932737 1.6582781 2.5605627 10.3790004 1.7758145 2.5605627 10.3790004 1.8670658 2.5605627 12.6481501 1.8670658 2.5605627 12.6481501 8.5429638 2.5605627 12.7721432 9.9689022 2.5605627 13.2890548 8.5429638 2.5605627 0.6776958 8.5429638 2.5605627 1.3355720 11.2457314 2.5605627 6.0580309 9.0653720 2.5605627 6.5043818 8.8804874 2.5605627 6.9833753 8.8174267 2.5605627 5.6747406 9.3594809 2.5605627 2.4156672 12.3105751 2.5605627 5.3806317 9.7427711 2.5605627 3.7040087 13.1109962 2.5605627 5.1957471 10.1891220 2.5605627 5.1326864 10.6681156 2.5605627 7.4623689 8.8804874 2.5605627 7.9087198 9.0653720 2.5605627 8.2920100 9.3594809 2.5605627 9.5190350 9.3964312 2.5605627 8.5861189 9.7427711 2.5605627 8.7710035 10.1891220 2.5605627 8.8340642 10.6681156 2.5605627 10.9779488 9.3964312 2.5605627 10.9779488 10.5744126 2.5605627 11.9534828 11.2457314 2.5605627 5.1371534 13.6075785 2.5605627 5.1957471 11.1471091 2.5605627 5.3806317 11.5934600 2.5605627 6.6445274 13.7758684 2.5605627 5.6747406 11.9767502 2.5605627 6.0580309 12.2708592 2.5605627 6.5043818 12.4557438 2.5605627 6.9833753 12.5188045 2.5605627 6.9833753 13.7380379 2.5605627 7.4623689 12.4557438 2.5605627 8.1519014 13.6075785 2.5605627 7.9087198 12.2708592 2.5605627 8.2920100 11.9767502 2.5605627 9.5850461 13.1109962 2.5605627 8.5861189 11.5934600 2.5605627 8.7710035 11.1471091 2.5605627 9.5190350 10.5744126 2.5605627 10.8733876 12.3105751 2.5605627 2.4156672 12.3105751 -0.0000000 2.4156672 12.3105751 2.5605627 0.5169116 9.9689022 -0.0000000 13.2890548 8.5429638 0.0000000 -0.0000000 8.5429638 0.0000000 1.3355720 11.2457314 -0.0000000 2.4156672 12.3105751 -0.0000000 3.7040087 13.1109962 -0.0000000 5.1371534 13.6075785 -0.0000000 6.6445274 13.7758684 -0.0000000 8.1519014 13.6075785 -0.0000000 9.5850461 13.1109962 -0.0000000 10.8733876 12.3105751 -0.0000000 11.9534828 11.2457314 -0.0000000 12.7721432 9.9689022 -0.0000000 -0.0000000 8.5429638 1.7699753 -0.0000000 8.5429638 2.5605627 -0.0000000 8.5429638 0.0000000 13.2890548 8.5429638 1.7699753 13.2890548 0.0000000 2.5605627 13.2890548 0.0000000 1.7699753 13.2890548 8.5429638 2.5605627 12.7721432 9.9689022 -0.0000000 13.2890548 8.5429638 1.7699753 13.2890548 8.5429638 0.0000000 13.2890548 8.5429638 2.5605627 12.7721432 9.9689022 2.5605627 11.9534828 11.2457314 -0.0000000 11.9534828 11.2457314 2.5605627 10.8733876 12.3105751 2.5605627 10.8733876 12.3105751 -0.0000000 9.5850461 13.1109962 2.5605627 9.5850461 13.1109962 -0.0000000 8.1519014 13.6075785 2.5605627 8.1519014 13.6075785 -0.0000000 6.6445274 13.7758684 2.5605627 6.6445274 13.7758684 -0.0000000 6.9833753 13.7380379 2.5605627 5.1371534 13.6075785 2.5605627 5.1371534 13.6075785 -0.0000000 3.7040087 13.1109962 2.5605627 3.7040087 13.1109962 -0.0000000 -0.0000000 8.5429638 2.5605627 -0.0000000 3.6512535 1.7699753 -0.0000000 3.6512535 2.5605627 -0.0000000 8.5429638 1.7699753 -0.0000000 0.0000000 1.7699753 -0.0000000 0.0000000 2.5605627 13.2890548 0.0000000 2.5605627 -0.0000000 0.0000000 1.7699753 13.2890548 0.0000000 1.7699753 -0.0000000 0.0000000 2.5605627 0.3056641 4.7724095 0.0000000 -0.0000000 3.6512535 0.0000000 -0.0000000 4.7724095 0.0000000 -0.0000000 8.5429638 0.0000000 0.3056641 5.3165338 0.0000000 -0.0000000 5.3165338 0.0000000 13.2890548 8.5429638 0.0000000 13.2890548 0.0000000 0.0000000 -0.0000000 0.0000000 0.0000000 -0.0000000 4.7724095 0.9017461 0.3056641 4.7724095 0.0000000 -0.0000000 4.7724095 0.0000000 0.3056641 4.7724095 0.9017461 0.3056641 5.3165338 0.9017461 0.3056641 4.7724095 0.0000000 0.3056641 4.7724095 0.9017461 0.3056641 5.3165338 0.0000000 0.3056641 5.3165338 0.0000000 -0.0000000 5.3165338 0.9017461 -0.0000000 5.3165338 0.0000000 0.3056641 5.3165338 0.9017461 -0.0000000 5.3165338 0.9017461 0.3056641 4.7724095 0.9017461 -0.0000000 4.7724095 0.9017461 0.3056641 5.3165338 0.9017461 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -0.7767392 0.6298223 0.0000000 -0.8965153 0.4430128 -0.0000000 -0.8965153 0.4430128 -0.0000000 -0.7767392 0.6298223 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 -0.6187134 0.7856168 0.0000000 -0.6187134 0.7856168 0.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.9401342 0.3408045 -0.0000000 -0.9401342 0.3408045 -0.0000000 -0.9401342 0.3408045 -0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 0.8965153 0.4430128 0.0000000 0.9401342 0.3408045 0.0000000 0.9401342 0.3408045 0.0000000 0.9401342 0.3408045 0.0000000 0.8965153 0.4430128 0.0000000 0.7767392 0.6298223 0.0000000 0.7767392 0.6298223 0.0000000 0.6187134 0.7856168 0.0000000 0.6187134 0.7856168 0.0000000 0.4302195 0.9027243 0.0000000 0.4302195 0.9027243 0.0000000 0.2205399 0.9753780 0.0000000 0.2205399 0.9753780 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.1109551 0.9938254 0.0000000 -0.2205399 0.9753780 0.0000000 -0.2205399 0.9753780 0.0000000 -0.4302195 0.9027243 0.0000000 -0.4302195 0.9027243 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 -0.0000000 -1.0000000 -0.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 |

0 1 2 1 0 3 4 5 6 5 4 7 5 7 8 8 7 9 8 9 10 10 9 11 10 11 12 12 11 13 12 13 14 14 13 15 14 15 16 16 15 17 16 17 18 18 17 19 18 19 20 20 19 21 20 21 22 22 21 23 22 23 24 24 23 25 24 25 26 26 25 27 26 27 28 29 30 31 30 29 19 19 29 21 21 29 32 31 30 33 33 30 34 30 19 17 30 17 15 30 15 13 30 13 11 30 11 9 30 9 7 30 7 4 30 4 6 21 32 23 23 32 25 25 32 27 27 32 35 35 32 36 36 32 37 37 32 38 38 32 39 39 32 40 40 32 41 41 32 42 42 32 43 43 32 44 44 32 45 45 32 46 46 32 47 47 32 48 48 32 49 49 32 50 50 32 51 51 32 52 34 53 54 53 34 30 54 53 55 55 53 56 56 53 57 57 53 50 54 55 58 54 58 59 59 58 60 59 60 61 61 60 62 61 62 63 57 50 64 64 50 65 65 50 66 66 50 67 66 67 68 68 67 69 69 67 70 67 50 71 71 50 72 72 50 73 73 50 51 63 74 61 74 63 75 74 75 76 74 76 77 77 76 78 77 78 79 77 79 80 77 80 81 77 81 82 82 81 83 82 83 84 84 83 85 84 85 86 84 86 87 87 86 88 87 88 89 87 89 70 87 70 90 90 70 67 87 90 72 87 72 91 91 72 73 0 92 3 92 0 93 94 95 96 95 94 97 95 97 98 95 98 99 95 99 100 95 100 101 95 101 102 95 102 103 95 103 104 95 104 105 95 105 106 2 107 108 107 2 109 109 2 1 110 111 112 111 110 113 114 115 116 115 114 117 117 114 118 119 118 114 118 119 120 121 119 122 119 121 120 123 122 124 122 123 121 125 124 126 124 125 123 127 126 128 126 127 125 125 127 129 130 128 131 128 130 127 132 131 133 131 132 130 93 133 92 133 93 132 134 135 136 135 134 137 136 138 139 138 136 135 140 141 142 141 140 143 144 145 146 147 148 149 148 147 150 148 150 151 145 151 152 151 145 144 151 144 148 153 154 155 154 153 156 157 158 159 158 157 160 161 162 163 162 161 164 165 166 167 166 165 168

157 |
158 |
159 |
160 | 161 | 162 | 163 | 10.9779488 9.3964312 2.5605627 9.5190350 10.5744126 2.5605627 9.5190350 9.3964312 2.5605627 10.9779488 10.5744126 2.5605627 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 1.0000000 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 |

0 1 2 1 0 3

189 |
190 |
191 |
192 | 193 | 194 | 195 | -0.0000000 3.6512535 1.7699753 -0.0000000 4.7724095 0.9017461 -0.0000000 3.6512535 0.0000000 -0.0000000 8.5429638 1.7699753 -0.0000000 5.3165338 0.9017461 -0.0000000 5.3165338 0.0000000 -0.0000000 8.5429638 0.0000000 -0.0000000 4.7724095 0.0000000 -0.0000000 3.6512535 1.7699753 -0.0000000 0.0000000 0.0000000 -0.0000000 0.0000000 1.7699753 -0.0000000 3.6512535 0.0000000 13.2890548 0.0000000 1.7699753 -0.0000000 0.0000000 0.0000000 13.2890548 0.0000000 0.0000000 -0.0000000 0.0000000 1.7699753 13.2890548 8.5429638 0.0000000 13.2890548 0.0000000 1.7699753 13.2890548 0.0000000 0.0000000 13.2890548 8.5429638 1.7699753 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 -0.0000000 -1.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 1.0000000 -0.0000000 0.0000000 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 |

0 1 2 1 0 3 1 3 4 4 3 5 5 3 6 7 2 1 8 9 10 9 8 11 12 13 14 13 12 15 16 17 18 17 16 19

221 |
222 |
223 |
224 |
225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 0.4705882 0.4235294 0.6431373 1.0000000 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 1.0000000 1.0000000 1.0000000 1.0000000 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 0.2980392 0.2980392 0.2980392 1.0000000 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 0.6980392 0.7137255 0.7058824 1.0000000 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 |
289 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/meshes/neato.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/bv80bot/neato_robot/neato_node/meshes/neato.skp -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/msg/Button.msg: -------------------------------------------------------------------------------- 1 | string name 2 | bool value 3 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/msg/Sensor.msg: -------------------------------------------------------------------------------- 1 | string name 2 | bool value 3 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/neato.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | - /Map1 10 | - /RobotModel1 11 | - /Odometry1 12 | - /Global Plan1 13 | - /Local Plan1 14 | - /Goal1 15 | - /TF1 16 | - /TF1/Frames1 17 | - /Image1 18 | - /Map2 19 | Splitter Ratio: 0.5 20 | Tree Height: 375 21 | - Class: rviz/Selection 22 | Name: Selection 23 | - Class: rviz/Tool Properties 24 | Expanded: 25 | - /2D Pose Estimate1 26 | - /2D Nav Goal1 27 | - /Publish Point1 28 | Name: Tool Properties 29 | Splitter Ratio: 0.588679 30 | - Class: rviz/Views 31 | Expanded: 32 | - /Current View1 33 | Name: Views 34 | Splitter Ratio: 0.5 35 | - Class: rviz/Time 36 | Experimental: false 37 | Name: Time 38 | SyncMode: 0 39 | SyncSource: LaserScan 40 | Visualization Manager: 41 | Class: "" 42 | Displays: 43 | - Alpha: 0.5 44 | Cell Size: 1 45 | Class: rviz/Grid 46 | Color: 160; 160; 164 47 | Enabled: true 48 | Line Style: 49 | Line Width: 0.03 50 | Value: Lines 51 | Name: Grid 52 | Normal Cell Count: 0 53 | Offset: 54 | X: 0 55 | Y: 0 56 | Z: 0 57 | Plane: XY 58 | Plane Cell Count: 10 59 | Reference Frame: 60 | Value: true 61 | - Alpha: 1 62 | Autocompute Intensity Bounds: true 63 | Autocompute Value Bounds: 64 | Max Value: 10 65 | Min Value: -10 66 | Value: true 67 | Axis: Z 68 | Channel Name: intensity 69 | Class: rviz/LaserScan 70 | Color: 255; 255; 255 71 | Color Transformer: Intensity 72 | Decay Time: 0 73 | Enabled: true 74 | Invert Rainbow: false 75 | Max Color: 255; 255; 255 76 | Max Intensity: 4096 77 | Min Color: 0; 0; 0 78 | Min Intensity: 0 79 | Name: LaserScan 80 | Position Transformer: XYZ 81 | Queue Size: 10 82 | Selectable: true 83 | Size (Pixels): 3 84 | Size (m): 0.04 85 | Style: Squares 86 | Topic: /base_scan 87 | Use Fixed Frame: true 88 | Use rainbow: true 89 | Value: true 90 | - Alpha: 0.7 91 | Class: rviz/Map 92 | Color Scheme: map 93 | Draw Behind: false 94 | Enabled: true 95 | Name: Map 96 | Topic: /map 97 | Value: true 98 | - Alpha: 1 99 | Class: rviz/RobotModel 100 | Collision Enabled: false 101 | Enabled: true 102 | Links: 103 | All Links Enabled: true 104 | Expand Joint Details: false 105 | Expand Link Details: false 106 | Expand Tree: false 107 | Link Tree Style: Links in Alphabetic Order 108 | base_link: 109 | Alpha: 1 110 | Show Axes: false 111 | Show Trail: false 112 | Value: true 113 | Name: RobotModel 114 | Robot Description: robot_description 115 | TF Prefix: "" 116 | Update Interval: 0 117 | Value: true 118 | Visual Enabled: true 119 | - Angle Tolerance: 0.1 120 | Class: rviz/Odometry 121 | Color: 255; 25; 0 122 | Enabled: true 123 | Keep: 1 124 | Length: 0.5 125 | Name: Odometry 126 | Position Tolerance: 0.1 127 | Topic: /odom 128 | Value: true 129 | - Arrow Length: 0.3 130 | Class: rviz/PoseArray 131 | Color: 255; 25; 0 132 | Enabled: false 133 | Name: Localization Guesses 134 | Topic: /particlecloud 135 | Value: false 136 | - Alpha: 1 137 | Buffer Length: 1 138 | Class: rviz/Path 139 | Color: 25; 255; 0 140 | Enabled: true 141 | Line Style: Lines 142 | Line Width: 0.03 143 | Name: Global Plan 144 | Offset: 145 | X: 0 146 | Y: 0 147 | Z: 0 148 | Topic: /move_base/TrajectoryPlannerROS/global_plan 149 | Value: true 150 | - Alpha: 1 151 | Buffer Length: 1 152 | Class: rviz/Path 153 | Color: 255; 0; 0 154 | Enabled: true 155 | Line Style: Lines 156 | Line Width: 0.03 157 | Name: Local Plan 158 | Offset: 159 | X: 0 160 | Y: 0 161 | Z: 0 162 | Topic: /move_base/TrajectoryPlannerROS/local_plan 163 | Value: true 164 | - Alpha: 1 165 | Axes Length: 1 166 | Axes Radius: 0.1 167 | Class: rviz/Pose 168 | Color: 85; 0; 127 169 | Enabled: true 170 | Head Length: 0.3 171 | Head Radius: 0.1 172 | Name: Goal 173 | Shaft Length: 1 174 | Shaft Radius: 0.05 175 | Shape: Arrow 176 | Topic: /move_base/current_goal 177 | Value: true 178 | - Class: rviz/TF 179 | Enabled: true 180 | Frame Timeout: 60 181 | Frames: 182 | All Enabled: true 183 | base_laser_link: 184 | Value: true 185 | base_link: 186 | Value: true 187 | map: 188 | Value: true 189 | odom: 190 | Value: true 191 | Marker Scale: 1 192 | Name: TF 193 | Show Arrows: true 194 | Show Axes: true 195 | Show Names: true 196 | Tree: 197 | map: 198 | odom: 199 | base_link: 200 | base_laser_link: 201 | {} 202 | Update Interval: 0 203 | Value: true 204 | - Class: rviz/Image 205 | Enabled: true 206 | Image Topic: /image_topic_2 207 | Max Value: 1 208 | Median window: 5 209 | Min Value: 0 210 | Name: Image 211 | Normalize Range: true 212 | Queue Size: 2 213 | Transport Hint: raw 214 | Value: true 215 | - Alpha: 0.5 216 | Class: rviz/Map 217 | Color Scheme: costmap 218 | Draw Behind: true 219 | Enabled: true 220 | Name: Map 221 | Topic: /move_base/local_costmap/costmap 222 | Value: true 223 | Enabled: true 224 | Global Options: 225 | Background Color: 48; 48; 48 226 | Fixed Frame: map 227 | Frame Rate: 30 228 | Name: root 229 | Tools: 230 | - Class: rviz/Interact 231 | Hide Inactive Objects: true 232 | - Class: rviz/MoveCamera 233 | - Class: rviz/Select 234 | - Class: rviz/FocusCamera 235 | - Class: rviz/Measure 236 | - Class: rviz/SetInitialPose 237 | Topic: /initialpose 238 | - Class: rviz/SetGoal 239 | Topic: /move_base_simple/goal 240 | - Class: rviz/PublishPoint 241 | Single click: true 242 | Topic: /clicked_point 243 | Value: true 244 | Views: 245 | Current: 246 | Class: rviz/Orbit 247 | Distance: 3.78226 248 | Enable Stereo Rendering: 249 | Stereo Eye Separation: 0.06 250 | Stereo Focal Distance: 1 251 | Swap Stereo Eyes: false 252 | Value: false 253 | Focal Point: 254 | X: 0.57813 255 | Y: -0.478513 256 | Z: 0.0682464 257 | Name: Current View 258 | Near Clip Distance: 0.01 259 | Pitch: 0.994797 260 | Target Frame: 261 | Value: Orbit (rviz) 262 | Yaw: 3.18723 263 | Saved: ~ 264 | Window Geometry: 265 | Displays: 266 | collapsed: false 267 | Height: 910 268 | Hide Left Dock: false 269 | Hide Right Dock: true 270 | Image: 271 | collapsed: false 272 | QMainWindow State: 000000ff00000000fd00000004000000000000013c000002fafc020000000afb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005300fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003600000202000000b700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d006100670065010000023e000000f20000001600fffffffb0000000a0049006d006100670065010000026f000000c10000000000000000000000010000010f0000023afc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002c0000023a0000009b00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000068c0000003efc0100000002fb0000000800540069006d006501000000000000068c0000024600fffffffb0000000800540069006d006501000000000000045000000000000000000000054a000002fa00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 273 | Selection: 274 | collapsed: false 275 | Time: 276 | collapsed: false 277 | Tool Properties: 278 | collapsed: false 279 | Views: 280 | collapsed: true 281 | Width: 1676 282 | X: 19 283 | Y: 26 284 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/nodes/neato.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # ROS node for the Neato Robot Vacuum 4 | # Copyright (c) 2010 University at Albany. All right reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the University at Albany nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL VANADIUM LABS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 23 | # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | """ 29 | ROS node for Neato robot vacuums. 30 | """ 31 | 32 | __author__ = "ferguson@cs.albany.edu (Michael Ferguson)" 33 | 34 | import roslib; roslib.load_manifest("neato_node") 35 | import rospy 36 | from math import sin,cos,pi 37 | 38 | from sensor_msgs.msg import LaserScan 39 | from neato_node.msg import Button, Sensor 40 | from geometry_msgs.msg import Quaternion 41 | from geometry_msgs.msg import Twist 42 | from nav_msgs.msg import Odometry 43 | from tf.broadcaster import TransformBroadcaster 44 | 45 | from neato_driver.neato_driver import Botvac 46 | 47 | class NeatoNode: 48 | 49 | def __init__(self): 50 | """ Start up connection to the Neato Robot. """ 51 | rospy.init_node('neato') 52 | 53 | self.CMD_RATE =2 54 | 55 | self.port = rospy.get_param('~port', "/dev/ttyUSB0") 56 | rospy.loginfo("Using port: %s" % self.port) 57 | 58 | self.robot = Botvac(self.port) 59 | 60 | rospy.Subscriber("cmd_vel", Twist, self.cmdVelCb) 61 | self.scanPub = rospy.Publisher('base_scan', LaserScan, queue_size=10) 62 | self.odomPub = rospy.Publisher('odom', Odometry, queue_size=10) 63 | self.buttonPub = rospy.Publisher('button', Button, queue_size=10) 64 | self.sensorPub = rospy.Publisher('sensor', Sensor, queue_size=10) 65 | self.odomBroadcaster = TransformBroadcaster() 66 | self.cmd_vel = [0, 0] 67 | self.old_vel = self.cmd_vel 68 | 69 | def spin(self): 70 | encoders = [0, 0] 71 | 72 | self.x = 0 # position in xy plane 73 | self.y = 0 74 | self.th = 0 75 | then = rospy.Time.now() 76 | 77 | # things that don't ever change 78 | scan_link = rospy.get_param('~frame_id', 'base_laser_link') 79 | scan = LaserScan(header=rospy.Header(frame_id=scan_link)) 80 | 81 | scan.angle_min =0.0 82 | scan.angle_max =359.0*pi/180.0 83 | scan.angle_increment =pi/180.0 84 | scan.range_min = 0.020 85 | scan.range_max = 5.0 86 | 87 | odom = Odometry(header=rospy.Header(frame_id="odom"), child_frame_id='base_footprint') 88 | 89 | button = Button() 90 | sensor = Sensor() 91 | self.robot.setBacklight(1) 92 | self.robot.setLED("Green") 93 | # main loop of driver 94 | r = rospy.Rate(20) 95 | cmd_rate= self.CMD_RATE 96 | 97 | while not rospy.is_shutdown(): 98 | # notify if low batt 99 | #if self.robot.getCharger() < 10: 100 | # print "battery low " + str(self.robot.getCharger()) + "%" 101 | # get motor encoder values 102 | left, right = self.robot.getMotors() 103 | 104 | cmd_rate = cmd_rate-1 105 | if cmd_rate ==0: 106 | # send updated movement commands 107 | #if self.cmd_vel != self.old_vel or self.cmd_vel == [0,0]: 108 | # max(abs(self.cmd_vel[0]),abs(self.cmd_vel[1]))) 109 | #self.robot.setMotors(self.cmd_vel[0], self.cmd_vel[1], (abs(self.cmd_vel[0])+abs(self.cmd_vel[1]))/2) 110 | self.robot.setMotors(self.cmd_vel[0], self.cmd_vel[1], max(abs(self.cmd_vel[0]),abs(self.cmd_vel[1]))) 111 | cmd_rate = self.CMD_RATE 112 | 113 | self.old_vel = self.cmd_vel 114 | 115 | # prepare laser scan 116 | scan.header.stamp = rospy.Time.now() 117 | 118 | self.robot.requestScan() 119 | scan.ranges, scan.intensities = self.robot.getScanRanges() 120 | 121 | # now update position information 122 | dt = (scan.header.stamp - then).to_sec() 123 | then = scan.header.stamp 124 | 125 | d_left = (left - encoders[0])/1000.0 126 | d_right = (right - encoders[1])/1000.0 127 | encoders = [left, right] 128 | 129 | #print d_left, d_right, encoders 130 | 131 | dx = (d_left+d_right)/2 132 | dth = (d_right-d_left)/(self.robot.base_width/1000.0) 133 | 134 | x = cos(dth)*dx 135 | y = -sin(dth)*dx 136 | self.x += cos(self.th)*x - sin(self.th)*y 137 | self.y += sin(self.th)*x + cos(self.th)*y 138 | self.th += dth 139 | #print self.x,self.y,self.th 140 | 141 | # prepare tf from base_link to odom 142 | quaternion = Quaternion() 143 | quaternion.z = sin(self.th/2.0) 144 | quaternion.w = cos(self.th/2.0) 145 | 146 | # prepare odometry 147 | odom.header.stamp = rospy.Time.now() 148 | odom.pose.pose.position.x = self.x 149 | odom.pose.pose.position.y = self.y 150 | odom.pose.pose.position.z = 0 151 | odom.pose.pose.orientation = quaternion 152 | odom.twist.twist.linear.x = dx/dt 153 | odom.twist.twist.angular.z = dth/dt 154 | 155 | 156 | # sensors 157 | lsb, rsb, lfb, rfb = self.robot.getDigitalSensors() 158 | 159 | # buttons 160 | btn_soft, btn_scr_up, btn_start, btn_back, btn_scr_down = self.robot.getButtons() 161 | 162 | 163 | # publish everything 164 | self.odomBroadcaster.sendTransform((self.x, self.y, 0), (quaternion.x, quaternion.y, quaternion.z, 165 | quaternion.w), then, "base_footprint", "odom") 166 | self.scanPub.publish(scan) 167 | self.odomPub.publish(odom) 168 | button_enum = ("Soft_Button", "Up_Button", "Start_Button", "Back_Button", "Down_Button") 169 | sensor_enum = ("Left_Side_Bumper", "Right_Side_Bumper", "Left_Bumper", "Right_Bumper") 170 | for idx, b in enumerate((btn_soft, btn_scr_up, btn_start, btn_back, btn_scr_down)): 171 | if b == 1: 172 | button.value = b 173 | button.name = button_enum[idx] 174 | self.buttonPub.publish(button) 175 | 176 | for idx, b in enumerate((lsb, rsb, lfb, rfb)): 177 | if b == 1: 178 | sensor.value = b 179 | sensor.name = sensor_enum[idx] 180 | self.sensorPub.publish(sensor) 181 | # wait, then do it again 182 | r.sleep() 183 | 184 | # shut down 185 | self.robot.setBacklight(0) 186 | self.robot.setLED("Off") 187 | self.robot.setLDS("off") 188 | self.robot.setTestMode("off") 189 | 190 | def sign(self,a): 191 | if a>=0: 192 | return 1 193 | else: 194 | return-1 195 | 196 | def cmdVelCb(self,req): 197 | x = req.linear.x * 1000 198 | th = req.angular.z * (self.robot.base_width/2) 199 | k = max(abs(x-th),abs(x+th)) 200 | # sending commands higher than max speed will fail 201 | 202 | if k > self.robot.max_speed: 203 | x = x*self.robot.max_speed/k; th = th*self.robot.max_speed/k 204 | 205 | self.cmd_vel = [int(x-th), int(x+th)] 206 | 207 | if __name__ == "__main__": 208 | robot = NeatoNode() 209 | robot.spin() 210 | 211 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/package.xml: -------------------------------------------------------------------------------- 1 | 2 | neato_node 3 | 0.2.0 4 | 5 | A node wrapper for the neato_driver package 6 | 7 | Michael Ferguson 8 | Michael Ferguson 9 | BSD 10 | http://ros.org/wiki/neato_node 11 | 12 | catkin 13 | message_generation 14 | message_runtime 15 | neato_driver 16 | rospy 17 | sensor_msgs 18 | geometry_msgs 19 | nav_msgs 20 | tf 21 | 22 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_node/urdf/neato.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_robot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(neato_robot) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /bv80bot/neato_robot/neato_robot/package.xml: -------------------------------------------------------------------------------- 1 | 2 | neato_robot 3 | 0.2.0 4 | 5 | Metapackage for drivers for the Neato XV-11 robot. 6 | 7 | Michael Ferguson 8 | Michael Ferguson 9 | BSD 10 | http://ros.org/wiki/neato_robot 11 | 12 | catkin 13 | 14 | neato_driver 15 | neato_node 16 | neato_2dnav 17 | 18 | xacro 19 | 22 | yocs_cmd_vel_mux 23 | yocs_velocity_smoother 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /documents/Roll Your Own Turtlebot Part II.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/documents/Roll Your Own Turtlebot Part II.odt -------------------------------------------------------------------------------- /documents/SV ROS Class 2.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/documents/SV ROS Class 2.odp -------------------------------------------------------------------------------- /documents/SV ROS Class1 ROS.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/documents/SV ROS Class1 ROS.odp -------------------------------------------------------------------------------- /documents/Simulation Notes: -------------------------------------------------------------------------------- 1 | Prerequsites: 2 | 3 | Abotix Simulation 4 | 5 | after ROS full desktop install 6 | 7 | sudo apt install ros-*-arbotix-python 8 | 9 | catkin install and make of 10 | 11 | github.com/pirobot/rbx1 12 | 13 | 14 | After installation try: 15 | 16 | roslaunch rbx1_bringup fake_turtlebot.launch & 17 | 18 | (optionally) 19 | 20 | 21 | roslaunch rbx1_nav fake_move_base_map_with_obstacles.launch & 22 | 23 | 24 | rosrun rviz rviz (rbx1/rbx1_nav/nav.rviz) 25 | 26 | 27 | then rosrun teleop_twist keyboard or other rbx1_nav/nodes programs. 28 | 29 | 30 | 31 | Magni Gazebo Simulations 32 | 33 | 34 | sudo apt install ros-*-magni-robot or catkin_make github ubiquityrobotics/magni_robot 35 | 36 | after 37 | 38 | roslaunch magni_gazebo empty_world.launch & 39 | 40 | pkill roslaunch 41 | 42 | 43 | roslaunch magni_gazebo fiducial_world.launch 44 | -------------------------------------------------------------------------------- /documents/botvacusb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/documents/botvacusb.jpg -------------------------------------------------------------------------------- /documents/readme.txt: -------------------------------------------------------------------------------- 1 | Add notes and Slides etc for the classes to this folder. 2 | -------------------------------------------------------------------------------- /documents/ros_messages_keynote.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SV-ROS/intro_to_ros/aa097381ff9e3c4983985f2f54ce83ae15e00104/documents/ros_messages_keynote.tar.gz -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(beginner_tutorials) 3 | 4 | ## Find catkin macros and libraries 5 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 6 | ## is used, also find other catkin packages 7 | find_package(catkin REQUIRED COMPONENTS 8 | roscpp 9 | rospy 10 | std_msgs 11 | message_generation 12 | ) 13 | 14 | ## System dependencies are found with CMake's conventions 15 | # find_package(Boost REQUIRED COMPONENTS system) 16 | 17 | 18 | ## Uncomment this if the package has a setup.py. This macro ensures 19 | ## modules and global scripts declared therein get installed 20 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 21 | # catkin_python_setup() 22 | 23 | ################################################ 24 | ## Declare ROS messages, services and actions ## 25 | ################################################ 26 | 27 | ## To declare and build messages, services or actions from within this 28 | ## package, follow these steps: 29 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 30 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 31 | ## * In the file package.xml: 32 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 33 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 34 | ## pulled in transitively but can be declared for certainty nonetheless: 35 | ## * add a build_depend tag for "message_generation" 36 | ## * add a run_depend tag for "message_runtime" 37 | ## * In this file (CMakeLists.txt): 38 | ## * add "message_generation" and every package in MSG_DEP_SET to 39 | ## find_package(catkin REQUIRED COMPONENTS ...) 40 | ## * add "message_runtime" and every package in MSG_DEP_SET to 41 | ## catkin_package(CATKIN_DEPENDS ...) 42 | ## * uncomment the add_*_files sections below as needed 43 | ## and list every .msg/.srv/.action file to be processed 44 | ## * uncomment the generate_messages entry below 45 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 46 | 47 | ## Generate messages in the 'msg' folder 48 | # add_message_files( 49 | # FILES 50 | # Message1.msg 51 | # Message2.msg 52 | # ) 53 | 54 | add_message_files( 55 | FILES 56 | distance.msg 57 | ) 58 | 59 | ## Generate services in the 'srv' folder 60 | # add_service_files( 61 | # FILES 62 | # Service1.srv 63 | # Service2.srv 64 | # ) 65 | 66 | add_service_files( 67 | FILES 68 | AdcToDistance.srv 69 | ) 70 | 71 | ## Generate actions in the 'action' folder 72 | # add_action_files( 73 | # FILES 74 | # Action1.action 75 | # Action2.action 76 | # ) 77 | 78 | ## Generate added messages and services with any dependencies listed here 79 | generate_messages( 80 | DEPENDENCIES 81 | std_msgs 82 | ) 83 | 84 | ################################### 85 | ## catkin specific configuration ## 86 | ################################### 87 | ## The catkin_package macro generates cmake config files for your package 88 | ## Declare things to be passed to dependent projects 89 | ## INCLUDE_DIRS: uncomment this if you package contains header files 90 | ## LIBRARIES: libraries you create in this project that dependent projects also need 91 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 92 | ## DEPENDS: system dependencies of this project that dependent projects also need 93 | catkin_package( 94 | # INCLUDE_DIRS include 95 | # LIBRARIES beginner_tutorials 96 | # CATKIN_DEPENDS roscpp rospy std_msgs 97 | # DEPENDS system_lib 98 | ) 99 | 100 | ########### 101 | ## Build ## 102 | ########### 103 | 104 | ## Specify additional locations of header files 105 | ## Your package locations should be listed before other locations 106 | # include_directories(include) 107 | include_directories( 108 | ${catkin_INCLUDE_DIRS} 109 | ) 110 | 111 | ## Declare a cpp library 112 | # add_library(beginner_tutorials 113 | # src/${PROJECT_NAME}/beginner_tutorials.cpp 114 | # ) 115 | 116 | ## Declare a cpp executable 117 | # add_executable(beginner_tutorials_node src/beginner_tutorials_node.cpp) 118 | 119 | ## Add cmake target dependencies of the executable/library 120 | ## as an example, message headers may need to be generated before nodes 121 | # add_dependencies(beginner_tutorials_node beginner_tutorials_generate_messages_cpp) 122 | 123 | ## Specify libraries to link a library or executable target against 124 | # target_link_libraries(beginner_tutorials_node 125 | # ${catkin_LIBRARIES} 126 | # ) 127 | 128 | ############# 129 | ## Install ## 130 | ############# 131 | 132 | # all install targets should use catkin DESTINATION variables 133 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 134 | 135 | ## Mark executable scripts (Python etc.) for installation 136 | ## in contrast to setup.py, you can choose the destination 137 | # install(PROGRAMS 138 | # scripts/my_python_script 139 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 140 | # ) 141 | 142 | ## Mark executables and/or libraries for installation 143 | # install(TARGETS beginner_tutorials beginner_tutorials_node 144 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 145 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 146 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 147 | # ) 148 | 149 | ## Mark cpp header files for installation 150 | # install(DIRECTORY include/${PROJECT_NAME}/ 151 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 152 | # FILES_MATCHING PATTERN "*.h" 153 | # PATTERN ".svn" EXCLUDE 154 | # ) 155 | 156 | ## Mark other files for installation (e.g. launch and bag files, etc.) 157 | # install(FILES 158 | # # myfile1 159 | # # myfile2 160 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 161 | # ) 162 | 163 | ############# 164 | ## Testing ## 165 | ############# 166 | 167 | ## Add gtest based cpp test target and link libraries 168 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_beginner_tutorials.cpp) 169 | # if(TARGET ${PROJECT_NAME}-test) 170 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 171 | # endif() 172 | 173 | ## Add folders to be run by python nosetests 174 | # catkin_add_nosetests(test) 175 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/msg/distance.msg: -------------------------------------------------------------------------------- 1 | uint8 raw 2 | float32 inch 3 | float32 cm 4 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | beginner_tutorials 4 | 0.0.0 5 | The beginner_tutorials package 6 | 7 | 8 | 9 | 10 | ubuntu 11 | 12 | 13 | 14 | 15 | 16 | TODO 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | roscpp 44 | rospy 45 | std_msgs 46 | message_generation 47 | roscpp 48 | rospy 49 | std_msgs 50 | message_runtime 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/scripts/AdcToDistance.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from beginner_tutorials.srv import * 4 | import rospy 5 | 6 | def handle_AdcToDistance(req): 7 | 8 | print "Returning distance values for analog value %d " % (req.adc) 9 | inches = (254.0/1024.0) *2.0* (req.adc/5) 10 | cm = inches * 2.54 11 | 12 | return AdcToDistanceResponse(inches,cm) 13 | 14 | def AdcToDistance_server(): 15 | rospy.init_node('AdcToDistance_server') 16 | s = rospy.Service('adc_to_distance', AdcToDistance, handle_AdcToDistance) 17 | print "Ready to convert adc values to distance" 18 | rospy.spin() 19 | 20 | if __name__ == "__main__": 21 | AdcToDistance_server() 22 | 23 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/scripts/AdcToDistance_Client.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import roslib; roslib.load_manifest('beginner_tutorials') 3 | 4 | import sys 5 | 6 | import rospy 7 | from beginner_tutorials.srv import * 8 | 9 | def adc_to_distance_client(adc): 10 | rospy.wait_for_service('adc_to_distance') 11 | try: 12 | adc_dist = rospy.ServiceProxy('adc_to_distance', AdcToDistance) 13 | resp1 = adc_dist(adc) 14 | print resp1.inches 15 | print resp1.cm 16 | return resp1 17 | except rospy.ServiceException, e: 18 | print "Service call failed: %s" % e 19 | 20 | def usage(): 21 | return "%s [ x where 0 < x < 1023 ]" % sys.argv[0] 22 | 23 | if __name__ == "__main__": 24 | if len(sys.argv) == 2: 25 | x = int(sys.argv[1]) 26 | else: 27 | print usage() 28 | sys.exit(1) 29 | print "Requesting to convert %d to distance" % x 30 | results=adc_to_distance_client(x) 31 | print "%d = %3.3f in inches and %3.3f in cm " % (x, results.inches,results.cm) 32 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/scripts/Sonar_Node.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import getopt 3 | 4 | import rospy 5 | import roslib; roslib.load_manifest('beginner_tutorials') 6 | from std_msgs.msg import UInt16 7 | from sensor_msgs.msg import Range 8 | 9 | from beginner_tutorials.srv import * 10 | 11 | class Sonar_Node(object): 12 | 13 | def __init__(self): 14 | 15 | rospy.init_node('sonar_node',anonymous=False) 16 | self.inchpub = rospy.Publisher('/ultrasound/inch',UInt16) 17 | self.cmpub = rospy.Publisher('/ultrasound/cm',UInt16) 18 | rospy.on_shutdown(self.shutdown) 19 | 20 | robotrate=10 21 | r=rospy.Rate(robotrate) 22 | 23 | self.analog_range=0 24 | 25 | def shutdown(self): 26 | # Always stop the robot when shutting down the node. 27 | rospy.loginfo("Stopping the Node...") 28 | rospy.sleep(1) 29 | 30 | 31 | def sonarCb(self,Range): 32 | msg_str="SonarRange=%3.2f" % (Range.range) 33 | rospy.loginfo(rospy.get_name()+msg_str) 34 | self.analog_range = Range.range 35 | 36 | def listener(self): 37 | rospy.Subscriber("ultrasound_fwd", Range, self.sonarCb) 38 | 39 | def calc_distance(self): 40 | 41 | rospy.wait_for_service('adc_to_distance') 42 | try: 43 | adc_dist = rospy.ServiceProxy('adc_to_distance', AdcToDistance) 44 | distance = adc_dist(self.analog_range) 45 | print distance.inches 46 | print distance.cm 47 | #self.inches=distance.inches 48 | #self.cm=distance.cm 49 | 50 | self.inchpub.publish(distance.inches) 51 | self.cmpub.publish(distance.cm) 52 | 53 | except rospy.ServiceException, e: 54 | print "Service call failed: %s" % e 55 | 56 | if __name__ == '__main__': 57 | 58 | sn=Sonar_Node() 59 | sn.listener() 60 | 61 | r=rospy.Rate(10) 62 | 63 | while not rospy.is_shutdown(): 64 | sn.calc_distance() 65 | r.sleep() 66 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/scripts/bumper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2008, Willow Garage, Inc. 3 | # All rights reserved. 4 | # 5 | ## Simple talker demo that listens to std_msgs/Strings published 6 | ## to the 'chatter' topic 7 | # 8 | # 2017 Alan Federman SV-ROS 9 | # 10 | # A simple listener for the SV_ROS (from neato_node) the listens to see if 11 | # the bumper has been pressed on a Botvac. 12 | # 13 | # This code can be incuded in navigation scripts to halt or turn the robot if 14 | # the bumper has been pressed 15 | # 16 | # the values are Left_Bumper Right_Bumper Left_Side_Bumper Right_Side_Bumper 17 | # 18 | # to use install in catkin_ws in a node subdirectory on your laptop for example 19 | # /catkin_ws/src/test/src and rosrun test bumper.py -- of course set the master 20 | # and launch the base on the Botvac. 21 | # 22 | import roslib; roslib.load_manifest("neato_node") 23 | import rospy 24 | from math import sin,cos,pi 25 | 26 | from neato_node.msg import Button, Sensor 27 | 28 | class NeatoNode: 29 | 30 | def __init__(self): 31 | 32 | self.sensorPub = rospy.Publisher('sensor', Sensor, queue_size=10) 33 | sensor = Sensor() 34 | 35 | def callback(sensor): 36 | rospy.loginfo(rospy.get_caller_id() + ' I heard %s',sensor.name) 37 | 38 | def listener(): 39 | 40 | # In ROS, nodes are uniquely named. If two nodes with the same 41 | # name are launched, the previous one is kicked off. The 42 | # anonymous=True flag means that rospy will choose a unique 43 | # name for our 'listener' node so that multiple listeners can 44 | # run simultaneously. 45 | rospy.init_node('listener', anonymous=True) 46 | 47 | rospy.Subscriber('sensor', Sensor, callback) 48 | 49 | # spin() simply keeps python from exiting until this node is stopped 50 | rospy.spin() 51 | 52 | if __name__ == '__main__': 53 | listener() 54 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/srv/AdcToDistance.srv: -------------------------------------------------------------------------------- 1 | int16 adc 2 | --- 3 | float32 inches 4 | float32 cm 5 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/srv/AddTwoInts.srv: -------------------------------------------------------------------------------- 1 | int64 a 2 | int64 b 3 | --- 4 | int64 sum 5 | -------------------------------------------------------------------------------- /sample_code/beginner_tutorials/srv/AnalogToDistance.srv: -------------------------------------------------------------------------------- 1 | int16 range 2 | --- 3 | float32 inches 4 | float32 cm 5 | -------------------------------------------------------------------------------- /sample_code/svros_single_sonar/svros_single_sonar.ino: -------------------------------------------------------------------------------- 1 | /* 2 | *Process rosserial messages for a Maxbotix Sonar 3 | */ 4 | #include 5 | //#include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | const int fwd_sonar=0; 12 | 13 | char sonarframe_fwd[]="/ultrasound_fwd"; 14 | 15 | ros::NodeHandle nh; 16 | 17 | sensor_msgs::Range range_msg_fwd; 18 | 19 | //sensor_msgs::Range range_msg_arr[3]; 20 | 21 | void initSonar( sensor_msgs::Range range_msg, char* frameid) { 22 | 23 | range_msg.radiation_type = sensor_msgs::Range::ULTRASOUND; 24 | range_msg.header.frame_id = frameid; 25 | range_msg.field_of_view = 0.1; // fake 26 | range_msg.min_range = 0.0; 27 | range_msg.max_range = 6.47; 28 | } 29 | 30 | ros::Publisher pub_sonar_fwd( "/ultrasound_fwd", &range_msg_fwd); 31 | 32 | void setup() 33 | { 34 | Serial.begin(9600); 35 | initSonar(range_msg_fwd,sonarframe_fwd); 36 | 37 | nh.initNode(); 38 | nh.advertise(pub_sonar_fwd); 39 | 40 | } 41 | 42 | void loop() 43 | { 44 | 45 | static int i = 0; 46 | int j; 47 | uint16_t blocks; 48 | char buf[32]; 49 | float sonarval=0.0; 50 | int num_sonars=1; 51 | int num_samples=5; 52 | 53 | sonarval=ProcSonar(num_samples); 54 | 55 | initSonar(range_msg_fwd,sonarframe_fwd); 56 | 57 | range_msg_fwd.range = sonarval; 58 | 59 | range_msg_fwd.header.stamp = nh.now(); 60 | 61 | if ( range_msg_fwd.range < 100) { 62 | 63 | pub_sonar_fwd.publish(&range_msg_fwd); 64 | } 65 | 66 | nh.spinOnce(); 67 | 68 | //Serial.println(sonarval); 69 | 70 | delay(100); 71 | } 72 | 73 | int ProcSonar(int num_samples) { 74 | int raw_val=0; 75 | for(int j=0;j