arduino-cli errors

asked 2023-04-11 13:03:30 -0500

Hi, i'm new with ros. For testing I am compiling this arduino source. https://github.com/clark-ajf/MotorTes.... I would like to use arduino-cli When I compile with the command arduino-cli compile --fqbn arduino:avr:mega --libraries ros_lib --libraries PID MotorTesting I get the following errors:

In file included from /home/ubuntu/Arduino/libraries/ros_lib/ros.h:43:0,
                 from /home/ubuntu/src/sketch/ros4wd/ros4wd.ino:2:
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:67:33: error: expected ')' before '*' token
     ArduinoHardware(SERIAL_CLASS* io , long baud= 57600){
                                 ^
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:56:24: error: 'Serial_' has not been declared
   #define SERIAL_CLASS Serial_
                        ^
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:88:18: note: in expansion of macro 'SERIAL_CLASS'
     void setPort(SERIAL_CLASS* io){
                  ^~~~~~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:56:24: error: 'Serial_' does not name a type; did you mean 'Serial3'?
   #define SERIAL_CLASS Serial_
                        ^
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:114:5: note: in expansion of macro 'SERIAL_CLASS'
     SERIAL_CLASS* iostream;
     ^~~~~~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In constructor 'ArduinoHardware::ArduinoHardware()':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:79:7: error: 'iostream' was not declared in this scope
       iostream = &Serial;
       ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:79:7: note: suggested alternative: 'Stream'
       iostream = &Serial;
       ^~~~~~~~
       Stream
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In copy constructor 'ArduinoHardware::ArduinoHardware(ArduinoHardware&)':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:84:13: error: 'class ArduinoHardware' has no member named 'iostream'
       this->iostream = h.iostream;
             ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:84:26: error: 'class ArduinoHardware' has no member named 'iostream'
       this->iostream = h.iostream;
                          ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In member function 'void ArduinoHardware::setPort(int*)':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:89:13: error: 'class ArduinoHardware' has no member named 'iostream'
       this->iostream = io;
             ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In member function 'void ArduinoHardware::init()':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:103:7: error: 'iostream' was not declared in this scope
       iostream->begin(baud_);
       ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:103:7: note: suggested alternative: 'Stream'
       iostream->begin(baud_);
       ^~~~~~~~
       Stream
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In member function 'int ArduinoHardware::read()':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:106:23: error: 'iostream' was not declared in this scope
     int read(){return iostream->read();};
                       ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:106:23: note: suggested alternative: 'Stream'
     int read(){return iostream->read();};
                       ^~~~~~~~
                       Stream
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h: In member function 'void ArduinoHardware::write(uint8_t*, int)':
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:108:7: error: 'iostream' was not declared in this scope
       iostream->write(data, length);
       ^~~~~~~~
/home/ubuntu/Arduino/libraries/ros_lib/ArduinoHardware.h:108:7: note: suggested alternative: 'Stream'
       iostream->write(data, length);
       ^~~~~~~~
       Stream

What can I do?

edit retag flag offensive close merge delete