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

laurent2101's profile - activity

2015-01-25 22:38:13 -0600 received badge  Famous Question (source)
2014-11-13 22:47:12 -0600 received badge  Notable Question (source)
2014-10-19 11:56:49 -0600 received badge  Popular Question (source)
2014-10-17 13:24:17 -0600 answered a question ImportError package.msg

Yes, I used the old build system because the tutorials said it was simpler. After loading the manifest, the script worked perfectly. Thank you very much for your help.

2014-10-17 13:21:46 -0600 received badge  Supporter (source)
2014-10-17 13:21:44 -0600 received badge  Scholar (source)
2014-10-17 09:59:08 -0600 asked a question ImportError package.msg

Hi I have created a package(pwm), that contains a custom message(signal.msg). It seem to be compiled correctly. Because I can

ubuntu@arm:~/test/sandbox/pwm$ rosmsg show signal
uint8 freq
uint8 duty

ubuntu@arm:~/test/sandbox/pwm/msg$ ls

When i run a script which use the message i got an error.

ubuntu@arm:~$ rosrun pwm scripts/
Traceback (most recent call last):
  File "/home/ubuntu/test/sandbox/pwm/scripts/", line 4, in <module>
    from pwm.msg import signal
ImportError: No module named pwm.msg

Could you help me please ?

Here are some additional informations


ubuntu@arm:~/test/sandbox/pwm$ cat CMakeLists.txt 
cmake_minimum_required(VERSION 2.4.6)

# 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)


#set the default path for built executables to the "bin" directory
#set the default path for built libraries to the "lib" directory

#uncomment if you have defined messages
#uncomment if you have defined services

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})


ubuntu@arm:~/test/sandbox/pwm/msg$ export | grep ROS
    declare -x ROS_DISTRO="indigo" 
    declare -x ROS_ETC_DIR="/opt/ros/indigo/etc/ros"
    declare -x ROS_MASTER_URI="http://localhost:11311" 
    declare -x ROS_PACKAGE_PATH="/home/ubuntu/test/sandbox:/opt/ros/indigo/share:/opt/ros/indigo/stacks" 
    declare -x ROS_ROOT="/opt/ros/indigo/share/ros"
    declare -x ROS_WORKSPACE="/home/ubuntu/test"


ubuntu@arm:~/test/sandbox/pwm/msg$ echo $PYTHONPATH 


ubuntu@arm:~/test/sandbox/pwm$ rosmake 
[ rosmake ] rosmake starting...                                                 
[ rosmake ] No package specified.  Building ['pwm']                             
[ rosmake ] Packages requested are: ['pwm']                                     
[ rosmake ] Logging to directory /home/ubuntu/.ros/rosmake/rosmake_output-20141015-233222
[ rosmake ] Expanded args ['pwm'] to:
[rosmake-0] Starting >>> catkin [ make ]                                        
[rosmake-0] Finished <<< catkin ROS_NOBUILD in package catkin
 No Makefile in package catkin
[rosmake-0] Starting >>> genmsg [ make ]                                        
[rosmake-0] Finished <<< genmsg ROS_NOBUILD in package genmsg
 No Makefile in package genmsg
[rosmake-0] Starting >>> genlisp [ make ]                                       
[rosmake-0] Finished <<< genlisp ROS_NOBUILD in package genlisp
 No Makefile in package genlisp
[rosmake-0] Starting >>> genpy [ make ]                                         
[rosmake-0] Finished <<< genpy ROS_NOBUILD in package genpy
 No Makefile in package genpy
[rosmake-0] Starting >>> gencpp [ make ]                                        
[rosmake-0] Finished <<< gencpp ROS_NOBUILD in package gencppive 4/25 Complete ]
 No Makefile in package gencpp
[rosmake-0] Starting >>> message_generation [ make ]                            
[rosmake-0] Finished <<< message_generation ROS_NOBUILD in package message_generation
 No Makefile in package message_generation
[rosmake-0] Starting >>> cpp_common [ make ]                                    
[rosmake-0] Finished <<< cpp_common ROS_NOBUILD in package cpp_common
 No Makefile in package cpp_common
[rosmake-0] Starting >>> rostime [ make ]                                       
[rosmake-0] Finished <<< rostime ROS_NOBUILD in package rostime
 No Makefile in package rostime
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package ...