-
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
delete some message #51
base: main
Are you sure you want to change the base?
Conversation
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_INFO("name: [%s]", msg->data.c_str()); | ||
//} | ||
|
||
bool show(helifeng::SentName::Request &req, |
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回调函数需以Callback或CB结尾
bool show(helifeng::SentName::Request &req, | ||
helifeng::SentName::Response &res) { | ||
std::string topicName = req.topicName; | ||
res.situation = 1; |
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.
service可以没有返回值
} | ||
|
||
int main(int argc, char **argv) { | ||
ros::init(argc, argv, "sent_name_server"); |
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.
命名初始化无法实现要求中的开启多个client的功能
还有pr请以自己的名字命名 |
|
||
#include "ros/ros.h" | ||
#include "helifeng/SentName.h" | ||
#include <cstdlib> |
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: sent_name_client.h, c system, c++ system, other. [build/include_order] [4]
} | ||
|
||
ros::NodeHandle nh; | ||
ros::ServiceClient client = nh.serviceClient<helifeng::SentName>("sent_name"); |
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]
No description provided.