Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Did you directly copy/paste the text from the PDF to your source file?

If so, that is most likely the cause of your problem: the PDF uses markup and character codes that are not valid C++. You can either download the examples in a workable format from the AGITR website, or copy them by really typing everything manually.


Which is exactly what the tutorial says but my terminal keeps returning the error

bash: syntax error near unexpected token `('

Just for completeness: the book teaches you how to work with ROS by taking you through a set of exercises that get you to write C++ programs. I may be wrong, but your last comment seems to suggest you are trying to enter C++ statements directly into the terminal (bash). That won't work, you will have to create a set of source files with a text editor and compile them.

As section 1.2 explains, A Gentle Introduction to ROS is not an introduction to programming, so you may want to follow some introductory C++ tutorials online, or pick-up a book about it before trying to continue with AGITR.