View Full Version : Help installing RFlex drivers

05-23-2012, 07:36 PM

This is my first time trying to install drivers for a robot with ROS.

I'm trying to install and run RFlex drivers but am having errors.

I have copied the directory from the svn and added its location to $ROS_PACKAGE_PATH

[email protected]:~/ros/stacks/rflex# pwd

[email protected]:~/ros/stacks/rflex# echo $ROS_PACKAGE_PATH
[email protected]:~/ros/stacks/rflex# echo $PATH
[email protected]:~/ros/stacks/rflex# echo $ROS_ROOT

When I try to do 'rosmake rflex' I get this error:

[email protected]:~/ros/stacks# rosmake rflex
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['rflex']
[ rosmake ] Logging to directory /root/.ros/rosmake/rosmake_output-20120523-192618
[ rosmake ] Expanded args ['rflex'] to:
[rosmake-0] Starting >>> roslang [ make ]
[rosmake-0] Finished <<< roslang ROS_NOBUILD in package roslang
No Makefile in package roslang
[rosmake-0] Starting >>> roscpp [ make ]
[rosmake-0] Finished <<< roscpp ROS_NOBUILD in package roscpp
No Makefile in package roscpp
[rosmake-0] Starting >>> std_msgs [ make ]
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs
No Makefile in package std_msgs
[rosmake-0] Starting >>> geometry_msgs [ make ]
[rosmake-0] Finished <<< geometry_msgs ROS_NOBUILD in package geometry_msgs
No Makefile in package geometry_msgs
[rosmake-0] Starting >>> sensor_msgs [ make ]
[rosmake-0] Finished <<< sensor_msgs ROS_NOBUILD in package sensor_msgs [ 1 Active 4/15 Complete ]
No Makefile in package sensor_msgs
[rosmake-0] Starting >>> nav_msgs [ make ]
[rosmake-0] Finished <<< nav_msgs ROS_NOBUILD in package nav_msgs
No Makefile in package nav_msgs
[rosmake-0] Starting >>> bullet [ make ]
[rosmake-0] Finished <<< bullet ROS_NOBUILD in package bullet
[rosmake-0] Starting >>> rosconsole [ make ]
[rosmake-0] Finished <<< rosconsole ROS_NOBUILD in package rosconsole
No Makefile in package rosconsole
[rosmake-0] Starting >>> angles [ make ]
[rosmake-0] Finished <<< angles ROS_NOBUILD in package angles
[rosmake-0] Starting >>> rospy [ make ]
[rosmake-0] Finished <<< rospy ROS_NOBUILD in package rospy
No Makefile in package rospy
[rosmake-0] Starting >>> rostest [ make ]
[rosmake-0] Finished <<< rostest ROS_NOBUILD in package rostest
No Makefile in package rostest
[rosmake-0] Starting >>> roswtf [ make ]
[rosmake-0] Finished <<< roswtf ROS_NOBUILD in package roswtf
No Makefile in package roswtf
[rosmake-0] Starting >>> message_filters [ make ]
[rosmake-0] Finished <<< message_filters ROS_NOBUILD in package message_filters
No Makefile in package message_filters
[rosmake-0] Starting >>> tf [ make ]
[rosmake-0] Finished <<< tf ROS_NOBUILD in package tf
[rosmake-0] Starting >>> rflex [ make ]
[ rosmake ] Last 40 lineslex: 16.3 sec ] [ 1 Active 14/15 Complete ]
[rosbuild] Building package rflex
[rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
[rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:


-- Build files have been written to: /root/ros/stacks/rflex/build
cd build && make -l1
make[1]: Entering directory `/root/ros/stacks/rflex/build'
make[2]: Entering directory `/root/ros/stacks/rflex/build'
make[3]: Entering directory `/root/ros/stacks/rflex/build'
make[3]: Leaving directory `/root/ros/stacks/rflex/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/root/ros/stacks/rflex/build'
make[3]: Leaving directory `/root/ros/stacks/rflex/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/root/ros/stacks/rflex/build'
make[3]: Leaving directory `/root/ros/stacks/rflex/build'
make[3]: Entering directory `/root/ros/stacks/rflex/build'
[ 33%] Building CXX object CMakeFiles/b21.dir/src/b21_driver.o
/root/ros/stacks/rflex/src/b21_driver.cc: In member function ‘void B21::getSonarPoints(int, sensor_msgs::PointCloud*) const’:
/root/ros/stacks/rflex/src/b21_driver.cc:156:12: error: ‘sensor_msgs::PointCloud’ has no member named ‘set_points_size’
/root/ros/stacks/rflex/src/b21_driver.cc: In member function ‘int B21::getBumps(int, sensor_msgs::PointCloud*) const’:
/root/ros/stacks/rflex/src/b21_driver.cc:187:12: error: ‘sensor_msgs::PointCloud’ has no member named ‘set_points_size’
/root/ros/stacks/rflex/src/b21_driver.cc: In member function ‘virtual void B21::processDioEvent(unsigned char, short unsigned int)’:
/root/ros/stacks/rflex/src/b21_driver.cc:212:77: error: ‘printf’ was not declared in this scope
/root/ros/stacks/rflex/src/b21_driver.cc:222:96: error: ‘printf’ was not declared in this scope
make[3]: *** [CMakeFiles/b21.dir/src/b21_driver.o] Error 1
make[3]: Leaving directory `/root/ros/stacks/rflex/build'
make[2]: *** [CMakeFiles/b21.dir/all] Error 2
make[2]: Leaving directory `/root/ros/stacks/rflex/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ros/stacks/rflex/build'
[ rosmake ] Output from build of package rflex written to:
[ rosmake ] /root/.ros/rosmake/rosmake_output-20120523-192618/rflex/build_output.log
[rosmake-0] Finished <<< rflex [FAIL] [ 16.40 seconds ]
[ rosmake ] Halting due to failure in package rflex.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 15 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /root/.ros/rosmake/rosmake_output-20120523-192618

Any idea what I am doing wrong?
Also how do I run the driver once its ready?

Thank you,

05-23-2012, 08:31 PM
There appear to be a couple errors in the source code you downloaded. I've spent the last three days being slapped with error messages like these trying to get a base controller package working (finally succeeded today).

Lines 156 and 187 are both trying to access something that does not actually exist as part of a "sensor_msgs::PointCloud" message. Not sure what exactly they are attempting to modify since I have not gotten around to point clouds yet (still cleaning up a base controller package).

Lines 212 and 222 are both trying to use printf(), but the coder did not add "#define <cstdio>" anywhere in the source or header.

05-24-2012, 05:16 AM
You are using Fuerte with what appears to be code that has not been ported forward for quite a while. The set_X_size has been deprecated for some time and was removed in Fuerte. See section 2.9 of http://ros.org/wiki/fuerte/Migration for info on how to fix it (but also beware, other issues may exist).