ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Compile Error for the ros.pde sketch

asked 2011-11-16 05:03:17 -0500

Aroarus gravatar image

updated 2014-01-28 17:10:48 -0500

ngrennan gravatar image

I am trying to put the ros.pde sketch onto the ArbotiX board that I am using for the turtlebot arm, and I get the following compile errors when I try to upload or verify the sketch:

ros.cpp:46:47: error: no matching function for call to ‘BioloidController::BioloidController()’
/home/marc/sketchbook/libraries/Bioloid/BioloidController.h:48:5: note: candidates are: BioloidController::BioloidController(long int)
/home/marc/sketchbook/libraries/Bioloid/BioloidController.h:45:1: note:                 BioloidController::BioloidController(const BioloidController&)
ros.cpp: In function ‘void loop()’:
ros.cpp:352:32: error: ‘class BioloidController’ has no member named ‘setup’
ros.cpp:386:40: error: ‘class BioloidController’ has no member named ‘setup’
ros.cpp:388:42: error: ‘class BioloidController’ has no member named ‘setId’
ros.cpp:404:77: error: ‘class BioloidController’ has no member named ‘getId’

I have the updated version of the BioloidController library and the newest version of the ros.pde sketch, although I will copy them here for completeness's sake:

ros.pde:

    /* 
  ArbotiX Firmware for ROS driver
  Copyright (c) 2008-2011 Vanadium Labs LLC.  All right reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:
      * Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
      * Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
      * Neither the name of Vanadium Labs LLC nor the names of its 
        contributors may be used to endorse or promote products derived 
        from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL VANADIUM LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ 

/* Build Configuration */
#define USE_BASE            // Enable support for a mobile base
#define USE_BIG_MOTORS      // Enable Pololu 30A support
#define USE_HW_SERVOS       // Enable only 2/8 servos, but using hardware control

#define CONTROLLER_COUNT    5
/* Hardware Constructs */
#include <ax12.h>
#include <BioloidController.h>
BioloidController controllers[CONTROLLER_COUNT];

#include "ros.h"

#ifdef USE_HW_SERVOS
  #include <HServo.h>
  HServo servos[2];
  int servo_vals[2];            // in millis
#else 
  #include <Servo.h>
  Servo servos[10];
  int servo_vals[10];           // in millis
#endif

#ifdef USE_BASE
  #ifdef USE_BIG_MOTORS
    #include <BigMotors.h>
    BigMotors drive = BigMotors();
  #else
    #include <Motors2.h>
    Motors2 drive = Motors2();
  #endif
  #include <EncodersAB.h>
  #include "diff_controller.h"
#endif

/* Register Storage */
unsigned char baud = 7;         // ?
unsigned char ret_level = 1;    // ?
unsigned char alarm_led = 0;    // ?

/* Pose & Sequence ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2011-11-16 05:13:36 -0500

fergs gravatar image

The ros.pde sketch currently requires the BioloidController library from trunk, it looks like yours is from one of our downloads.

edit flag offensive delete link more

Comments

So what does that mean? How do I fix it? Where do I get the right library from? This was the one I was linked to from the turtlebot arm tutorial.
Aroarus gravatar image Aroarus  ( 2011-11-16 05:15:45 -0500 )edit
Are you talking about the updated libraries for the Arbotix2? Because I only have the original ArbotiX
Aroarus gravatar image Aroarus  ( 2011-11-16 05:31:41 -0500 )edit
I was saying you need to do an svn checkout of trunk. However, I just posted a set of libraries specifically for ROS users: http://code.google.com/p/arbotix/downloads/detail?name=libraries-ros.zip&can=2&q= Docs are being updated now.
fergs gravatar image fergs  ( 2011-11-16 06:07:50 -0500 )edit
Thank you so much for your quick response! That fixed one error, but caused another, which I had seen earlier. Do you have any idea what might be causing it? Its at the end of the post.
Aroarus gravatar image Aroarus  ( 2011-11-16 06:56:04 -0500 )edit
What version of Arduino are you using?
fergs gravatar image fergs  ( 2011-11-16 08:56:15 -0500 )edit
0022ubuntu0.1
Aroarus gravatar image Aroarus  ( 2011-11-18 01:30:40 -0500 )edit
I just tried upgrading to 0023, but that did not fix the problem. It appears to be an error in some of the files in my /usr/lib/avr/include/ files, according to the error. In addition do you know why it is choosing to write the path in such a weird way? With the .. inside the path?
Aroarus gravatar image Aroarus  ( 2011-11-18 01:45:24 -0500 )edit
So, I have a much older version of avr libc (4.3.4) and am unable to reproduce this error -- however, it appears to be a fixable one: http://code.google.com/p/arduino-tiny/issues/detail?id=29
fergs gravatar image fergs  ( 2011-11-18 04:33:19 -0500 )edit

Question Tools

Stats

Asked: 2011-11-16 05:03:17 -0500

Seen: 1,105 times

Last updated: Nov 16 '11