diff --git a/src/project_file.cpp b/src/project_file.cpp new file mode 100644 index 0000000..378d213 --- /dev/null +++ b/src/project_file.cpp @@ -0,0 +1,29 @@ +/* +Date: 22nd of November 2022 + +Authors: Adrien Lasserre (adrien.lasserre@ecam.fr) and Gwenn Durpoix-Espinasson (g.durpoix-espinasson@ecam.fr) + +Context: This cpp file is part of the second lab of the Advanced_Robotics course at ECAM. This course is taught by Guillaume Gibert (guillaume.gibert@ecam.fr). + The main goal of this file is to create a ROS node publishing on the /cmd_vel topic of a Turtlebot3 educational robot. + +*/ + + +#include + +int main(int argc, char** argv) +{ + ros::init(argc, argv, "commander"); + ros::NodeHandle nh; + ros::Publisher commanderPublisher = + nh.advertise("cmd_vel", 1); + ros::Rate loopRate(10); + + while(ros::ok()){ + commanderPublisher.publish(); + ros::spinOnce(); + loopRate.sleep(); + } + + return 0; +} \ No newline at end of file