From bd14a09dcb09b6084d0df998cdf306b357cde8ef Mon Sep 17 00:00:00 2001 From: nonbinary-duck <46252182+nonbinary-duck@users.noreply.github.com> Date: Tue, 30 Jan 2024 22:34:46 +0000 Subject: [PATCH] Minor changes promoting clarity --- README.md | 6 ++++-- main.cpp | 4 ++++ src/simple_controller.hpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 198fa02..b3310c4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This is the beginning of an application of tactile SLAM. -To use & compile, a Linux machine is likely required. This toolchain works: PopOS (an Ubuntu/Debian Distro), GCC & CMake with ROS2 iron installed. +To use & compile, a Linux machine is likely required. This toolchain works: PopOS (an Ubuntu/Debian Distro), GCC & CMake with ROS2 iron installed and a working ROS2-compatible CoppeliaSim. -This project is a work in progress and this state of the project is not exactly targeted for compatibility. However, compilation can be done in the standard CMake way (i.e. `mkdir bin && cd bin && cmake .. && make && ./ros2_whisker_slam`) or through a "Makefile" (i.e.`make && ./build/release/ros2_whisker_slam`, must be in project root!) which essentially executes the CMake commands. A VSCode configuration is also provided where the standard build and launch options should work (provided the system has the prerequisite ROS2-iron and typical GNU & cmake dev packages and runs Linux). The build and launch configurations use the Makefile script in the project root. +This project is a work in progress and the current state of the project is perhaps incompatible with a generic system, particularly as a working ROS2-compatible [CoppeliaSim](https://www.coppeliarobotics.com/) is required to run the Coppelia demo scene. The simple-controller node provided by this early prototype is simple enough to work on other ROS2 simulators or even a real robot (perhaps with constants changed...), however it is designed for the provided Coppelia scene (`bubble.ttt`), and Coppelia requires a bit of setup to work with ROS2, see [ROS2 Interface plugin for CoppeliaSim](https://github.com/CoppeliaRobotics/simROS2) and the [official documentation](https://manual.coppeliarobotics.com/en/ros2Tutorial.htm) where much of the provided scene originates from. + +However, compilation might be done in the standard CMake way (i.e. `mkdir bin && cd bin && cmake .. && make && ./ros2_whisker_slam`) or through a "Makefile" (i.e.`make && ./build/release/ros2_whisker_slam`, must be in project root before running `make` this way here) which essentially executes the before CMake command. A VSCode configuration is also provided where the standard build and launch options should work (provided the system has the prerequisite ROS2-iron and typical GNU & cmake dev packages and runs Linux). The build and launch configurations use the Makefile script in the project root. diff --git a/main.cpp b/main.cpp index e9ea847..d35fcfe 100644 --- a/main.cpp +++ b/main.cpp @@ -22,6 +22,10 @@ int main(int argc, char *argv[]) // init spin and shutdown statements taken from: https://docs.ros.org/en/iron/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html rclcpp::init(argc, argv); + + // Print to regular stdout that the application might be running + endl( cout << "Simple controller is likely working now" ); + // rclcpp::spin( std::make_shared() ); // Give ROS2 our node rclcpp::spin( std::make_shared() ); diff --git a/src/simple_controller.hpp b/src/simple_controller.hpp index fa87e0f..ac7f4d8 100644 --- a/src/simple_controller.hpp +++ b/src/simple_controller.hpp @@ -30,7 +30,7 @@ namespace ros2_whisker_slam public: // Do all of the setup for our node in a nice and untidy inline constructor, // entirely defeating the organisational power provided by objects - inline SimpleController() : Node("simple_bubble_sensor_subscriber") + inline SimpleController() : Node("simple_controller") { // Setup the listener for the simulation time this->simTimeSubscription = this->create_subscription< std_msgs::msg::Float32 >(