Commit 3eb83f31 authored by roangel's avatar roangel
Browse files

small bug

parent 6ddd4289
......@@ -59,7 +59,6 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
PPSClientCommandPublisher = nh_PPSClient.advertise<std_msgs::Int32>("Command", 1);
// First get student ID
if(!nh_PPSClient.getParam("studentID", m_student_id))
{
......
......@@ -219,10 +219,12 @@ int main(int argc, char* argv[]) {
loadParameters(nodeHandle);
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))
{
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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment