Skip to content

Commit

Permalink
Rename everything
Browse files Browse the repository at this point in the history
  • Loading branch information
h3ndrk committed Dec 3, 2023
1 parent 24e56b7 commit 6a75e40
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 611 deletions.
23 changes: 6 additions & 17 deletions bitbots_template_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
cmake_minimum_required(VERSION 3.5)
project(bitbots_template_cpp)
project(bibola)

# Add support for C++17
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif ()

find_package(ament_cmake REQUIRED)
find_package(bitbots_docs REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(rclcpp REQUIRED)

generate_parameter_library(
bitbots_template_cpp_parameters
config/bitbots_template_cpp_parameters.yaml
)

include_directories(include)

add_compile_options(-Wall -Werror -Wno-unused)

add_executable(template src/template.cpp)
add_executable(bibola src/bibola.cpp)

target_link_libraries(
template
bibola
rclcpp::rclcpp
bitbots_template_cpp_parameters
bibola_parameters
)

## Specify libraries to link a library or executable target against
ament_target_dependencies(
template
bibola
ament_cmake
bitbots_docs
generate_parameter_library
rclcpp
)

enable_bitbots_docs()

install(TARGETS template
install(TARGETS bibola
DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY launch
Expand Down

This file was deleted.

Binary file removed bitbots_template_cpp/docs/_static/logo.png
Binary file not shown.
187 changes: 0 additions & 187 deletions bitbots_template_cpp/docs/conf.py

This file was deleted.

21 changes: 0 additions & 21 deletions bitbots_template_cpp/docs/index.rst

This file was deleted.

12 changes: 12 additions & 0 deletions bitbots_template_cpp/include/bibola/bibola.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>
#include <rclcpp/rclcpp.hpp>

namespace bibola {

class BiBoLa : public rclcpp::Node {
public:
BiBoLa();
void log_foo_param();
};

} // namespace bibola
19 changes: 0 additions & 19 deletions bitbots_template_cpp/include/bitbots_template_cpp/template.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion bitbots_template_cpp/launch/template.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch>
<arg name="sim" default="false"/>

<node name="bitbots_template_cpp_node" pkg="bitbots_template_cpp" exec="template">
<node name="bibola_node" pkg="bibola" exec="bibola">
<param name="use_sim_time" value="$(var sim)"/>
</node>

Expand Down
10 changes: 2 additions & 8 deletions bitbots_template_cpp/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>bitbots_template_cpp</name>
<description>Template cpp node</description>
<name>bibola</name>
<description>BiBoLa</description>
<version>0.0.0</version>
<license>MIT</license>

Expand All @@ -11,8 +11,6 @@

<buildtool_depend>ament_cmake</buildtool_depend>
<depend>backward_ros</depend>
<depend>bitbots_docs</depend>
<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>


Expand All @@ -21,10 +19,6 @@
<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<bitbots_documentation>
<status>unknown</status>
<language>c++</language>
</bitbots_documentation>
<build_type>ament_cmake</build_type>
</export>
</package>
26 changes: 26 additions & 0 deletions bitbots_template_cpp/src/bibola.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <bibola/bibola.hpp>

namespace bibola {

BiBoLa::BiBoLa() : Node("bibola_node") {
RCLCPP_INFO(this->get_logger(), "Starting bibola_node...");
}

void BiBoLa::log_foo_param() {
RCLCPP_INFO(this->get_logger(), "Hello World!!11elf");
}
} // namespace bibola

int main(int argc, char **argv) {
rclcpp::init(argc, argv);
auto node = std::make_shared<bibola::BiBoLa>();

rclcpp::Duration timer_duration = rclcpp::Duration::from_seconds(1.0);
rclcpp::TimerBase::SharedPtr timer =
rclcpp::create_timer(node, node->get_clock(), timer_duration, [node]() -> void { node->log_foo_param(); });
rclcpp::experimental::executors::EventsExecutor exec;
exec.add_node(node);

exec.spin();
rclcpp::shutdown();
}
Loading

0 comments on commit 6a75e40

Please sign in to comment.