Skip to content

Latest commit

 

History

History
209 lines (152 loc) · 12.1 KB

agribot_navigation.md

File metadata and controls

209 lines (152 loc) · 12.1 KB

AgriBot Project (Navigation)



Navigation In ROS

This package contains the most important parameters to run the Navigation package from ROS. It is A 2D navigation stack that takes in information from odometry, sensor streams, and a goal pose and outputs safe velocity commands that are sent to a mobile base.

It takes in information from odometry and sensor streams and outputs velocity commands to send to a mobile base. As a pre-requisite for navigation stack use, the robot must be running ROS, have a tf transform tree in place, and publish sensor data using the correct ROS Message types. Also, the Navigation Stack needs to be configured for the shape and dynamics of a robot to perform at a high level.

navgraph

more information in Navigation


Navigation in AgriBot

The path which robot should traverse on its operations in the field could be divided into different motion/action which, behavior core will execute assorted strategies and distinct algorithms to fulfill the tasks. As figure below shows, navigation is divided into three major steps which includes way-point navigation, Turning action to switch between the rows in the field and VisualServoing navigator which guides the robot through crop rows.

navgraph

If we suppose, the robot starts from the beginning of a crop row in the field, the desire is to approaching to a different known positions on the other side of the row through navigating between crop rows. This part is defined between different way-points (known points) which locally or globally their positions are recorded in such a way that user can redefine or adjust them.

The robot’s motion will be controlled by VisualServoing and a local planner core through the path between these two way-points. This means the core of this navigation strategy is the VisualServoing and the local planner packages, which process all the sensory data and decisions are made based actions needed to be performed.

navgraph

as its shown in the figure, almost all the sensors and actuators are used in this process. Also, performing different variants of one specific action is possible with different ground truth or different motion sensors ( for example: odometry from wheel, mocap or visual). Onward, user can use the fusion of sensors thorough localization package which tries to fuse all sensory data to reach a more reliable one.

Also, the behavior core on top of all nodes will manage to turn the robot toward next row at the end of each row and switch the controllers properly.

The turning action can be generated by the local planner and some static steps of motion defined by the user. at the moment one static trajectory (in shape of circle) is defining steps which takes the robot from one row to another.

navgraph

Also, the operator can control the robot while it is performing an action by joystick.

Assume, a goal is given to the robot, in the robot’s environment (coordinate system), the local planner core along with move_base package provides a plan that endeavors to get the robot to it.

In the background of navigation stack operation, there is a global planner which generates the required trajectory based on a variant of the A* algorithm. So far, the navigation implementation illustrated with two different layers, global and local planners which global planner plans the path to the target and local planner attempts to drive the robot toward the goal using VisualServoing and other actions.

These layers specially the global planner could be defined specially for AgroBot which its core is under development.

About the agribot_navigation package

The navigation package is containing map dependencies, Navigation stack parameters(move_base, planners,...) and a simple node to send static goals to robot along with simple launch files to ease the running process. the most important dependencies and packages are illustrated in following.

The move_base package

The move_base package provides an implementation of an action (see the actionlib package) that, given a goal in the world, will attempt to reach it with a mobile base. The move_base node links together a global and local planner to accomplish its global navigation task.

In AgriBot project, move_base launches via agribot_move.launch from agribot_navigation package.

$ roslaunch agribot_navigation agribot_move.launch

Node [/move_base] Publications:

  • /cmd_vel [geometry_msgs/Twist]
  • /current_pose [geometry_msgs/PoseStamped]
  • /move_base/AgribotLocalPlanner/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/AgribotLocalPlanner/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/NavfnROS/plan [nav_msgs/Path]
  • /move_base/current_goal [geometry_msgs/PoseStamped]
  • /move_base/feedback [move_base_msgs/MoveBaseActionFeedback]
  • /move_base/global_costmap/costmap [nav_msgs/OccupancyGrid]
  • /move_base/global_costmap/costmap_updates [map_msgs/OccupancyGridUpdate]
  • /move_base/global_costmap/footprint [geometry_msgs/PolygonStamped]
  • /move_base/global_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/global_costmap/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/global_costmap/static/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/global_costmap/static/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/goal [move_base_msgs/MoveBaseActionGoal]
  • /move_base/local_costmap/costmap [nav_msgs/OccupancyGrid]
  • /move_base/local_costmap/costmap_updates [map_msgs/OccupancyGridUpdate]
  • /move_base/local_costmap/footprint [geometry_msgs/PolygonStamped]
  • /move_base/local_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/local_costmap/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/local_costmap/static/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/local_costmap/static/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
  • /move_base/parameter_updates [dynamic_reconfigure/Config]
  • /move_base/result [move_base_msgs/MoveBaseActionResult]
  • /move_base/status [actionlib_msgs/GoalStatusArray]
  • /rosout [rosgraph_msgs/Log]
  • /target_pose [geometry_msgs/PoseStamped]

Subscriptions:

  • /map [nav_msgs/OccupancyGrid]
  • /mocap_odom [nav_msgs/Odometry]
  • /move_base/cancel [unknown type]
  • /move_base/global_costmap/footprint [geometry_msgs/PolygonStamped]
  • /move_base/goal [move_base_msgs/MoveBaseActionGoal]
  • /move_base/local_costmap/footprint [geometry_msgs/PolygonStamped]
  • /move_base_simple/goal [unknown type]
  • /tf [tf2_msgs/TFMessage]
  • /tf_static [tf2_msgs/TFMessage]

Services:

  • /move_base/AgribotLocalPlanner/set_parameters

  • /move_base/NavfnROS/make_plan

  • /move_base/clear_costmaps

  • /move_base/get_loggers

  • /move_base/global_costmap/set_parameters

  • /move_base/global_costmap/static/set_parameters

  • /move_base/local_costmap/set_parameters

  • /move_base/local_costmap/static/set_parameters

  • /move_base/make_plan

  • /move_base/set_logger_level

  • /move_base/set_parameters

  • from more informtion about move_base package visit ROS move_base

How to run navigation base

To launch the agribot_navigation simply run:

$ roslaunch agribot_navigation agribot_navigation.launch

it will publish the map via using map_server package and launches move_base including global and local planners.

NOTE it needs the /tf to be published from base controller and robot description. agribot_base_controller, agribot_description


About the map_server Package

map_server provides the map_server ROS Node, which offers map data as a ROS Service. It also provides the map_saver command-line utility, which allows dynamically generated maps to be saved to file

how to set an image as predefined/input map:

based on map_server tutorial on ros wiki, we can load an image as predefined or saved map which shows the environment is rigid cells in term of occupancy and this term can be archived by description in below. The image describes the occupancy state of each cell of the world in the color of the corresponding pixel. In the standard configuration, whiter pixels are free, blacker pixels are occupied, and pixels in between are unknown. Color images are accepted, but the color values are averaged to a gray value.

here the YAML file which is defining characteristics of the map based on image use in Agribot navigation:

image: map.png
resolution: 0.050000
origin: [0.000000, 0.000000, 0]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

to run map dependencies in Agribot platfrom use:

$ roslaunch agribot_navigation agribot_map.launch

Required fields:

  • image : Path to the image file containing the occupancy data; can be absolute, or relative to the location of the YAML file
  • resolution: Resolution of the map, meters / pixel
  • origin : The 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation (yaw=0 means no rotation). Many parts of the system currently ignore yaw.
  • occupied_thresh : Pixels with occupancy probability greater than this threshold are considered completely occupied.
  • free_thresh : Pixels with occupancy probability less than this threshold are considered completely free.
  • negate : Whether the white/black free/occupied semantics should be reversed (interpretation of thresholds is unaffected) Optional parameter:
  • mode : Can have one of three values: trinary, scale, or raw. Trinary is the default. More information on how this changes the value interpretation is in the next section.

for more information take a look at map_server.



References


by: Alireza Ahmadi
University of Bonn- Robotics & Geodetic Engineering

Alireza.Ahmadi@uni-bonn.de