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

Yuwenhao #43

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Yuwenhao #43

wants to merge 17 commits into from

Conversation

lazyerZZZ
Copy link
Collaborator

基本功能完成

#include "ros/ros.h"
#include "client/message.h"
#include "server/service.h"
#include <string>

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]

#include "client/message.h"
#include "server/service.h"
#include <string>
#include <signal.h>

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]



return 0;
}

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]

#include "ros/ros.h"
#include "server/service.h"
#include "client/message.h"
#include <string>

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]

ros::spin();

return 0;
}

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]

Copy link
Collaborator Author

@lazyerZZZ lazyerZZZ left a comment

Choose a reason for hiding this comment

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

删除了多余的文件

@@ -0,0 +1,42 @@
#include <string>
#include <signal.h>

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]

Copy link
Member

@bismarckkk bismarckkk left a comment

Choose a reason for hiding this comment

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

  1. 不应该使用信号来处理退出事件,应该借助ros::ok()来实现,上次开会重点提过的
  2. 没有实现多个客户端的功能,server在设计上只能连接一个client
  3. 目录结构错误,第一层目录应该以你的名字命名而不是src

}
ROS_INFO("shutting down!");
ros::NodeHandle nh;
ros::ServiceClient client_shut = nh.serviceClient<server::service>("service");

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;
}

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;
}

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();

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;
}

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;
}

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);
Copy link
Member

Choose a reason for hiding this comment

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

其实队列长度随便给个1都能用,这个没啥用的其实

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.

None yet

3 participants