Skip to content

ezrassor_autonomous_control

Jordan Albury edited this page Apr 25, 2020 · 14 revisions

Summary

The ezrassor_autonomous_control package utilizes the depth camera and inertial measurement unit (IMU) on board the EZ-RASSOR to navigate, avoid obstacles, and mine regolith. Odometry is performed via a combination of wheel odometry, IMU odometry, and visual odometry using an extended Kalman filter. The nodes in this package also enable the robot to perform autonomous routines, like auto-dig and auto-dump.

Nodes

autonomous_control

This node functions as the central control hub of the autonomous system and performs the majority of the publishing. In order to add autonomous functionality, new functions should be created in auto_functions.py, utility_functions.py, or nav_functions.py and then would be called inside autonomous_control.py. ai_objects.py contains two classes which encapsulate the publishers and state variables relevant to the autonomous system. If new environmental variables or publishing is required this file is where those changes should be made.

obstacle_detection

This node performs the obstacle detection functionality for the autonomous system. The node subscribes to the point cloud produced by the depth camera and publishes laser scans to show the distances to the nearest obstacles in each direction the robot can see. Obstacle detection is performed using three techniques and publishes a laser scan for the result of each. The Hike method compares the change in distance of consecutive points in a direction to a configurable threshold (min_hole_diameter). The Slope method compares the slope (change in height divided by change in distance) of consecutive points in a direction based on a configurable threshold (max_obstacle_angle). The Combined method uses the minimum distance to an obstacle in each direction of the results of the Hike and Slope methods.

park_ranger

This node performs the absolute localization functionality for the autonomous system. The node subscribes to the point cloud produced by the depth camera and converts the point cloud to a top-down grid view that acts as a local Digital Elevation Model (DEM). This local DEM is compared to a global DEM (a pre-populated DEM of the entire world that the robot is in), and the location of the robot is iteratively narrowed-down using a particle filter. Once the particle filter has converged on an estimate, the estimate is published.

Inputs/Outputs

autonomous_control

The following is a list of topic inputs and outputs, with each topic's type shown in brackets:

INPUTS
node <- /odometry/filtered [nav_msgs/Odometry]
node <- /imu [sensor_msgs/Imu]
node <- /joint_states [sensor_msgs/JointState]
node <- /obstacle_detection/combined [sensor_msgs/LaserScan]
node <- /autonomous_toggles [std_msgs/Int8]

OUTPUTS
node -> wheel instructions topic configured at launch [geometry_msgs/Twist]
node -> front arm instructions topic configured at launch [std_msgs/Float32]
node -> back arm instructions topic configured at launch [std_msgs/Float32]
node -> front drum instructions topic configured at launch [std_msgs/Float32]
node -> back drum instructions topic configured at launch [std_msgs/Float32]
node -> /secondary_override_toggle [std_msgs/Bool]
node -> /arms_up [std_msgs/Bool]

Note that the current version of the software is set up to work with Gazebo reading from several topics that are published by the simulation. In order for the package to work on a physical robot, the subscriber callbacks which are assigned in ai_objects.py should be altered to match the specific hardware being used. Future development on this package will work to make this process automated by querying certain topic names in the launch file.

obstacle_detection

The following is a list of topic inputs and outputs, with each topic's type shown in brackets:

INPUTS
node <- /depth/camera_info [sensor_msgs/CameraInfo]
node <- /depth/points [sensor_msgs/PointCloud]

OUTPUTS
node -> /obstacle_detection/hike [sensor_msgs/LaserScan]
node -> /obstacle_detection/slope [sensor_msgs/LaserScan]
node -> /obstacle_detection/combined [sensor_msgs/LaserScan]

park_ranger

The following is a list of topic inputs and outputs, with each topic's type shown in brackets:

INPUTS
node <- /depth/camera_info [sensor_msgs/CameraInfo]
node <- /depth/points [sensor_msgs/PointCloud]
node <- /odometry/filtered [nav_msgs/Odometry]
node <- /arms_up [std_msgs/Bool]

OUTPUTS
node -> /park_ranger/odom [nav_msgs/Odometry]

Launch Files

autonomous_control.launch

This launch file launches all of the necessary components of the autonomy suite. It contains arguments that allow for different components of the system to be toggled on and off, and it allows for the names of each of the movement topics to be set. All possible inputs are listed below:

wheel_instructions_topic
The topic that wheel instructions are published to.
front_arm_instructions_topic
The topic that front arm instructions are published to.
back_arm_instructions_topic
The topic that back arm instructions are published to.
front_drum_instructions_topic
The topic that front drum instructions are published to.
back_drum_instructions_topic
The topic that back drum instructions are published to.
digsite_x_coord
The x coordinate of the target digsite. Defaults to 10.
digsite_y_coord
The y coordinate of the target digsite. Defaults to 10.
spawn_x_coord
The x coordinate of the spawn point. Defaults to 0.
spawn_y_coord
The y coordinate of the spawn point. Defaults to 0.
max_linear_velocity
The maximum linear velocity of the robot. Defaults to 0.125.
max_angular_velocity
The maximum angular velocity of the robot. Defaults to 0.3.
enable_real_odometry
Enable real odometry over simulated odometry. This is useful for testing parts of the system not involving odometry directly or preventing errors in low-texture, simulated environments. Defaults to false.
obstacle_threshold
The maximum distance of an obstacle from the robot at which the robot will seek to manuever around the obstacle. Defaults to 4.0.
obstacle_buffer:
The buffer to use when maneuvering around an obstacle to ensure that the robot does not clip obstacles. Defaults to 1.5.
move_increment:
The distance the robot moves along a path before considering new paths. Defaults to 3.0.
max_obstacle_angle:
The angle (in degrees) at which a slope starts being considered an obstacle. Defaults to 45.0.
min_hole_diameter:
The minimum gap between points the robot can see in a direction for the robot to consider the gap a hole.
enable_park_ranger
Enable Park Ranger (matching the surroundings of the robot to an overhead map) for absolute localization. Currently, Park Ranger is inaccurate, so enabling it will not actually affect the movement of the robot; instead, Park Ranger's estimate will be published to a topic. Defaults to false.
world
The world filename that the simulation loads. Defaults to default.

Clone this wiki locally