Skip to content
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

auv task basher666 #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kawaiibilli
Copy link

this is the completed assignment 1 task from basher666(Swastik Haldar)

<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clean up this file so that only the required lines are visible. Tag explanation is not required. 🙂

#include "ros/ros.h"
#include "std_msgs/Int64.h"
#include <sstream>
#include <bits/stdc++.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need not import everything. Very few functions are required for this node, and it makes sense to import only those header files which are actually required.

@@ -0,0 +1,30 @@
#include "ros/ros.h"
#include "std_msgs/Int64.h"
#include <bits/stdc++.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the above comment.

@@ -0,0 +1,34 @@
#include "ros/ros.h"
#include "std_msgs/Int64.h"
#include <bits/stdc++.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

ros::Rate loop_rate(1);
sq_pub=n2.advertise<std_msgs::Int64>("topic_squares",1000); //selecting topic_squares as the topic to publish
ros::Subscriber square=n.subscribe("topic_numbers",1000,numberscallback); //selecting topic_numbers as the topic to subscribe
ROS_INFO("hahahaha \n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove debug print statements from the submission 😄

@kawaiibilli
Copy link
Author

done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants