Skip to content

Commit

Permalink
code builds now
Browse files Browse the repository at this point in the history
or, at least, kind of
  • Loading branch information
danielbrownmsm committed Feb 16, 2024
1 parent 5b5af5d commit ab38941
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 6 additions & 5 deletions autonav_ws/src/autonav_nav/include/autonav_nav/astar.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ struct GraphNode {

class AStarNode : public SCR::Node {
public:
AStarNode();
AStarNode() : SCR::Node("astar_fast") {}
~AStarNode() {};

void init() override;
private:
// === ros things ===
// subcribers
rclcpp::Subscription<nav_msgs::msg::OccupancyGrid> leftExpandedSubscriber;
rclcpp::Subscription<nav_msgs::msg::OccupancyGrid> rightExpandedSubscriber;
rclcpp::Subscription<geometry_msgs::msg::Pose> poseSubscriber;
rclcpp::Subscription<autonav_msgs::msg::IMUData> imuSubscriber;
rclcpp::Subscription<nav_msgs::msg::OccupancyGrid>::SharedPtr leftExpandedSubscriber;
rclcpp::Subscription<nav_msgs::msg::OccupancyGrid>::SharedPtr rightExpandedSubscriber;
rclcpp::Subscription<geometry_msgs::msg::Pose>::SharedPtr poseSubscriber;
rclcpp::Subscription<autonav_msgs::msg::IMUData>::SharedPtr imuSubscriber;

// publishers
rclcpp::Publisher<nav_msgs::msg::Path>::SharedPtr pathPublisher;
Expand Down
12 changes: 5 additions & 7 deletions autonav_ws/src/autonav_nav/src/astar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
// also TODO make the file reading code so we can a list of waypoints and stuff
//TODO make smellification or whatever goal-finding heuristic algorithm thingy
//TODO use reserve() to not have to constantly resize all our vectors
//TODO write actual subscriber methods and whatnot

AstarNode AStarNode::AstarNode() : SCR::Node("astar_fast") {
//TODO constructor or something
}

void AStarNode::init() {
// TODO do this?
Expand All @@ -26,12 +24,12 @@ void AStarNode::init() {


// left/right filtered subscribers
leftExpandedSubscriber = this->create_subscription<nav_msgs::msg::OccupancyGrid>("/autonav/cfg_space/expanded/left", std::bind(&AStarNode::onLeftReceived, this, std::placeholders::_1), 20);
rightExpandedSubscriber = this->create_subscription<nav_msgs::msg::OccupancyGrid>("/autonav/cfg_space/expanded/right", std::bind(&AStarNode::onRightReceived, this, std::placeholders::_1), 20);
leftExpandedSubscriber = this->create_subscription<nav_msgs::msg::OccupancyGrid>("/autonav/cfg_space/expanded/left", 20, std::bind(&AStarNode::onLeftReceived, this, std::placeholders::_1));
rightExpandedSubscriber = this->create_subscription<nav_msgs::msg::OccupancyGrid>("/autonav/cfg_space/expanded/right", 20, std::bind(&AStarNode::onRightReceived, this, std::placeholders::_1));

// localization data subscribers
poseSubscriber = this->create_subscription<nav_msgs::msg::Position>("/autonav/position", std::bind(&AStarNode::onPoseReceived, this, std::placeholders::_1), 20);
imuSubscriber = this->create_subscription<autonav_msgs::msg::IMUData>("/autonav/imu", std::bind(&AStarNode::onImuReceived, this, std::placeholders::_1), 20);
poseSubscriber = this->create_subscription<geometry_msgs::msg::Pose>("/autonav/position", 20, std::bind(&AStarNode::onPoseReceived, this, std::placeholders::_1));
imuSubscriber = this->create_subscription<autonav_msgs::msg::IMUData>("/autonav/imu", 20, std::bind(&AStarNode::onImuReceived, this, std::placeholders::_1));
// raw_map_subscriber = create_subscription<nav_msgs::msg::OccupancyGrid>(directionify("/autonav/cfg_space/raw"), 20, std::bind(&ExpandifyNode::onConfigSpaceReceived, this, std::placeholders::_1));

// === publishers ===
Expand Down

0 comments on commit ab38941

Please sign in to comment.