1#ifndef BITSIM_PLANNING_BOX_WORLD_H
2#define BITSIM_PLANNING_BOX_WORLD_H
31 using Point = std::array<real_t, 2>;
60 const std::vector<Box> &
obstacles() const noexcept {
return obstacles_; }
62 const Point &
goal() const noexcept {
return goal_; }
98 std::vector<Box> obstacles_;
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
A rectangular slice of the plane with axis-aligned box obstacles, a start and a goal.
Definition box_world.h:29
bool is_free(const Point &p) const
True if a disc of the given radius centred at p touches no obstacle and no outer wall....
Definition box_world.h:68
static BoxWorld warehouse()
The warehouse of the grid_planning and rrt examples: 8 x 5 m, a 0.25 m robot, five shelves and a wall...
Definition box_world.cpp:152
std::array< real_t, 2 > Point
Definition box_world.h:31
OccupancyGrid occupancy_grid(real_t cell_size) const
The world as an OccupancyGrid of square cells, with the obstacles and the outer walls grown by margin...
Definition box_world.h:76
real_t robot_radius() const noexcept
Definition box_world.h:59
const Point & goal() const noexcept
Definition box_world.h:62
RayHit ray_cast(const Point &origin, real_t angle, real_t max_range) const
Cast a ray from origin in the direction angle (radians, measured from the x axis) and return the dist...
Definition box_world.cpp:112
const std::vector< Box > & obstacles() const noexcept
Definition box_world.h:60
real_t width() const noexcept
Definition box_world.h:57
BoxWorld(real_t width, real_t height, std::vector< Box > obstacles, real_t robot_radius, const Point &start, const Point &goal)
Definition box_world.cpp:14
real_t height() const noexcept
Definition box_world.h:58
const Point & start() const noexcept
Definition box_world.h:61
A rectangle of the plane cut into square cells, each free or occupied.
Definition occupancy_grid.h:43
Definition a_star_search.cpp:8
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20
An axis-aligned box [x0, x1] x [y0, y1] [m].
Definition box_world.h:35
real_t y1
Definition box_world.h:36
real_t x1
Definition box_world.h:36
real_t x0
Definition box_world.h:36
real_t y0
Definition box_world.h:36
What a range beam found: whether it struck anything within reach, and how far away.
Definition box_world.h:41
real_t distance
the distance to the obstacle or wall, or max_range on a miss [m]
Definition box_world.h:43
bool hit
false if the beam reached max_range without striking anything
Definition box_world.h:42