-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ros2 #38
base: master
Are you sure you want to change the base?
Ros2 #38
Conversation
CMakeLists.txt
Outdated
add_rostest_gtest(tests_io test/io.test test/test_io.cpp) | ||
target_link_libraries(tests_io emc_system ${catkin_LIBRARIES}) | ||
endif() | ||
#if(BUILD_TESTING) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come on @PetervDooren, you can migrate tests as well. You have the skills
@@ -1,11 +1,14 @@ | |||
#ifndef EMC_SYSTEM_RATE_H_ | |||
#define EMC_SYSTEM_RATE_H_ | |||
|
|||
namespace ros | |||
#include "rclcpp/rclcpp.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should include this in the source file. That is why the pre-declaration was there.
@@ -1,4 +1,4 @@ | |||
<?xml version="1.0"?> | |||
<?xml version="2.0"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no XML version 2...
@@ -11,19 +11,25 @@ | |||
|
|||
<license>TODO</license> | |||
|
|||
<buildtool_depend>catkin</buildtool_depend> | |||
<buildtool_depend>rosidl_default_generators</buildtool_depend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only needed when generating message, etc.
Though you should have a buildtool dep on ament_cmake
<depend>tf2</depend> | ||
<depend>tf2_ros</depend> | ||
|
||
<exec_depend>rosidl_default_runtime</exec_depend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not needed as we are not generating messages etc.
|
||
namespace emc | ||
emc::Rate::Rate(double freq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the separate emc
namespace it cleaner IMO.
@@ -2,7 +2,8 @@ | |||
|
|||
#include "opencv2/imgproc.hpp" | |||
#include <opencv2/highgui.hpp> | |||
#include <ros/rate.h> | |||
|
|||
#include "rclcpp/rclcpp.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaner to only include the header you need.
@@ -15,7 +15,7 @@ class Ros2Subscriber : public rclcpp::Node | |||
|
|||
public: | |||
|
|||
Ros2Subscriber(std::string topic_name) : rclcpp::Node(topic_name) | |||
Ros2Subscriber(std::string topic_name, std::string node_name) : rclcpp::Node(node_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ros2Subscriber(std::string topic_name, std::string node_name) : rclcpp::Node(node_name) | |
Ros2Subscriber(const std::string& topic_name, const std::string& node_name) : rclcpp::Node(node_name) |
…ill regarding the visualization of the particle filter exercise)
…ironment variable before launching executablees dependant on shaared library
TODO:
low priority