Writing a Subscriber in Python
Hello all,
I am trying to write a subscriber program in ROS fuerte with python and I get this error after I type "rosmake packagename" to build my package. I have "import rospy " in the python code but still I get some errors. The error I get is CMake cannot determine linker language for target(then it appears the name of python program)
I am following the ros tutorials and as far as my knowledge I have considered all steps necasary for writing a subscriber.
Can you please help me with my issue?
Here is the code for CMake.txt:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
rosbuild_add_executable(WhichFace src/WhichFace.py)
and here is the code for Manifest.xml
<package>
<description brief="finalPhone">finalPhone </description>
<author>pi</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/finalPhone</url>
<depend package="std_msgs"/>
<depend package="rospy"/>
</package>
Thanks,
what's the steps you did? The information is not enough to debug.
Please the contents of your
CMakeLists.txt
andpackage.xml
. You are most likely treating a Python program as a C++ program (ie: trying to link it against other libraries). Python nodes do not need to be linked against anything.Sure.This is manifest.xml <package> <description brief="finalPhone">
</description> <author>pi</author> <license>BSD</license> <review status="unreviewed" notes=""/> <url>http://ros.org/wiki/finalPhone</url> <depend package="std_msgs"/> <depend package="rospy"/>
And this is my Cmakelist.txt:
cmake_minimum_required(VERSION 2.4.6) include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) rosbuild_init() set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) rosbuild_add_executable(WhichFace src/WhichFace.py)
Can you add this (properly formatted) to your original question? Please use the
edit
button/link for that (to the right of Comments under your question), and use the Preformatted Text button to format the manifest and build script.Sure.I did it.