From d60c337199f3352c36a88c5d648d7409cbef9441 Mon Sep 17 00:00:00 2001 From: Jakub Delicat Date: Tue, 19 Jul 2022 21:25:18 +0200 Subject: [PATCH] Reviewed old package --- .vscode/settings.json | 24 +- Dockerfile | 23 ++ Dockerfile.devcontainer | 2 +- ros_entrypoint.sh | 7 + src/ros2aria/CMakeLists.txt | 6 +- src/ros2aria/include/ros2aria/raiibot.hpp | 36 +++ .../{src => include/ros2aria}/ros2aria.hpp | 22 +- src/ros2aria/package.xml | 1 + src/ros2aria/src/clutch.cpp | 5 +- src/ros2aria/src/cmd_vel.cpp | 5 +- src/ros2aria/src/gripper.cpp | 17 +- src/ros2aria/src/main.cpp | 2 +- src/ros2aria/src/pose.cpp | 44 ++-- src/ros2aria/src/publish.cpp | 2 +- src/ros2aria/src/raiibot.cpp | 213 ++++++++---------- src/ros2aria/src/ros2aria.cpp | 4 +- src/ros2aria/src/sonar.cpp | 3 +- src/ros2aria/src/state.cpp | 2 +- src/ros2aria/src/wheels.cpp | 2 +- 19 files changed, 231 insertions(+), 189 deletions(-) create mode 100644 Dockerfile create mode 100644 ros_entrypoint.sh create mode 100644 src/ros2aria/include/ros2aria/raiibot.hpp rename src/ros2aria/{src => include/ros2aria}/ros2aria.hpp (96%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4831153..3baa025 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -61,9 +61,31 @@ "thread": "cpp", "cinttypes": "cpp", "typeindex": "cpp", - "typeinfo": "cpp" + "typeinfo": "cpp", + "any": "cpp", + "hash_map": "cpp", + "hash_set": "cpp", + "strstream": "cpp", + "bitset": "cpp", + "cfenv": "cpp", + "compare": "cpp", + "complex": "cpp", + "concepts": "cpp", + "forward_list": "cpp", + "unordered_set": "cpp", + "source_location": "cpp", + "iomanip": "cpp", + "numbers": "cpp", + "semaphore": "cpp", + "stop_token": "cpp", + "valarray": "cpp", + "variant": "cpp", + "regex": "cpp" }, "cSpell.words": [ "rclcpp" + ], + "python.analysis.extraPaths": [ + "/opt/ros/foxy/lib/python3.8/site-packages" ] } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..231df35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +ARG ROS_DISTRO=humble +FROM ros:$ROS_DISTRO + +SHELL ["/bin/bash", "-c"] +RUN apt-get update && \ + # apt-get install -y \ + # && \ + apt-get autoremove -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +COPY ./src/AriaCoda /usr/local/Aria +RUN cd /usr/local/Aria && make -j$(nproc) + +RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc +COPY ros_entrypoint.sh / +ENTRYPOINT ["../ros_entrypoint.sh"] +RUN chmod +x /ros_entrypoint.sh + +WORKDIR /app +COPY src/ros2aria /app/src/ros2aria +COPY src/ros2aria_msgs /app/src/ros2aria_msgs +RUN cd /app && source /opt/ros/$ROS_DISTRO/setup.bash && colcon build \ No newline at end of file diff --git a/Dockerfile.devcontainer b/Dockerfile.devcontainer index 11d765c..aede68b 100644 --- a/Dockerfile.devcontainer +++ b/Dockerfile.devcontainer @@ -1,4 +1,4 @@ -FROM athackst/ros2:foxy-dev +FROM athackst/ros2:foxy-dev # ** [Optional] Uncomment this section to install additional packages. ** # diff --git a/ros_entrypoint.sh b/ros_entrypoint.sh new file mode 100644 index 0000000..1037048 --- /dev/null +++ b/ros_entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# setup ros environment +source "/opt/ros/$ROS_DISTRO/setup.bash" +source "install/setup.bash" +exec "$@" \ No newline at end of file diff --git a/src/ros2aria/CMakeLists.txt b/src/ros2aria/CMakeLists.txt index 43cd619..1db7cb0 100644 --- a/src/ros2aria/CMakeLists.txt +++ b/src/ros2aria/CMakeLists.txt @@ -23,6 +23,8 @@ find_package(geometry_msgs REQUIRED) find_package(sensor_msgs REQUIRED) find_package(nav_msgs REQUIRED) find_package(tf2 REQUIRED) +find_package(tf2_ros REQUIRED) +find_package(tf2_geometry_msgs REQUIRED) find_package(ros2aria_msgs REQUIRED) # uncomment the following section in order to fill in # further dependencies manually. @@ -41,13 +43,15 @@ add_executable(ros2aria src/wheels.cpp src/clutch.cpp src/state.cpp) - + ament_target_dependencies(ros2aria rclcpp) ament_target_dependencies(ros2aria std_srvs) ament_target_dependencies(ros2aria geometry_msgs) ament_target_dependencies(ros2aria sensor_msgs) ament_target_dependencies(ros2aria nav_msgs) ament_target_dependencies(ros2aria tf2) +ament_target_dependencies(ros2aria tf2_ros) +ament_target_dependencies(ros2aria tf2_geometry_msgs) ament_target_dependencies(ros2aria ros2aria_msgs) target_include_directories(ros2aria PUBLIC diff --git a/src/ros2aria/include/ros2aria/raiibot.hpp b/src/ros2aria/include/ros2aria/raiibot.hpp new file mode 100644 index 0000000..5fc0bbc --- /dev/null +++ b/src/ros2aria/include/ros2aria/raiibot.hpp @@ -0,0 +1,36 @@ +#include +#include +#include + +#include "Aria/Aria.h" +#include "rclcpp/rclcpp.hpp" + + +class RAIIBot { + public: + typedef std::shared_ptr SharedPtr; + + RAIIBot(rclcpp::Node *node, std::string port); + ~RAIIBot(); + ArRobot *getRobot(); + ArGripper *getGripper(); + rclcpp::Clock::SharedPtr getClock(); + void lock(); + void unlock(); + void pokeWatchdog(); + + private: + ArRobot *robot = nullptr; + ArRobotConnector *robotConn = nullptr; + ArArgumentBuilder *args = nullptr; + ArArgumentParser *argparser = nullptr; + ArGripper *gripper = nullptr; + rclcpp::Node *node = nullptr; + rclcpp::TimerBase::SharedPtr watchdogTimer; + rclcpp::Time lastWatchdogPoke; + rclcpp::Clock::SharedPtr clock; + + rclcpp::Logger get_logger(); + void startWatchdog(); + void watchdog_cb(); +}; \ No newline at end of file diff --git a/src/ros2aria/src/ros2aria.hpp b/src/ros2aria/include/ros2aria/ros2aria.hpp similarity index 96% rename from src/ros2aria/src/ros2aria.hpp rename to src/ros2aria/include/ros2aria/ros2aria.hpp index 69b0927..04d45e1 100644 --- a/src/ros2aria/src/ros2aria.hpp +++ b/src/ros2aria/include/ros2aria/ros2aria.hpp @@ -1,18 +1,18 @@ -#include "rclcpp/rclcpp.hpp" -#include "Aria/Aria.h" +#include -#include "sensor_msgs/msg/point_cloud.hpp" -#include "sensor_msgs/msg/point_cloud2.hpp" -#include "sensor_msgs/msg/joint_state.hpp" +#include "ros2aria/raiibot.hpp" +#include #include "geometry_msgs/msg/twist.hpp" #include "nav_msgs/msg/odometry.hpp" -#include "std_srvs/srv/empty.hpp" -#include "std_msgs/msg/bool.hpp" -#include "std_msgs/msg/int8.hpp" -#include "std_msgs/msg/float32.hpp" - +#include "rclcpp/rclcpp.hpp" #include "ros2aria_msgs/msg/robot_info_msg.hpp" -#include "./raiibot.cpp" +#include "sensor_msgs/msg/joint_state.hpp" +#include "sensor_msgs/msg/point_cloud.hpp" +#include "sensor_msgs/msg/point_cloud2.hpp" +#include "std_msgs/msg/bool.hpp" +#include "std_msgs/msg/float32.hpp" +#include "std_msgs/msg/int8.hpp" +#include "std_srvs/srv/empty.hpp" #define UNUSED(x) (void)(x) diff --git a/src/ros2aria/package.xml b/src/ros2aria/package.xml index 8828e9f..d51747b 100644 --- a/src/ros2aria/package.xml +++ b/src/ros2aria/package.xml @@ -15,6 +15,7 @@ rclcpp std_srvs geometry_msgs + tf2_geometry_msgs sensor_msgs nav_msgs ros2aria_msgs diff --git a/src/ros2aria/src/clutch.cpp b/src/ros2aria/src/clutch.cpp index 5736226..63c90fd 100644 --- a/src/ros2aria/src/clutch.cpp +++ b/src/ros2aria/src/clutch.cpp @@ -1,7 +1,6 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" -void Ros2Aria::clutch_callback(const std_msgs::msg::Bool::SharedPtr msg) -{ +void Ros2Aria::clutch_callback(const std_msgs::msg::Bool::SharedPtr msg) { std::lock_guard lock(*robot.get()); auto r = robot->getRobot(); diff --git a/src/ros2aria/src/cmd_vel.cpp b/src/ros2aria/src/cmd_vel.cpp index 0f829e5..7b6acfb 100644 --- a/src/ros2aria/src/cmd_vel.cpp +++ b/src/ros2aria/src/cmd_vel.cpp @@ -1,7 +1,6 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" -void Ros2Aria::cmd_vel_callback(const geometry_msgs::msg::Twist::SharedPtr msg) -{ +void Ros2Aria::cmd_vel_callback(const geometry_msgs::msg::Twist::SharedPtr msg) { float x, y, z; x = msg->linear.x; y = msg->linear.y; diff --git a/src/ros2aria/src/gripper.cpp b/src/ros2aria/src/gripper.cpp index 3a37561..b63dcad 100644 --- a/src/ros2aria/src/gripper.cpp +++ b/src/ros2aria/src/gripper.cpp @@ -1,31 +1,30 @@ -#include "./ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" -void Ros2Aria::gripper_open_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const -{ +void Ros2Aria::gripper_open_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const { UNUSED(request); UNUSED(response); std::lock_guard lock(*robot.get()); auto g = robot->getGripper(); g->gripOpen(); } -void Ros2Aria::gripper_close_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const -{ + +void Ros2Aria::gripper_close_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const { UNUSED(request); UNUSED(response); std::lock_guard lock(*robot.get()); auto g = robot->getGripper(); g->gripClose(); } -void Ros2Aria::gripper_up_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const -{ + +void Ros2Aria::gripper_up_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const { UNUSED(request); UNUSED(response); std::lock_guard lock(*robot.get()); auto g = robot->getGripper(); g->liftUp(); } -void Ros2Aria::gripper_down_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const -{ + +void Ros2Aria::gripper_down_callback(const std_srvs::srv::Empty::Request::SharedPtr request, std_srvs::srv::Empty::Response::SharedPtr response) const { UNUSED(request); UNUSED(response); std::lock_guard lock(*robot.get()); diff --git a/src/ros2aria/src/main.cpp b/src/ros2aria/src/main.cpp index 1947004..32848d3 100644 --- a/src/ros2aria/src/main.cpp +++ b/src/ros2aria/src/main.cpp @@ -1,7 +1,7 @@ #include #include -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" int main(int argc, char **argv) { diff --git a/src/ros2aria/src/pose.cpp b/src/ros2aria/src/pose.cpp index edc2767..fba29a9 100644 --- a/src/ros2aria/src/pose.cpp +++ b/src/ros2aria/src/pose.cpp @@ -1,44 +1,32 @@ -#include "ros2aria.hpp" -#include "tf2/utils.h" -#include "tf2/transform_datatypes.h" +#include "ros2aria/ros2aria.hpp" -inline void convert_transform_to_pose(const tf2::Transform &trans, geometry_msgs::msg::Pose &pose) -{ - geometry_msgs::msg::Transform msg = tf2::toMsg(trans); - pose.orientation = msg.rotation; - pose.position.x = msg.translation.x; - pose.position.y = msg.translation.y; - pose.position.z = msg.translation.z; -} - -nav_msgs::msg::Odometry Ros2Aria::handlePose(rclcpp::Time stamp) -{ - nav_msgs::msg::Odometry pose; +nav_msgs::msg::Odometry Ros2Aria::handlePose(rclcpp::Time stamp) { + nav_msgs::msg::Odometry odom_msg; auto r = robot->getRobot(); ArPose p = r->getPose(); tf2::Quaternion rotation; + auto position = tf2::Vector3(p.getX() / 1000, p.getY() / 1000, 0); rotation.setRPY(0, 0, p.getTh() * M_PI / 180); - tf2::Vector3 position = tf2::Vector3(p.getX() / 1000, p.getY() / 1000, 0); + odom_msg.pose.pose.orientation = tf2::toMsg(rotation); + odom_msg.pose.pose.position.x = position.getX(); + odom_msg.pose.pose.position.y = position.getY(); + odom_msg.pose.pose.position.z = position.getZ(); - convert_transform_to_pose(tf2::Transform(rotation, position), - pose.pose.pose); + odom_msg.twist.twist.linear.x = r->getVel() / 1000; + odom_msg.twist.twist.linear.y = r->getLatVel() / 1000; + odom_msg.twist.twist.angular.z = r->getRotVel() * M_PI / 180; - pose.twist.twist.linear.x = r->getVel() / 1000; - pose.twist.twist.linear.y = r->getLatVel() / 1000; - pose.twist.twist.angular.z = r->getRotVel() * M_PI / 180; + odom_msg.header.frame_id = "header.frame_id"; // TODO: use correct frame_id + odom_msg.child_frame_id = "child_frame_id"; // TODO: use correct child_frame_id + odom_msg.header.stamp = stamp; - pose.header.frame_id = "header.frame_id"; // TODO: use correct frame_id - pose.child_frame_id = "child_frame_id"; // TODO: use correct child_frame_id - pose.header.stamp = stamp; - - return pose; + return odom_msg; } -void Ros2Aria::publishPose(nav_msgs::msg::Odometry pose) -{ +void Ros2Aria::publishPose(nav_msgs::msg::Odometry pose) { if (this->pose_pub_->get_subscription_count() == 0) return; diff --git a/src/ros2aria/src/publish.cpp b/src/ros2aria/src/publish.cpp index 80f5d19..ef2715a 100644 --- a/src/ros2aria/src/publish.cpp +++ b/src/ros2aria/src/publish.cpp @@ -1,4 +1,4 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" void Ros2Aria::publish() { diff --git a/src/ros2aria/src/raiibot.cpp b/src/ros2aria/src/raiibot.cpp index e5daf0f..3a62693 100644 --- a/src/ros2aria/src/raiibot.cpp +++ b/src/ros2aria/src/raiibot.cpp @@ -1,143 +1,108 @@ -#include -#include -#include +#include "ros2aria/raiibot.hpp" -#include "Aria/Aria.h" -#include "rclcpp/rclcpp.hpp" -using namespace std::chrono_literals; +RAIIBot::RAIIBot(rclcpp::Node *node, std::string port) { + this->robot = new ArRobot(); + this->gripper = new ArGripper(this->robot); + this->node = node; + this->clock = rclcpp::Clock::make_shared(); -class RAIIBot -{ -public: - typedef std::shared_ptr SharedPtr; - - RAIIBot(rclcpp::Node *node, std::string port) - { - this->robot = new ArRobot(); - this->gripper = new ArGripper(this->robot); - this->node = node; - this->clock = rclcpp::Clock::make_shared(); - - args = new ArArgumentBuilder(); - this->argparser = new ArArgumentParser(args); - argparser->loadDefaultArguments(); // adds any arguments given in /etc/Aria.args. Useful on robots with unusual serial port or baud rate (e.g. pioneer lx) - args->add("-robotPort /dev/ttyS0"); // pass robot's serial port to Aria // TODO: use `port` variable. - // args->add("-robotLogPacketsReceived"); // log received packets - // args->add("-robotLogPacketsSent"); // log sent packets - // args->add("-robotLogVelocitiesReceived"); // log received velocities - // args->add("-robotLogMovementSent"); - // args->add("-robotLogMovementReceived"); - this->robotConn = new ArRobotConnector(argparser, robot); - if (!this->robotConn->connectRobot()) - { - - // RCLCPP_INFO(this->get_logger(), "RosAria: ARIA could not connect to robot! (Check ~port parameter is correct, and permissions on port device, or any errors reported above)"); - // rclcpp::shutdown(); - } - - this->robot->runAsync(true); - this->robot->enableMotors(); - - this->startWatchdog(); + args = new ArArgumentBuilder(); + this->argparser = new ArArgumentParser(args); + argparser->loadDefaultArguments(); // adds any arguments given in /etc/Aria.args. Useful on robots with unusual serial port or baud rate (e.g. pioneer lx) + std::string port_arg = "-robotPort " + port; + args->add(port_arg.c_str()); // pass robot's serial port to Aria // TODO: use `port` variable. + // args->add("-robotLogPacketsReceived"); // log received packets + // args->add("-robotLogPacketsSent"); // log sent packets + // args->add("-robotLogVelocitiesReceived"); // log received velocities + // args->add("-robotLogMovementSent"); + // args->add("-robotLogMovementReceived"); + this->robotConn = new ArRobotConnector(argparser, robot); + if (!this->robotConn->connectRobot()) { + // RCLCPP_INFO(this->get_logger(), "RosAria: ARIA could not connect to robot! (Check ~port parameter is correct, and permissions on port device, or any errors reported above)"); + // rclcpp::shutdown(); } - ~RAIIBot() - { - std::cout << std::endl - << "RAIIBOT DESTRUCTOR RUNNING!" << std::endl; + this->robot->runAsync(true); + this->robot->enableMotors(); - if (this->robot != nullptr) - { - this->robot->lock(); - std::cout << "disabling motors" << std::endl; - this->robot->disableMotors(); - std::cout << "disabled motors" << std::endl; - Aria::shutdown(); - } - if (this->robotConn != nullptr) - { - std::cout << "disconnecting" << std::endl; - this->robotConn->disconnectAll(); - std::cout << "disconnected" << std::endl; - } + this->startWatchdog(); +} - if (this->args != nullptr) - delete this->args; - if (this->argparser != nullptr) - delete this->argparser; - if (this->robotConn != nullptr) - delete this->robotConn; - if (this->robot != nullptr) - delete this->robot; +RAIIBot ::~RAIIBot() { + std::cout << std::endl + << "RAIIBOT DESTRUCTOR RUNNING!" << std::endl; + + if (this->robot != nullptr) { + this->robot->lock(); + std::cout << "disabling motors" << std::endl; + this->robot->disableMotors(); + std::cout << "disabled motors" << std::endl; + Aria::shutdown(); + } + if (this->robotConn != nullptr) { + std::cout << "disconnecting" << std::endl; + this->robotConn->disconnectAll(); + std::cout << "disconnected" << std::endl; } - ArRobot *getRobot() - { - return this->robot; - } + if (this->args != nullptr) + delete this->args; + if (this->argparser != nullptr) + delete this->argparser; + if (this->robotConn != nullptr) + delete this->robotConn; + if (this->robot != nullptr) + delete this->robot; +} - ArGripper *getGripper() - { - return this->gripper; - } +ArRobot *RAIIBot::getRobot() { + return this->robot; +} - rclcpp::Clock::SharedPtr getClock() - { - return this->clock; - } +ArGripper *RAIIBot::getGripper() { + return this->gripper; +} - void lock() - { - if (this->robot != nullptr) - this->robot->lock(); - } +rclcpp::Clock::SharedPtr RAIIBot::getClock() { + return this->clock; +} - void unlock() - { - if (this->robot != nullptr) - this->robot->unlock(); - } +void RAIIBot::lock() { + if (this->robot != nullptr) + this->robot->lock(); +} - void pokeWatchdog() - { - // this should probably be made thread safe, or something? - this->lastWatchdogPoke = this->clock->now(); - } +void RAIIBot::unlock() { + if (this->robot != nullptr) + this->robot->unlock(); +} -private: - ArRobot *robot = nullptr; - ArRobotConnector *robotConn = nullptr; - ArArgumentBuilder *args = nullptr; - ArArgumentParser *argparser = nullptr; - ArGripper *gripper = nullptr; - rclcpp::Node *node = nullptr; - rclcpp::TimerBase::SharedPtr watchdogTimer; - rclcpp::Time lastWatchdogPoke; - rclcpp::Clock::SharedPtr clock; +void RAIIBot::pokeWatchdog() { + // this should probably be made thread safe, or something? + this->lastWatchdogPoke = this->clock->now(); +} - rclcpp::Logger get_logger() - { - return this->node->get_logger(); - } +rclcpp::Logger RAIIBot::get_logger() { + return this->node->get_logger(); +} - void startWatchdog() - { - this->lastWatchdogPoke = clock->now(); - watchdogTimer = this->node->create_wall_timer(0.1s, std::bind(&RAIIBot::watchdog_cb, this)); - } +void RAIIBot::startWatchdog() { + using namespace std::chrono_literals; + this->lastWatchdogPoke = clock->now(); + watchdogTimer = this->node->create_wall_timer(0.1s, std::bind(&RAIIBot::watchdog_cb, this)); +} - void watchdog_cb() - { - auto now = this->clock->now(); - if (now - this->lastWatchdogPoke > 1s) - { - std::lock_guard lock(*this); - auto r = this->getRobot(); - r->setVel(0); - r->setRotVel(0); - if (r->hasLatVel()) - r->setLatVel(0); - } +void RAIIBot::watchdog_cb() { + using namespace std::chrono_literals; + + auto now = this->clock->now(); + if (now - this->lastWatchdogPoke > 1s) { + std::lock_guard lock(*this); + auto r = this->getRobot(); + r->setVel(0); + r->setRotVel(0); + if (r->hasLatVel()) + r->setLatVel(0); } -}; \ No newline at end of file +} diff --git a/src/ros2aria/src/ros2aria.cpp b/src/ros2aria/src/ros2aria.cpp index 26f10b4..27702d4 100644 --- a/src/ros2aria/src/ros2aria.cpp +++ b/src/ros2aria/src/ros2aria.cpp @@ -1,4 +1,4 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" using std::placeholders::_1; using std::placeholders::_2; @@ -7,7 +7,7 @@ Ros2Aria::Ros2Aria() : Node("ros2aria"), sensorCb(this, &Ros2Aria::publish) { - this->robot = std::make_shared(this, "/dev/ttyS0"); // TODO: use args for port + this->robot = std::make_shared(this, "/dev/ttyS0"); RCLCPP_INFO(this->get_logger(), "starting subscribers and services"); cmd_vel_sub_ = this->create_subscription( diff --git a/src/ros2aria/src/sonar.cpp b/src/ros2aria/src/sonar.cpp index de5f5d4..3be0065 100644 --- a/src/ros2aria/src/sonar.cpp +++ b/src/ros2aria/src/sonar.cpp @@ -1,5 +1,4 @@ -#include "ros2aria.hpp" - +#include "ros2aria/ros2aria.hpp" #include "sensor_msgs/point_cloud_conversion.hpp" sensor_msgs::msg::PointCloud Ros2Aria::handleSonar(rclcpp::Time stamp) diff --git a/src/ros2aria/src/state.cpp b/src/ros2aria/src/state.cpp index 24448a6..9f28f3a 100644 --- a/src/ros2aria/src/state.cpp +++ b/src/ros2aria/src/state.cpp @@ -1,4 +1,4 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" void Ros2Aria::publishState(rclcpp::Time stamp) { diff --git a/src/ros2aria/src/wheels.cpp b/src/ros2aria/src/wheels.cpp index 5292786..a1a827f 100644 --- a/src/ros2aria/src/wheels.cpp +++ b/src/ros2aria/src/wheels.cpp @@ -1,4 +1,4 @@ -#include "ros2aria.hpp" +#include "ros2aria/ros2aria.hpp" sensor_msgs::msg::JointState Ros2Aria::handleWheels(rclcpp::Time stamp) {