generated from wessel/boilerplate
feat(grade_calculator): Add project base
This commit is contained in:
@@ -8,14 +8,27 @@ endif()
|
||||
# find dependencies
|
||||
find_package(ament_cmake REQUIRED)
|
||||
find_package(rclcpp REQUIRED)
|
||||
find_package(g2_2025_interfaces REQUIRED)
|
||||
|
||||
add_executable(grade_generator src/main.cpp)
|
||||
add_executable(exam_result_generator src/exam_result_generator/main.cpp)
|
||||
add_executable(final_grade_determinator src/final_grade_determinator/main.cpp)
|
||||
add_executable(grade_calculator src/grade_calculator/main.cpp)
|
||||
add_executable(retake_grade_determinator src/retake_grade_determinator/main.cpp)
|
||||
add_executable(retake_scheduler src/retake_scheduler/main.cpp)
|
||||
|
||||
ament_target_dependencies(grade_generator rclcpp)
|
||||
ament_target_dependencies(exam_result_generator rclcpp g2_2025_interfaces)
|
||||
ament_target_dependencies(final_grade_determinator rclcpp g2_2025_interfaces)
|
||||
ament_target_dependencies(grade_calculator rclcpp g2_2025_interfaces)
|
||||
ament_target_dependencies(retake_grade_determinator rclcpp g2_2025_interfaces)
|
||||
ament_target_dependencies(retake_scheduler rclcpp g2_2025_interfaces)
|
||||
|
||||
install (
|
||||
TARGETS
|
||||
grade_generator
|
||||
exam_result_generator
|
||||
final_grade_determinator
|
||||
grade_calculator
|
||||
retake_grade_determinator
|
||||
retake_scheduler
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<depend>rclcpp</depend>
|
||||
<depend>g2_2025_interfaces</depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* node_template.cpp
|
||||
* Action server node template for ROS2
|
||||
*
|
||||
* Node description:
|
||||
* Template action server that demonstrates action server implementation
|
||||
* with goal handling, feedback publishing, and cancellation support
|
||||
*
|
||||
* Reviewed by: <x>
|
||||
* Changelog:
|
||||
* [04-09-2025] Wessel T: Implement template
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::zero::tmp {
|
||||
|
||||
class NodeTemplate : public rclcpp::Node {
|
||||
public:
|
||||
NodeTemplate()
|
||||
: Node("node_template")
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} // namespace lessons::zero::template
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
rclcpp::init(argc,argv);
|
||||
|
||||
auto node = std::make_shared<lessons::zero::tmp::NodeTemplate>();
|
||||
|
||||
rclcpp::spin(node);
|
||||
rclcpp::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/* node_template.cpp
|
||||
* Action server node template for ROS2
|
||||
*
|
||||
* Node description:
|
||||
* Template action server that demonstrates action server implementation
|
||||
* with goal handling, feedback publishing, and cancellation support
|
||||
*
|
||||
* Reviewed by: <x>
|
||||
* Changelog:
|
||||
* [04-09-2025] Wessel T: Implement template
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::zero::tmp {
|
||||
|
||||
class NodeTemplate : public rclcpp::Node {
|
||||
public:
|
||||
NodeTemplate()
|
||||
: Node("node_template")
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} // namespace lessons::zero::template
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
rclcpp::init(argc,argv);
|
||||
|
||||
auto node = std::make_shared<lessons::zero::tmp::NodeTemplate>();
|
||||
|
||||
rclcpp::spin(node);
|
||||
rclcpp::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/* node_template.cpp
|
||||
* Action server node template for ROS2
|
||||
*
|
||||
* Node description:
|
||||
* Template action server that demonstrates action server implementation
|
||||
* with goal handling, feedback publishing, and cancellation support
|
||||
*
|
||||
* Reviewed by: <x>
|
||||
* Changelog:
|
||||
* [04-09-2025] Wessel T: Implement template
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::zero::tmp {
|
||||
|
||||
class NodeTemplate : public rclcpp::Node {
|
||||
public:
|
||||
NodeTemplate()
|
||||
: Node("node_template")
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} // namespace lessons::zero::template
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
rclcpp::init(argc,argv);
|
||||
|
||||
auto node = std::make_shared<lessons::zero::tmp::NodeTemplate>();
|
||||
|
||||
rclcpp::spin(node);
|
||||
rclcpp::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/* node_template.cpp
|
||||
* Action server node template for ROS2
|
||||
*
|
||||
* Node description:
|
||||
* Template action server that demonstrates action server implementation
|
||||
* with goal handling, feedback publishing, and cancellation support
|
||||
*
|
||||
* Reviewed by: <x>
|
||||
* Changelog:
|
||||
* [04-09-2025] Wessel T: Implement template
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace lessons::zero::tmp {
|
||||
|
||||
class NodeTemplate : public rclcpp::Node {
|
||||
public:
|
||||
NodeTemplate()
|
||||
: Node("node_template")
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} // namespace lessons::zero::template
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
rclcpp::init(argc,argv);
|
||||
|
||||
auto node = std::make_shared<lessons::zero::tmp::NodeTemplate>();
|
||||
|
||||
rclcpp::spin(node);
|
||||
rclcpp::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
21
src/g2_2025_interfaces/CMakeLists.txt
Normal file
21
src/g2_2025_interfaces/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(g2_2025_interfaces)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
# find dependencies
|
||||
find_package(ament_cmake REQUIRED)
|
||||
find_package(rosidl_default_generators REQUIRED)
|
||||
|
||||
rosidl_generate_interfaces(${PROJECT_NAME}
|
||||
"msg/Student.msg"
|
||||
"msg/Exam.msg"
|
||||
"srv/Exam.srv"
|
||||
"action/Retake.action"
|
||||
)
|
||||
|
||||
ament_export_dependencies(rosidl_default_runtime)
|
||||
|
||||
ament_package()
|
||||
5
src/g2_2025_interfaces/action/Retake.action
Normal file
5
src/g2_2025_interfaces/action/Retake.action
Normal file
@@ -0,0 +1,5 @@
|
||||
string student_name
|
||||
string lecture_name
|
||||
---
|
||||
---
|
||||
float32 result
|
||||
2
src/g2_2025_interfaces/msg/Exam.msg
Normal file
2
src/g2_2025_interfaces/msg/Exam.msg
Normal file
@@ -0,0 +1,2 @@
|
||||
string lecture_name
|
||||
float32 result
|
||||
2
src/g2_2025_interfaces/msg/Student.msg
Normal file
2
src/g2_2025_interfaces/msg/Student.msg
Normal file
@@ -0,0 +1,2 @@
|
||||
string student_name
|
||||
string lecture_name
|
||||
22
src/g2_2025_interfaces/package.xml
Normal file
22
src/g2_2025_interfaces/package.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||
<package format="3">
|
||||
<name>g2_2025_interfaces</name>
|
||||
<version>0.0.0</version>
|
||||
<description>TODO: Package description</description>
|
||||
<maintainer email="wessel@todo.todo">wessel</maintainer>
|
||||
<license>TODO: License declaration</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<build_depend>rosidl_default_generators</build_depend>
|
||||
<exec_depend>rosidl_default_runtime</exec_depend>
|
||||
<member_of_group>rosidl_interface_packages</member_of_group>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
</package>
|
||||
5
src/g2_2025_interfaces/srv/Exam.srv
Normal file
5
src/g2_2025_interfaces/srv/Exam.srv
Normal file
@@ -0,0 +1,5 @@
|
||||
# Request
|
||||
string student_name
|
||||
string lecture_name
|
||||
---
|
||||
float32 result
|
||||
Reference in New Issue
Block a user