[ros-users] AVR and ROS
Homer Manalo
homer.manalo at roboteknik.com
Thu Feb 10 02:45:25 UTC 2011
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 <adasta at gmail.com> 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 <homer.manalo at roboteknik.com>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 <homer.manalo at roboteknik.com
>> > 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 <
>>> homer.manalo at roboteknik.com> 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 <
>>>> homer.manalo at roboteknik.com> 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 <
>>>>> homer.manalo at roboteknik.com> 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 <adasta at gmail.com>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 <
>>>>>>> joseph.st.amand at mines.sdsmt.edu> 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
>>>>>>>> ros-users at code.ros.org
>>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ros-users mailing list
>>>>>>> ros-users at code.ros.org
>>>>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110210/285f12d5/attachment-0003.html>
More information about the ros-users
mailing list