-
Notifications
You must be signed in to change notification settings - Fork 3
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
Yuwenhao #43
base: main
Are you sure you want to change the base?
Conversation
src/client/src/talker_client.cpp
Outdated
#include "ros/ros.h" | ||
#include "client/message.h" | ||
#include "server/service.h" | ||
#include <string> |
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.
[cpplint] reported by reviewdog 🐶
Found C++ system header after other header. Should be: talker_client.h, c system, c++ system, other. [build/include_order] [4]
src/client/src/talker_client.cpp
Outdated
#include "client/message.h" | ||
#include "server/service.h" | ||
#include <string> | ||
#include <signal.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.
[cpplint] reported by reviewdog 🐶
Found C system header after other header. Should be: talker_client.h, c system, c++ system, other. [build/include_order] [4]
src/client/src/talker_client.cpp
Outdated
|
||
|
||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
src/server/src/listener_server.cpp
Outdated
#include "ros/ros.h" | ||
#include "server/service.h" | ||
#include "client/message.h" | ||
#include <string> |
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.
[cpplint] reported by reviewdog 🐶
Found C++ system header after other header. Should be: listener_server.h, c system, c++ system, other. [build/include_order] [4]
src/server/src/listener_server.cpp
Outdated
ros::spin(); | ||
|
||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
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.
删除了多余的文件
src/client/src/talker_client.cpp
Outdated
@@ -0,0 +1,42 @@ | |||
#include <string> | |||
#include <signal.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.
[cpplint] reported by reviewdog 🐶
Found C system header after C++ system header. Should be: talker_client.h, c system, c++ system, other. [build/include_order] [4]
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.
- 不应该使用信号来处理退出事件,应该借助ros::ok()来实现,上次开会重点提过的
- 没有实现多个客户端的功能,server在设计上只能连接一个client
- 目录结构错误,第一层目录应该以你的名字命名而不是src
src/client/src/talker_client.cpp
Outdated
} | ||
ROS_INFO("shutting down!"); | ||
ros::NodeHandle nh; | ||
ros::ServiceClient client_shut = nh.serviceClient<server::service>("service"); |
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.
[cpplint] reported by reviewdog 🐶
Lines should be <= 80 characters long [whitespace/line_length] [2]
client.call(srv2); | ||
ros::shutdown(); | ||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
ros::ServiceServer service = n.advertiseService("service", SeekTopic); | ||
ros::spin(); | ||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
srv2.request.status = 0; | ||
client.call(srv2); | ||
ros::shutdown(); | ||
|
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.
[cpplint] reported by reviewdog 🐶
Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
ros::shutdown(); | ||
|
||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
ros::ServiceServer service = n.advertiseService("service", SeekTopic); | ||
ros::spin(); | ||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
srv1.request.name = name; | ||
srv1.request.status = 1; | ||
client_set.call(srv1); | ||
ros::Publisher chatter_pub = n.advertise<client::message>(name, 1000); |
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.
其实队列长度随便给个1都能用,这个没啥用的其实
基本功能完成