Skip to content
Snippets Groups Projects
Commit 3eb83f31 authored by Angel's avatar Angel
Browse files

small bug

parent 6ddd4289
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,6 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : ...@@ -59,7 +59,6 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
PPSClientCommandPublisher = nh_PPSClient.advertise<std_msgs::Int32>("Command", 1); PPSClientCommandPublisher = nh_PPSClient.advertise<std_msgs::Int32>("Command", 1);
// First get student ID // First get student ID
if(!nh_PPSClient.getParam("studentID", m_student_id)) if(!nh_PPSClient.getParam("studentID", m_student_id))
{ {
......
...@@ -219,10 +219,12 @@ int main(int argc, char* argv[]) { ...@@ -219,10 +219,12 @@ int main(int argc, char* argv[]) {
loadParameters(nodeHandle); loadParameters(nodeHandle);
int student_id; int student_id;
ros::NodeHandle namespace_nodeHandle(ros::this_node::getNamespace()); std::string namespace = ros::this_node::getNamespace();
ros::NodeHandle PPSClient_nodeHandle(namespace + "/PPSClient");
if(!namespace_nodeHandle.getParam("studentID", student_id)) if(!namespace_nodeHandle.getParam("studentID", student_id))
{ {
ROS_ERROR("Failed to get studentID"); ROS_ERROR("Failed to get studentID from FollowN_1Service");
} }
followPublisher = nodeHandle.advertise<Setpoint>("/" + std::to_string(student_id) + "/FollowN_1Service/FollowTopic", 1); followPublisher = nodeHandle.advertise<Setpoint>("/" + std::to_string(student_id) + "/FollowN_1Service/FollowTopic", 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment