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

Problem with wiimote, summit and nodes

asked 2012-10-11 00:58:16 -0500

egoitzas gravatar image

updated 2014-01-28 17:13:54 -0500

ngrennan gravatar image

Hi,

I have a Summit with ROS electric, and I have the drivers for wiimote. I created a package for using the wiimote with turtlesim (http://www.ros.org/wiki/wiimote/Tutorials/WritingTeleopNode), and everything works properly.

Now, I want to control the Summit with the wiimote. I have created a package for it, following the same steps that I followed before for turtlesim, but changing the code in order to have SummitJoy instead of TeleopTurtle, etc. But when I do the "rosmake", the node is not built properly, so nothing appears in "bin/".

My CMakeLists.txt file looks like this (I have changed the "#" comment items into "//" here, because otherwise I had problems with the letter size, sorry for that):

cmake_minimum_required(VERSION 2.4.6) include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

// Set the build type. Options are:

// Coverage : w/ debug symbols, w/o optimization, w/ code-coverage

// Debug : w/ debug symbols, w/o optimization

// Release : w/o debug symbols, w/ optimization

// RelWithDebInfo : w/ debug symbols, w/ optimization

// MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries

//set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

//set the default path for built executables to the "bin" directory

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

//set the default path for built libraries to the "lib" directory

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

//uncomment if you have defined messages

//rosbuild_genmsg()

//uncomment if you have defined services

//rosbuild_gensrv()

//common commands for building c++ executables and libraries

//rosbuild_add_library(${PROJECT_NAME} src/example.cpp)

//target_link_libraries(${PROJECT_NAME} another_library)

//rosbuild_add_boost_directories()

//rosbuild_link_boost(${PROJECT_NAME} thread)

//rosbuild_add_executable(example examples/example.cpp)

//target_link_libraries(example ${PROJECT_NAME})

rosbuild_add_executable(summit_teleop_wiimote src/summit_teleop_wiimote.cpp)

What I changed is everything that had something in common with turtlesim in the code (in the .cpp and .launch).

I actually get an error, when the "rosmake" is executing, it says that the execution goes out from "build/". It says that same thing several times. This is the error:

  root@summit-desktop:/opt/ros/electric/ros/summit_wiimote# rosmake 
[ rosmake ] No package specified.  Building ['summit_wiimote']                  
[ rosmake ] Packages requested are: ['summit_wiimote']                          
[ rosmake ] Logging to directory/home/summit/.ros/rosmake/rosmake_output-20121017-114930 
[ rosmake ] Expanded args ['summit_wiimote'] to: 
['summit_wiimote']             
[ rosmake ] Checking rosdeps compliance for packages summit_wiimote.  This may take a few seconds. 
Failed to find rosdep python-cwiid for package summit_wiimote on OS:ubuntu version:lucid 
WARNING: Rosdeps [u'python-cwiid'] could not be resolved 
Failed to find rosdep python-cwiid for package summit_wiimote on OS:ubuntu version:lucid 
[ rosmake ] rosdep check failed to find system dependencies: python-cwiid       
[rosmake-1] Starting >>> rosbuild [ make ]                                      
[rosmake-1] Finished <<< rosbuild ROS_NOBUILD in package rosbuild 
 No Makefile in package rosbuild 
[rosmake-0] Starting >>> cpp_common [ make ]                                    
[rosmake-1] Starting >>> roslang [ make ]                                       
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang 
 No Makefile in package roslang 
[rosmake-0] Finished <<< cpp_common ROS_NOBUILD in package cpp_common           
[rosmake-1] Starting >>> roslib [ make ]                                        
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits     
[rosmake-0] Starting >>> rostime [ make ]                                       
[rosmake-1] Finished <<< roslib ROS_NOBUILD in package roslib                   
[rosmake-0] Finished <<< rostime ROS_NOBUILD in package rostime                 
[rosmake-0] Starting >>> roscpp_serialization [ make ]                          
[rosmake-0] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization 
[rosmake-1] Starting >>> xmlrpcpp [ make ]                                      
[rosmake-1] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp               
[rosmake-0] Starting >>> rosconsole [ make ...
(more)
edit retag flag offensive close merge delete

Comments

1

Please provide more information. How does your CMakeLists.txt look like? Are you getting any errors? What exactly did you change? Make sure you have a look at http://ros.org/wiki/Support

Lorenz gravatar image Lorenz  ( 2012-10-11 01:40:34 -0500 )edit

Please always copy-paste the exact error message. It provides useful information for us to infer what is going on. Have a look at http://ros.org/wiki/Support

Lorenz gravatar image Lorenz  ( 2012-10-16 00:54:41 -0500 )edit

I pasted the error at the end of my question, it is in Spanish.

egoitzas gravatar image egoitzas  ( 2012-10-16 22:13:31 -0500 )edit

this doesn't seem to be the complete error output. Please paste everything. It's really important. Otherwise it's hard to help.

Lorenz gravatar image Lorenz  ( 2012-10-16 23:26:19 -0500 )edit

OK, I will paste everything, then. Thank you.

egoitzas gravatar image egoitzas  ( 2012-10-16 23:48:54 -0500 )edit

Just some lines without context often don't help. We are really losing a lot of time because you do not show us the important parts of the code, e.g. declarations of the variables involved. Best if you copy-paste all relevant parts of the code. And please format the code (mark it and press Ctrl-K).

Lorenz gravatar image Lorenz  ( 2012-10-18 00:50:11 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-10-22 21:39:30 -0500

egoitzas gravatar image

Hi,

I finally found the problem. In the code, there is a variable which I was using as a single variable, and in fact it was a vector.

Thanks for your help!

edit flag offensive delete link more
0

answered 2012-10-16 00:55:18 -0500

Lorenz gravatar image

updated 2012-10-17 04:09:28 -0500

Is this really your CMakeLists.txt? Did you copy-paste it? It is not in a valid format since the comment character in cmake is not // but #. Does the error message maybe indicate that your CMakeLists.txt is invalid?

Edit: Apparently, you have an error in your code and the compiler complains. Probably something with either a call to subscribe or something with the signature of a callback. Without seeing your code, it's hard to say what exactly is wrong but you will have to fix your code.

edit flag offensive delete link more

Comments

Sorry for not pointing that, I changed all the "#" and put "//" here, because otherwise those lines appeared in bigger size of letters. But in the CMakeLists.txt file, there are "#" where here you can see "//".

egoitzas gravatar image egoitzas  ( 2012-10-16 22:02:59 -0500 )edit

Sorry for not pointing that, I changed all the "#" and put "//" here, because otherwise those lines appeared in bigger size of letters. But in the CMakeLists.txt file, there are "#" where here you can see "//".

egoitzas gravatar image egoitzas  ( 2012-10-16 22:02:59 -0500 )edit

Yes, at first I thought that the problem is in the code. But I have read the code many times, paying attention to different details and comparing it to the codes of the keyboard and the Gamepad Thrustmaster to control the Summit, and I can,t find the problem. I will edit to show you the code.

egoitzas gravatar image egoitzas  ( 2012-10-17 22:37:39 -0500 )edit

Thank you very much for all your help :)

egoitzas gravatar image egoitzas  ( 2012-10-17 22:44:47 -0500 )edit

Question Tools

Stats

Asked: 2012-10-11 00:58:16 -0500

Seen: 392 times

Last updated: Oct 22 '12