First of all, I'm running Ubuntu 12.04.5 LTS (using catkin hydro) on my workstation and at the beginning, I have these packets: beginner_tutorials, ps3joy and CMakelist.txt file ( ~/catkin_ws_ruben/src )
Im trying to follow Writing a Teleoperation Node for the PS3 Joystick from
http://wiki.ros.org/ps3joy/Tutorials/WritingTeleopNode
I created my new package learning_ps3joy on ~/catkin_ws_ruben/src
chmod +x turtle_teleop_ps3joy.cpp (to execute turtle_teleop_ps3joy.cpp I've created)
I suppose that this line is wrong on wiki:
rosbuild_add_executable(turtle_teleop_ps3joy src/turtle_teleop_ps3joy.cpp)
so I change for this
rosbuild_add_executable(learning_ps3joy src/turtle_teleop_ps3joy.cpp)
So in CMakeList.txt I have the following ( I suppose is correct):
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_executable(learning_ps3joy src/turtle_teleop_ps3joy.cpp)
#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})
I type rosmake and then following Setting up the PS3 Joystick without problems
Then I create launch folder, create inside turtle_ps3joy.launch
<launch>
<!-- Turtlesim Node-->
<node pkg="turtlesim" type="turtlesim_node" name="sim"/>
<!-- PS3 joy node -->
<node respawn="true" pkg="ps3joy"
type="ps3joy_node" name="PS3_turtle_joy" >
<param name="dev" type="string" value="/dev/input/js0" />
<param name="deadzone" value="0.12" />
</node>
<!-- Axes -->
<param name="axis_linear" value="1" type="int"/>
<param name="axis_angular" value="0" type="int"/>
<param name="scale_linear" value="2" type="double"/>
<param name="scale_angular" value="2" type="double"/>
<node pkg="turtle_teleop" type="turtle_teleop_joy" name="teleop"/>
</launch>
and run on termimal roslaunch learning_ps3joy turtle_ps3joy.launch
Output:
... logging to /home/robin/.ros/log/ba129752-4582-11e4-b0c4-0024e808a46a/roslaunch-rchiesa-8582.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://rchiesa:33145/
SUMMARY
========
PARAMETERS
* /PS3_turtle_joy/deadzone
* /PS3_turtle_joy/dev
* /axis_angular
* /axis_linear
* /rosdistro
* /rosversion
* /scale_angular
* /scale_linear
NODES
/
PS3_turtle_joy (ps3joy/ps3joy_node)
sim (turtlesim/turtlesim_node)
teleop (turtle_teleop/turtle_teleop_joy)
auto-starting new master
process[master]: started with pid [8596]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to ba129752-4582-11e4-b0c4-0024e808a46a
process[rosout-1]: started with pid [8609]
started core service [/rosout]
process[sim-2]: started with pid [8621]
ERROR: cannot launch node of type [ps3joy/ps3joy_node]: can't locate node [ps3joy_node] in package [ps3joy]
ERROR: cannot launch node of type [turtle_teleop/turtle_teleop_joy]: can't locate node [turtle_teleop_joy] in package [turtle_teleop]
So , How can I solve this?
Thanks for your time
Originally posted by astur on ROS Answers with karma: 31 on 2014-09-25
Post score: 0