Identidicar error c++ for robotics

#include "rosbot_control/rosbot_class.h"
#include <ros/ros.h>

#include <iostream>
#include <iostream>

#include <list>

#include <map>

#include <string>

using namespace std;

list move_and_inform(RosbotClass rosbot, int n_secs) {
    rosbot.move_forward(n_secs);
    float x = rosbot.get_position(1);
    float y = rosbot.get_position(2);
    list list_coordinates({x, y});

    return list_coordinates;
}

int main(int argc, char **argv) {
  ros::init(argc, argv, "rosbot_node");
  Rosbotclass rosbot;
  int n_secs;
  cout << "Enter the number of seconds that you want the robot to move: "
       << endl;
  cin << int n_secs;
  list<float> list_coordinates = move_and_inform(rosbot, n_secs);
  for (float number : list_coordinates) {
    cout << number << ", ";
  }

  return 0;
}

NO SE CUAL ES EL ERROR,PERO NO ME LANZA EL RESULTADO ESPERADO,ALGUIEN PODRIA AYUDARME POR FAVOR

Hi @LCMHI

Could you please tell us in which Unit you are in the course, what is the expected result, and what you are getting as a result instead?

If you give us more information, it is easier to help.

  1. Is it that it is not compiling?
  2. Is it that the robot doesn’t move at all?
  3. Is it that the robot moves in a different way?

Please help us help you.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.