Quantcast

AVR and ROS

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AVR and ROS

Adam Stambler
Hello Folks,

     I am proud to announce a new tool for using Arduinos and AVR processors in ROS projects.  avr_bridge allows the AVR processors to directly publish or subscribe to ROS topics. This allows everything from Arduinos to custom robot boards to be first class ROS components.  This package can be found in Rutgers' new rutgers-ros-pkg.

    avr_bridge is meant to simplify the use of an Arduino and avr processors in a ROS based robot by providing a partial ROS implementation in avr c++. In hobbyist robotics, these microcontrollers are often used to read sensors and perform low level motor control. Every time a robot needs to interface with an AVR board, a new communication system is written. Typically they all use a usb-to-serial converter and either a custom binary or text based protocol. AVR bridge replaces these custom protocols with an automatically generated ROS communication stack that allows the AVR processors to directly publish or subscribe to ROS topics.

    avr_bridge has already been deployed on Rutger's PIPER robot  and in the communications layer for a Sparkfun imu driver. In the next few weeks, it will be deployed on our newest robot, the Rutgers IGVC entry as the communication layer on all of our custom, low level hardware.   By using avr_bridge to communicate with our PCs, we have cut down on redundant code and simplified the driver by allowing the avr_processor to directly publish msgs.   It is our hope that by extending ROS to the 8-bit microcontroller level we will see more open-source hardware that can be quickly integrated into cheap, custom robot platforms. 

Cheers,
Adam Stambler
Rutgers University

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Bence Magyar
Hi Adam,

I'm happy that you announced this package because we were planning to do the very same thing here at ELTE (Hungary) during the next semester. I nearly have any time with 7 exams still ahead of me but I may contact you after looking through this package.

I'm really interested in using Arduino-compatible devices with ROS. The first thing is that it's quite cheap and - though I'm not really an electronics-guy - easy to self-design, self-build. 

Keep up the good work!

Regards,
Bence Magyar
ELTE Information Science

2011/1/5 Adam Stambler <[hidden email]>
Hello Folks,

     I am proud to announce a new tool for using Arduinos and AVR processors in ROS projects.  avr_bridge allows the AVR processors to directly publish or subscribe to ROS topics. This allows everything from Arduinos to custom robot boards to be first class ROS components.  This package can be found in Rutgers' new rutgers-ros-pkg.

    avr_bridge is meant to simplify the use of an Arduino and avr processors in a ROS based robot by providing a partial ROS implementation in avr c++. In hobbyist robotics, these microcontrollers are often used to read sensors and perform low level motor control. Every time a robot needs to interface with an AVR board, a new communication system is written. Typically they all use a usb-to-serial converter and either a custom binary or text based protocol. AVR bridge replaces these custom protocols with an automatically generated ROS communication stack that allows the AVR processors to directly publish or subscribe to ROS topics.

    avr_bridge has already been deployed on Rutger's PIPER robot  and in the communications layer for a Sparkfun imu driver. In the next few weeks, it will be deployed on our newest robot, the Rutgers IGVC entry as the communication layer on all of our custom, low level hardware.   By using avr_bridge to communicate with our PCs, we have cut down on redundant code and simplified the driver by allowing the avr_processor to directly publish msgs.   It is our hope that by extending ROS to the 8-bit microcontroller level we will see more open-source hardware that can be quickly integrated into cheap, custom robot platforms. 

Cheers,
Adam Stambler
Rutgers University

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Eric Perko
In reply to this post by Adam Stambler
Adam,

This looks really cool and I'll definitely be playing around with it sometime.

One thing to note while I was looking through the code is that I didn't see any licenses anywhere in the avr_bridge source. I'd suggest you add some license notices to the source files, otherwise nobody can actually fork and improve upon it.

- Eric

On Wed, Jan 5, 2011 at 2:07 PM, Adam Stambler <[hidden email]> wrote:
Hello Folks,

     I am proud to announce a new tool for using Arduinos and AVR processors in ROS projects.  avr_bridge allows the AVR processors to directly publish or subscribe to ROS topics. This allows everything from Arduinos to custom robot boards to be first class ROS components.  This package can be found in Rutgers' new rutgers-ros-pkg.

    avr_bridge is meant to simplify the use of an Arduino and avr processors in a ROS based robot by providing a partial ROS implementation in avr c++. In hobbyist robotics, these microcontrollers are often used to read sensors and perform low level motor control. Every time a robot needs to interface with an AVR board, a new communication system is written. Typically they all use a usb-to-serial converter and either a custom binary or text based protocol. AVR bridge replaces these custom protocols with an automatically generated ROS communication stack that allows the AVR processors to directly publish or subscribe to ROS topics.

    avr_bridge has already been deployed on Rutger's PIPER robot  and in the communications layer for a Sparkfun imu driver. In the next few weeks, it will be deployed on our newest robot, the Rutgers IGVC entry as the communication layer on all of our custom, low level hardware.   By using avr_bridge to communicate with our PCs, we have cut down on redundant code and simplified the driver by allowing the avr_processor to directly publish msgs.   It is our hope that by extending ROS to the 8-bit microcontroller level we will see more open-source hardware that can be quickly integrated into cheap, custom robot platforms. 

Cheers,
Adam Stambler
Rutgers University

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Adam Stambler
Hi Eric,

Thanks for the suggestion.  I just finished adding the BSD license notices to the top of the source files. 

If you have any trouble as you are using it, let me know.

Regards,
Adam




On Wed, Jan 5, 2011 at 4:30 PM, Eric Perko <[hidden email]> wrote:
Adam,

This looks really cool and I'll definitely be playing around with it sometime.

One thing to note while I was looking through the code is that I didn't see any licenses anywhere in the avr_bridge source. I'd suggest you add some license notices to the source files, otherwise nobody can actually fork and improve upon it.

- Eric

On Wed, Jan 5, 2011 at 2:07 PM, Adam Stambler <[hidden email]> wrote:
Hello Folks,

     I am proud to announce a new tool for using Arduinos and AVR processors in ROS projects.  avr_bridge allows the AVR processors to directly publish or subscribe to ROS topics. This allows everything from Arduinos to custom robot boards to be first class ROS components.  This package can be found in Rutgers' new rutgers-ros-pkg.

    avr_bridge is meant to simplify the use of an Arduino and avr processors in a ROS based robot by providing a partial ROS implementation in avr c++. In hobbyist robotics, these microcontrollers are often used to read sensors and perform low level motor control. Every time a robot needs to interface with an AVR board, a new communication system is written. Typically they all use a usb-to-serial converter and either a custom binary or text based protocol. AVR bridge replaces these custom protocols with an automatically generated ROS communication stack that allows the AVR processors to directly publish or subscribe to ROS topics.

    avr_bridge has already been deployed on Rutger's PIPER robot  and in the communications layer for a Sparkfun imu driver. In the next few weeks, it will be deployed on our newest robot, the Rutgers IGVC entry as the communication layer on all of our custom, low level hardware.   By using avr_bridge to communicate with our PCs, we have cut down on redundant code and simplified the driver by allowing the avr_processor to directly publish msgs.   It is our hope that by extending ROS to the 8-bit microcontroller level we will see more open-source hardware that can be quickly integrated into cheap, custom robot platforms. 

Cheers,
Adam Stambler
Rutgers University

_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

airthimble
I have been trying to use this package in order to communicate with a Seeduino. I tried following the avr-bridge tutorial but had trouble with it. I typically put together a make file for a project and just use a text editor. I have no trouble using eclipse, I just cannot figure out how to configure it. There does not seem to be a well-made tutorial for configuring eclipse with AVR in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be much appreciated!

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Adam Stambler
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam

On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

airthimble
Thanks for that link, I was able to successfully complete the avr_bridge tutorial!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
In reply to this post by Adam Stambler
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.


On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"
  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type



On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users




_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
I found the culprit with the error: ‘string’ in namespace ‘ROS’ does not name a type.
The ros_string.h has the ff. lines:
  #ifndef STRING_H_
  #define STRING_H_
Should be:
  #ifndef ROS_STRING_H_
  #define ROS_STRING_H_
The filename on the top of the comment is string.h as well. It also solved the error: ‘class std_msgs::String’ has no member named ‘data’. It seems that this is also the reason for the previous error I got regarding std_msgs::String. I don't have to reorder the #include files anymore.

I,ve got a couple more errors this time:
  char Ros::getTopicTag(char *topic) {
    ../avrRos/ros_generated.cpp:6: error: prototype for ‘char Ros::getTopicTag(char*)’ does not match any in class ‘Ros’

  char getTopicTag(char const *topic);
  ../avrRos/Ros.h:132: error: candidate is: char Ros::getTopicTag(const char*)

I replaced the autogenerated ros_generated.cpp with this:

  /* This file was autogenerated as a part of the avr_bridge pkg
   * avr_bridge was written by Adam Stambler and Phillip Quiza of
   * Rutgers University.
   */
  #include "Ros.h"
  #include "string.h"  //added manually for strcmp
  char Ros::getTopicTag(char const *topic) {  //manually added const to resolve above errors
      if (!strcmp(topic, "call"))
          return 0;
      if (!strcmp(topic, "response"))
          return 1;
      return 0;  //manually added semicolon(;)
  }
  Ros ros("callResponse", 2);

I'm not sure if this is the right solution but the errors are gone now, except one. It's a make error, here is the console output:

**** Build of configuration Release for project avr_bridgeHelloWorld ****

make all
Building target: avr_bridgeHelloWorld.elf
Invoking: AVR C++ Linker
avr-gcc --cref -s -Os -o"avr_bridgeHelloWorld.elf"  ./avrRos_user.o ./main.o  ./avrRos/Ros.o ./avrRos/String.o ./avrRos/cc_support.o ./avrRos/ros_generated.o ./avrRos/ros_string.o   -lArduinoProMini5VCore -lm -Wl,-Map,avr_bridgeHelloWorld.map,--cref -L/home/roboteknik/eclipse/ArduinoCores -mmcu=atmega328p
./main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x2c): undefined reference to `std_msgs::String::~String()'
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x34): undefined reference to `std_msgs::String::~String()'
make: *** [avr_bridgeHelloWorld.elf] Error 1

I'm not sure how to solve this error.


On Wed, Feb 9, 2011 at 2:51 PM, Homer Manalo <[hidden email]> wrote:
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type




On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users





_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
OK, I just compiled it successfully now.
Added these lines to String.cpp:
    String::~String()
    {}

Program:   14632 bytes (44.7% Full)
I didn't know this would go almost half-full just for a hello world.

-Homer

On Wed, Feb 9, 2011 at 7:09 PM, Homer Manalo <[hidden email]> wrote:
I found the culprit with the error: ‘string’ in namespace ‘ROS’ does not name a type.
The ros_string.h has the ff. lines:
  #ifndef STRING_H_
  #define STRING_H_
Should be:
  #ifndef ROS_STRING_H_
  #define ROS_STRING_H_
The filename on the top of the comment is string.h as well. It also solved the error: ‘class std_msgs::String’ has no member named ‘data’. It seems that this is also the reason for the previous error I got regarding std_msgs::String. I don't have to reorder the #include files anymore.

I,ve got a couple more errors this time:
  char Ros::getTopicTag(char *topic) {
    ../avrRos/ros_generated.cpp:6: error: prototype for ‘char Ros::getTopicTag(char*)’ does not match any in class ‘Ros’

  char getTopicTag(char const *topic);
  ../avrRos/Ros.h:132: error: candidate is: char Ros::getTopicTag(const char*)

I replaced the autogenerated ros_generated.cpp with this:

  /* This file was autogenerated as a part of the avr_bridge pkg
   * avr_bridge was written by Adam Stambler and Phillip Quiza of
   * Rutgers University.
   */
  #include "Ros.h"
  #include "string.h"  //added manually for strcmp
  char Ros::getTopicTag(char const *topic) {  //manually added const to resolve above errors
      if (!strcmp(topic, "call"))
          return 0;
      if (!strcmp(topic, "response"))
          return 1;
      return 0;  //manually added semicolon(;)
  }
  Ros ros("callResponse", 2);

I'm not sure if this is the right solution but the errors are gone now, except one. It's a make error, here is the console output:

**** Build of configuration Release for project avr_bridgeHelloWorld ****

make all
Building target: avr_bridgeHelloWorld.elf
Invoking: AVR C++ Linker
avr-gcc --cref -s -Os -o"avr_bridgeHelloWorld.elf"  ./avrRos_user.o ./main.o  ./avrRos/Ros.o ./avrRos/String.o ./avrRos/cc_support.o ./avrRos/ros_generated.o ./avrRos/ros_string.o   -lArduinoProMini5VCore -lm -Wl,-Map,avr_bridgeHelloWorld.map,--cref -L/home/roboteknik/eclipse/ArduinoCores -mmcu=atmega328p
./main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x2c): undefined reference to `std_msgs::String::~String()'
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x34): undefined reference to `std_msgs::String::~String()'
make: *** [avr_bridgeHelloWorld.elf] Error 1

I'm not sure how to solve this error.



On Wed, Feb 9, 2011 at 2:51 PM, Homer Manalo <[hidden email]> wrote:
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type




On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users






_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
Running bridge_node gives me this:

 ****  avr_bridge's bridge_node.py   *****

Opening file  callResponse.yaml
Traceback (most recent call last):
  File "/home/roboteknik/ros/stacks/avr_bridge/scripts/bridge_node.py", line 23, in <module>
    bridge = avr_bridge.AvrBridgeNode()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 327, in __init__
    self.bridge = AvrBridge()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 157, in __init__
    self.header_struct = struct.Struct('<B<B<h') # packet_type topic_tag data_length
struct.error: bad char in struct format

What's the problem now here?

Thanks,
Homer

On Wed, Feb 9, 2011 at 7:34 PM, Homer Manalo <[hidden email]> wrote:
OK, I just compiled it successfully now.
Added these lines to String.cpp:
    String::~String()
    {}

Program:   14632 bytes (44.7% Full)
I didn't know this would go almost half-full just for a hello world.

-Homer


On Wed, Feb 9, 2011 at 7:09 PM, Homer Manalo <[hidden email]> wrote:
I found the culprit with the error: ‘string’ in namespace ‘ROS’ does not name a type.
The ros_string.h has the ff. lines:
  #ifndef STRING_H_
  #define STRING_H_
Should be:
  #ifndef ROS_STRING_H_
  #define ROS_STRING_H_
The filename on the top of the comment is string.h as well. It also solved the error: ‘class std_msgs::String’ has no member named ‘data’. It seems that this is also the reason for the previous error I got regarding std_msgs::String. I don't have to reorder the #include files anymore.

I,ve got a couple more errors this time:
  char Ros::getTopicTag(char *topic) {
    ../avrRos/ros_generated.cpp:6: error: prototype for ‘char Ros::getTopicTag(char*)’ does not match any in class ‘Ros’

  char getTopicTag(char const *topic);
  ../avrRos/Ros.h:132: error: candidate is: char Ros::getTopicTag(const char*)

I replaced the autogenerated ros_generated.cpp with this:

  /* This file was autogenerated as a part of the avr_bridge pkg
   * avr_bridge was written by Adam Stambler and Phillip Quiza of
   * Rutgers University.
   */
  #include "Ros.h"
  #include "string.h"  //added manually for strcmp
  char Ros::getTopicTag(char const *topic) {  //manually added const to resolve above errors
      if (!strcmp(topic, "call"))
          return 0;
      if (!strcmp(topic, "response"))
          return 1;
      return 0;  //manually added semicolon(;)
  }
  Ros ros("callResponse", 2);

I'm not sure if this is the right solution but the errors are gone now, except one. It's a make error, here is the console output:

**** Build of configuration Release for project avr_bridgeHelloWorld ****

make all
Building target: avr_bridgeHelloWorld.elf
Invoking: AVR C++ Linker
avr-gcc --cref -s -Os -o"avr_bridgeHelloWorld.elf"  ./avrRos_user.o ./main.o  ./avrRos/Ros.o ./avrRos/String.o ./avrRos/cc_support.o ./avrRos/ros_generated.o ./avrRos/ros_string.o   -lArduinoProMini5VCore -lm -Wl,-Map,avr_bridgeHelloWorld.map,--cref -L/home/roboteknik/eclipse/ArduinoCores -mmcu=atmega328p
./main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x2c): undefined reference to `std_msgs::String::~String()'
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x34): undefined reference to `std_msgs::String::~String()'
make: *** [avr_bridgeHelloWorld.elf] Error 1

I'm not sure how to solve this error.



On Wed, Feb 9, 2011 at 2:51 PM, Homer Manalo <[hidden email]> wrote:
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type




On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users







_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Adam Stambler
Hi Homer,

Sorry about the trouble.  One of our development branches got set as the default when we changed our repo to use submodules.

I am in the middle of fixing it now, but in the mean time you should just clone my personal repository.

git://github.com/adasta/rutgers-ros-pkg.git

I should have this fixed tonight.

As for the large size of the binary, yup that is correct.  The arduino libraries are pretty large and also the way I first coded the first  bridge was a bit memory sloppy.  I should be releasing a slimmed down version soon.

-Adam

On Wed, Feb 9, 2011 at 7:20 AM, Homer Manalo <[hidden email]> wrote:
Running bridge_node gives me this:

 ****  avr_bridge's bridge_node.py   *****

Opening file  callResponse.yaml
Traceback (most recent call last):
  File "/home/roboteknik/ros/stacks/avr_bridge/scripts/bridge_node.py", line 23, in <module>
    bridge = avr_bridge.AvrBridgeNode()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 327, in __init__
    self.bridge = AvrBridge()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 157, in __init__
    self.header_struct = struct.Struct('<B<B<h') # packet_type topic_tag data_length
struct.error: bad char in struct format

What's the problem now here?

Thanks,
Homer


On Wed, Feb 9, 2011 at 7:34 PM, Homer Manalo <[hidden email]> wrote:
OK, I just compiled it successfully now.
Added these lines to String.cpp:
    String::~String()
    {}

Program:   14632 bytes (44.7% Full)
I didn't know this would go almost half-full just for a hello world.

-Homer


On Wed, Feb 9, 2011 at 7:09 PM, Homer Manalo <[hidden email]> wrote:
I found the culprit with the error: ‘string’ in namespace ‘ROS’ does not name a type.
The ros_string.h has the ff. lines:
  #ifndef STRING_H_
  #define STRING_H_
Should be:
  #ifndef ROS_STRING_H_
  #define ROS_STRING_H_
The filename on the top of the comment is string.h as well. It also solved the error: ‘class std_msgs::String’ has no member named ‘data’. It seems that this is also the reason for the previous error I got regarding std_msgs::String. I don't have to reorder the #include files anymore.

I,ve got a couple more errors this time:
  char Ros::getTopicTag(char *topic) {
    ../avrRos/ros_generated.cpp:6: error: prototype for ‘char Ros::getTopicTag(char*)’ does not match any in class ‘Ros’

  char getTopicTag(char const *topic);
  ../avrRos/Ros.h:132: error: candidate is: char Ros::getTopicTag(const char*)

I replaced the autogenerated ros_generated.cpp with this:

  /* This file was autogenerated as a part of the avr_bridge pkg
   * avr_bridge was written by Adam Stambler and Phillip Quiza of
   * Rutgers University.
   */
  #include "Ros.h"
  #include "string.h"  //added manually for strcmp
  char Ros::getTopicTag(char const *topic) {  //manually added const to resolve above errors
      if (!strcmp(topic, "call"))
          return 0;
      if (!strcmp(topic, "response"))
          return 1;
      return 0;  //manually added semicolon(;)
  }
  Ros ros("callResponse", 2);

I'm not sure if this is the right solution but the errors are gone now, except one. It's a make error, here is the console output:

**** Build of configuration Release for project avr_bridgeHelloWorld ****

make all
Building target: avr_bridgeHelloWorld.elf
Invoking: AVR C++ Linker
avr-gcc --cref -s -Os -o"avr_bridgeHelloWorld.elf"  ./avrRos_user.o ./main.o  ./avrRos/Ros.o ./avrRos/String.o ./avrRos/cc_support.o ./avrRos/ros_generated.o ./avrRos/ros_string.o   -lArduinoProMini5VCore -lm -Wl,-Map,avr_bridgeHelloWorld.map,--cref -L/home/roboteknik/eclipse/ArduinoCores -mmcu=atmega328p
./main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x2c): undefined reference to `std_msgs::String::~String()'
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x34): undefined reference to `std_msgs::String::~String()'
make: *** [avr_bridgeHelloWorld.elf] Error 1

I'm not sure how to solve this error.



On Wed, Feb 9, 2011 at 2:51 PM, Homer Manalo <[hidden email]> wrote:
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type




On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users







_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

Homer Manalo
Ok thanks for that, it's working now. I would also be playing with the imu as soon as it arrives but I noticed that it doesn't(?) publish heading information just acceleration and velocity. Is there anyway for it to be published as well?

Thanks,
Homer

On Thu, Feb 10, 2011 at 2:33 AM, Adam Stambler <[hidden email]> wrote:
Hi Homer,

Sorry about the trouble.  One of our development branches got set as the default when we changed our repo to use submodules.

I am in the middle of fixing it now, but in the mean time you should just clone my personal repository.

git://github.com/adasta/rutgers-ros-pkg.git

I should have this fixed tonight.

As for the large size of the binary, yup that is correct.  The arduino libraries are pretty large and also the way I first coded the first  bridge was a bit memory sloppy.  I should be releasing a slimmed down version soon.

-Adam


On Wed, Feb 9, 2011 at 7:20 AM, Homer Manalo <[hidden email]> wrote:
Running bridge_node gives me this:

 ****  avr_bridge's bridge_node.py   *****

Opening file  callResponse.yaml
Traceback (most recent call last):
  File "/home/roboteknik/ros/stacks/avr_bridge/scripts/bridge_node.py", line 23, in <module>
    bridge = avr_bridge.AvrBridgeNode()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 327, in __init__
    self.bridge = AvrBridge()
  File "/home/roboteknik/ros/stacks/avr_bridge/src/avr_bridge.py", line 157, in __init__
    self.header_struct = struct.Struct('<B<B<h') # packet_type topic_tag data_length
struct.error: bad char in struct format

What's the problem now here?

Thanks,
Homer


On Wed, Feb 9, 2011 at 7:34 PM, Homer Manalo <[hidden email]> wrote:
OK, I just compiled it successfully now.
Added these lines to String.cpp:
    String::~String()
    {}

Program:   14632 bytes (44.7% Full)
I didn't know this would go almost half-full just for a hello world.

-Homer


On Wed, Feb 9, 2011 at 7:09 PM, Homer Manalo <[hidden email]> wrote:
I found the culprit with the error: ‘string’ in namespace ‘ROS’ does not name a type.
The ros_string.h has the ff. lines:
  #ifndef STRING_H_
  #define STRING_H_
Should be:
  #ifndef ROS_STRING_H_
  #define ROS_STRING_H_
The filename on the top of the comment is string.h as well. It also solved the error: ‘class std_msgs::String’ has no member named ‘data’. It seems that this is also the reason for the previous error I got regarding std_msgs::String. I don't have to reorder the #include files anymore.

I,ve got a couple more errors this time:
  char Ros::getTopicTag(char *topic) {
    ../avrRos/ros_generated.cpp:6: error: prototype for ‘char Ros::getTopicTag(char*)’ does not match any in class ‘Ros’

  char getTopicTag(char const *topic);
  ../avrRos/Ros.h:132: error: candidate is: char Ros::getTopicTag(const char*)

I replaced the autogenerated ros_generated.cpp with this:

  /* This file was autogenerated as a part of the avr_bridge pkg
   * avr_bridge was written by Adam Stambler and Phillip Quiza of
   * Rutgers University.
   */
  #include "Ros.h"
  #include "string.h"  //added manually for strcmp
  char Ros::getTopicTag(char const *topic) {  //manually added const to resolve above errors
      if (!strcmp(topic, "call"))
          return 0;
      if (!strcmp(topic, "response"))
          return 1;
      return 0;  //manually added semicolon(;)
  }
  Ros ros("callResponse", 2);

I'm not sure if this is the right solution but the errors are gone now, except one. It's a make error, here is the console output:

**** Build of configuration Release for project avr_bridgeHelloWorld ****

make all
Building target: avr_bridgeHelloWorld.elf
Invoking: AVR C++ Linker
avr-gcc --cref -s -Os -o"avr_bridgeHelloWorld.elf"  ./avrRos_user.o ./main.o  ./avrRos/Ros.o ./avrRos/String.o ./avrRos/cc_support.o ./avrRos/ros_generated.o ./avrRos/ros_string.o   -lArduinoProMini5VCore -lm -Wl,-Map,avr_bridgeHelloWorld.map,--cref -L/home/roboteknik/eclipse/ArduinoCores -mmcu=atmega328p
./main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x2c): undefined reference to `std_msgs::String::~String()'
main.cpp:(.text._Z41__static_initialization_and_destruction_0ii+0x34): undefined reference to `std_msgs::String::~String()'
make: *** [avr_bridgeHelloWorld.elf] Error 1

I'm not sure how to solve this error.



On Wed, Feb 9, 2011 at 2:51 PM, Homer Manalo <[hidden email]> wrote:
Ok now I have sorted out about the std_msgs error by ordering the #include lines and object declarations:

  #include <WProgram.h>
  #include <stdio.h>

  #include "avrRos/String.h"

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  #include "avrRos/Ros.h"

But I still got some errors here:

  sprintf(response_msg.data.getRawString(), "You sent : %s", call_msg.data.getRawString());
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:35: error: ‘class std_msgs::String’ has no member named ‘data’

  call_msg.data.setMaxLength(30);

  response_msg.data.setMaxLength(60);
    ../main.cpp:50: error: ‘class std_msgs::String’ has no member named ‘data’
    ../main.cpp:51: error: ‘class std_msgs::String’ has no member named ‘data’

  ROS::string data;
    ../avrRos/String.h:18: error: ‘string’ in namespace ‘ROS’ does not name a type

  ROS::string name;
    ../avrRos/Ros.h:117: error: ‘string’ in namespace ‘ROS’ does not name a type




On Tue, Feb 8, 2011 at 4:41 PM, Homer Manalo <[hidden email]> wrote:
Hello, I'm following the hello world tutorial and getting build errors particularly with these two lines:

  std_msgs::String call_msg;
  std_msgs::String response_msg;

  ../main.cpp:21: error: ‘std_msgs’ has not been declared
  ../main.cpp:21: error: expected constructor, destructor, or type conversion before ‘call_msg’
  ../main.cpp:22: error: ‘std_msgs’ has not been declared
  ../main.cpp:22: error: expected constructor, destructor, or type conversion before ‘response_msg’

Other errors are just because of the two variables not being declared.



On Mon, Jan 10, 2011 at 4:10 AM, Adam Stambler <[hidden email]> wrote:
Hi

Configuring eclipse can be a bit tricky.  This tutorial was the most straight forward explanation:

http://www.arduino.cc/playground/Code/Eclipse

If you are still having trouble, let me know and I will write up an explanation on the ROS site.

-Adam


On Sun, Jan 9, 2011 at 2:36 PM, airthimble <[hidden email]> wrote:

I have been trying to use this package in order to communicate with a
Seeduino. I tried following the avr-bridge tutorial but had trouble with it.
I typically put together a make file for a project and just use a text
editor. I have no trouble using eclipse, I just cannot figure out how to
configure it. There does not seem to be a well-made tutorial for configuring
eclipse in Ubuntu 11.04.

If anyone would be able to give me a push in the right direction it would be
much appreciated!

Thanks!
--
View this message in context: http://ros-users.122217.n3.nabble.com/AVR-and-ROS-tp2200563p2222791.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users


_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users







_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users



_______________________________________________
ros-users mailing list
[hidden email]
https://code.ros.org/mailman/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

cachinchilla3000
Hi, I am having similar compiling errors to those of Homer's when trying the Hello World Tutorial. (I am using an arduino UNO board, have settup eclipse to work with it and it works, I am using Eclipse Galileo and ROS cturtle fyi)

I created the rosrun avr_gen... code. (Just realized you have to run "roscore" on a terminal before doing the rosrun, what a noobe)

Then I imported the project to eclipse and the first error (and only one so far) is that in the "avr_ros_user.cpp" the WProgram.h cannot be found and the Serial is not declared in the scope.  So I changed the
#include "WProgram.h" to #include "Arduino/WProgram.h" and from there, hell breaks loose.

The WProgram.h has unresolved including the following libraries:
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <avr/interrupt.h>
however this is not a compile error. Compiling gives me the following errors shown in the console:


**** Build of configuration Release for project avrBridgeAVR_example ****

make all
Building file: ../avr_ros_user.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/Arduino}" -I"/home/carlitos/EclipseWorkspace/avrBridgeAVR_example" -Wall -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"avr_ros_user.d" -MT"avr_ros_user.d" -c -o"avr_ros_user.o" "../avr_ros_user.cpp"
Finished building: ../avr_ros_user.cpp
 
Building file: ../main.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/Arduino}" -I"/home/carlitos/EclipseWorkspace/avrBridgeAVR_example" -Wall -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"main.d" -MT"main.d" -c -o"main.o" "../main.cpp"
../main.cpp:23: error: variable or field ‘response’ declared void
../main.cpp:23: error: ‘Msg’ was not declared in this scope
../main.cpp:23: error: ‘msg’ was not declared in this scope
../main.cpp: In function ‘void setup()’:
../main.cpp:41: error: ‘response’ was not declared in this scope
../main.cpp: In function ‘void loop()’:
../main.cpp:53: error: no matching function for call to ‘ros::NodeHandle::spin(int&)’
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h:97: note: candidates are: void ros::NodeHandle::spin()
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h: At global scope:
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h:70: warning: ‘ros::ros_io’ defined but not used
make: *** [main.o] Error 1


I added the project's root folder to the c++ compiler library path but get the same error. and I get the same alerts that I get for the WProgram.h

I do not know where to go from there. I have tried so many things, like cloning your personal git as you told Homer, I tried Homer's steps and using a static library from Arduino but somewhere I am making the same mistake and just cannot get it to work. All I want to do is to send a signal to the Arduino UNO board (either a 1 or 0) that will toggle the way LEDs flash, so the hello world is the perfect example for me to use, if i could get it to work.


Thanks in advance
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AVR and ROS

cachinchilla3000
I changed the directories path to the Arduino Static library and the avrBridgeAVR_example project and now everything seems fine. It still wont compile because the main.cpp has the following errors:


**** Build of configuration Release for project avrBridgeAVR_example ****

make all
Building file: ../main.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"/home/carlitos/EclipseWorkspace/Arduino" -I"/home/carlitos/EclipseWorkspace/avrBridgeAVR_example" -Wall -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"main.d" -MT"main.d" -c -o"main.o" "../main.cpp"
../main.cpp:23: error: variable or field ‘response’ declared void
../main.cpp:23: error: ‘Msg’ was not declared in this scope
../main.cpp:23: error: ‘msg’ was not declared in this scope
../main.cpp: In function ‘void setup()’:
../main.cpp:41: error: ‘response’ was not declared in this scope
../main.cpp: In function ‘void loop()’:
../main.cpp:53: error: no matching function for call to ‘ros::NodeHandle::spin(int&)’
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h:97: note: candidates are: void ros::NodeHandle::spin()
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h: At global scope:
/home/carlitos/EclipseWorkspace/avrBridgeAVR_example/avr_ros/node_handle.h:70: warning: ‘ros::ros_io’ defined but not used
make: *** [main.o] Error 1
Loading...