Unable to create/find executable when using rosrun.
Hello all,
I am trying to run a C++ code to move the ur5 robotic arm to random configurations in moveit!. However when I am trying to run the code using rosrun I am getting the following error:
[rosrun] Couldn't find executable named move_group_interface_tutorial below /home/abhi/Desktop/universal_robot/ur_moveit_tutorials
The C++ file is this:
#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "lesson_move_group");
// start a background "spinner", so our node can process ROS messages
// - this lets us know when the move is completed
ros::AsyncSpinner spinner(1);
spinner.start();
move_group_interface::MoveGroup group("manipulator");
group.setRandomTarget();
group.move();
}
The CMakeLists.txt file is something like this:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/src)
#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()
rosbuild_add_executable(lesson_move_group_1 src/lesson_move_group_1.cpp)
target_link_libraries(lesson_move_group_1 moveit_move_group_interface)
Please tell me how to create the executable and run this code. I am stuck here for quite some time now.
can you please try to use the code tag (the button where the 1s and 0s are)