-
Notifications
You must be signed in to change notification settings - Fork 52
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
base: master
Are you sure you want to change the base?
Conversation
<!-- 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> --> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 😄
done. |
this is the completed assignment 1 task from basher666(Swastik Haldar)