User Tools

Site Tools


robotino_nav_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
robotino_nav_tutorial [2018/11/24 18:54] – created jkreitzrobotino_nav_tutorial [2018/12/05 15:08] (current) jkreitz
Line 1: Line 1:
-Background +**Robotino Demo Tutorial** 
 + 
 +**Background** 
  
 Path-finding is an important method for mobile robots to find the shortest path or obstacle avoidance between two points.Since Robotino doesn’t have any sensors, it requires certain algorithms to avoid obstacles. This tutorial focuses on how to set up and run the Robotino pathfinding demo. Path-finding is an important method for mobile robots to find the shortest path or obstacle avoidance between two points.Since Robotino doesn’t have any sensors, it requires certain algorithms to avoid obstacles. This tutorial focuses on how to set up and run the Robotino pathfinding demo.
  
-Setting Up Robotino+**Setting Up Robotino**
  
 +{{:robotino_2.png?200|}}
  
 The batteries are old so it may only run for 15-20 min. The batteries are old so it may only run for 15-20 min.
Line 12: Line 15:
 Plug Robotino into the router using an ethernet cable Plug Robotino into the router using an ethernet cable
 Once you are able to access Robotino’s main menu, select the following menu sequence Once you are able to access Robotino’s main menu, select the following menu sequence
-“Network” + 
-“Eth0” +  * “Network” 
-“DHCP” +  “Eth0” 
-“Activate”+  “DHCP” 
 +  “Activate” 
 Once the menu says “success,” press the left arrow key until you get back to “Network.” Double check the IP address - you will need it for the ROS node. Once the menu says “success,” press the left arrow key until you get back to “Network.” Double check the IP address - you will need it for the ROS node.
  
    
-Place a grid on the floor. After securely taping the cloth, make a grid with tape - make sure each square is big enough for Robotino. +Place a grid on the floor. The bottom right corner will be location (0,0) on the grid. After securely taping the cloth, make a grid with tape - make sure each square is big enough for Robotino. 
 Note, the size of each square can be user-defined.  Note, the size of each square can be user-defined. 
  
-  +{{:robotino_1.png?200|}}
-This is an example of the grid coordinates+
  
 +---------------------------------------
  
-To use Robotino Potential Field demonstration, follow these steps +**Using Robotino for Potential Field Demo**
-Open Terminal +
-~$ roslaunch robotino_node robotino_node.launch hostname:=<Robotino IP Address>+
  
-Then open a new terminal and navigate to the Catkin Workspace +Creating the Grid
-~$ cd catkin_ws/ +
-~$ catkin_make +
-~$ rosrun vikram yahoo+
  
-The Robotino demonstration will run once you input the rosrun command+To change the size of each box in the program, go to the PFNav.cpp file and change the “scale” variable in the “tileGridGoal” function. Units are in meters.
  
---------------------------------------- 
  
-Using Robotino for Potential Field Demo +Changing Goal/Obstacles
- +
-Goal/Obstacles+
  
 To change the goal/obstacle locations, go to the PFNavNode.cpp in the vikram package. In the navigator object in the main function, there are two specific methods - “navigator.tileGridGoal(x,y,w)” and “navigator.tileGridObstacle(x,y,w,d) ” - that you can use to define where the Robotino’s goal is and which obstacles are in its way. To change the goal/obstacle locations, go to the PFNavNode.cpp in the vikram package. In the navigator object in the main function, there are two specific methods - “navigator.tileGridGoal(x,y,w)” and “navigator.tileGridObstacle(x,y,w,d) ” - that you can use to define where the Robotino’s goal is and which obstacles are in its way.
Line 48: Line 45:
 x and y are positions on the grid, starting from (0,0) x and y are positions on the grid, starting from (0,0)
 z is the total length of the grid in terms of squares z is the total length of the grid in terms of squares
-d is .. (??)+d is the maximum range from the obstacle you would like Robotino to move 
 + 
 +After updating any of the values, make sure you catkin_make in the catkin_ws directory. 
 + 
 + 
 +Note: Potential Field only works well with one obstacle. 
 + 
 +--------------------------------------- 
 + 
 +To use Robotino Potential Field demonstration, open a terminal and input the following: 
 + 
 +  * "roslaunch robotino_node robotino_node.launch hostname:=<Robotino IP Address>" 
 + 
 +Then open a new terminal and input the following commands in the shell: 
 + 
 +  * "cd catkin_ws/" 
 +  * "catkin_make" 
 +  * "rosrun vikram yahoo" 
 + 
 +The Robotino demonstration will run once you input the rosrun command.  
 + 
 +==== Potential field ==== 
 +\\  
 + 
 +{{ youtube>X1TTRiAJsB4?large }} 
 + 
 +{{ youtube>zp9GgoVG31A?large }} 
 + 
 +\\  
 + 
 +--------------------------------------- 
 + 
 +**Using Robotino for Breadth First Demo**
  
 Updating the Grid Updating the Grid
  
-To change the size of each box in the program, go to the PFNav.cpp file and change the “scale” variable in the “tileGridGoal” functionUnits are in meters.+To change the size of each box in the program, go to the BFNavigatorNode.cpp
 +The "myMap.createGrid" method allows you to define the size of the grid. The parameters to the "createGrid" method are the length of the x and y axes.  
 + 
 +The "myMap.setOriginOnGrid" method allows you to define the origin of the grid, with (0,0) being the bottom right hand corner 
 + 
 +Goal/Obstacles 
 + 
 +The goal can be set by changing the parameters to the "myMap.addGoal" method. 
 +Obstacles can be set by changing the parameters to the "myMap.addObstacle" method. Note that obstacles in this demo are placed in a for loop. This allows you to place multiple obstacles along an axis.
  
 After updating any of the values, make sure you cakin_make in the catkin_ws directory. After updating any of the values, make sure you cakin_make in the catkin_ws directory.
  
 +
 +Note: Breadth First works well with less than four obstacles.
 +
 +---------------------------------------
 +
 +To use Robotino Breadth First demonstration, open a terminal and input the following:
 +
 +  * "roslaunch robotino_node robotino_node.launch hostname:=<Robotino IP Address>"
 +
 +Then open a new terminal and input the following commands in the shell:
 +
 +  * "cd catkin_ws/"
 +  * "catkin_make"
 +  * "rosrun vikram bfs" (if bfs doesn't work, use "move")
 +
 +The Robotino demonstration will run once you input the rosrun command.
 +
 +==== Breadth First ====
 +\\ 
 +
 +{{ youtube>sUl7V03U05A?large }}
 +
 +\\ 
robotino_nav_tutorial.1543114459.txt.gz · Last modified: by jkreitz