Not able to perform a catkin_make on adding new node on menge ros

asked 2021-02-04 15:15:49 -0500

flynsequeira gravatar image

I'm using a crowd simulator menge-ros. On adding a new node, I wasn't able to build the project from the workspace main directory. CMakeList.txt

...last few lines added...
catkin_workspace()
catkin_python_setup()
catkin_install_python(PROGRAMS scripts/driver.py
    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

driver.py

#!/usr/bin/env python

import rospy
from geometry_msgs.msg import Twist
from geometry_msgs.msg import PoseArray


def move():
    # start new node
    rospy.init_node('driver')
    driver = rospy.Publisher('/cmd_vel', Twist, queue_size=10)
    vel_msg = Twist()

    #Receiving users input
    state_crowd = rospy.Subscribe('/crowd_pose', PoseArray, queue_size=10)
    state_robot = rospy.Subscribe('/pose', PoseArray, queue_size=10)

    vel_msg.linear.y = 0
    vel_msg.linear.x = 0
    vel_msg.angular.x = 0
    vel_msg.angular.y = 0
    vel_msg.angular.z = 0

    while True:
        vel_msg.linear.x = 10
        driver.publish(vel_msg)

if __name__=='__main__':
    try:
        move()
    except rospy.ROSInterruptException: pass

The ERROR I FACED on running catkin_make

Traceback (most recent call last):
  File "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py", line 259, in <module>
    main()
  File "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py", line 250, in main
    exec(fh.read(), {{}}, local_vars)
  File "<string>", line 7, in <module>
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/python_setup.py", line 74, in generate_distutils_setup
    package = parse_package(package_xml_path)
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 513, in parse_package
    xml, filename = _get_package_xml(path)
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 489, in _get_package_xml
    raise IOError('Path "%s" is neither a directory containing a "%s" file nor a file' % (path, PACKAGE_MANIFEST_FILENAME))
IOError: Path "." is neither a directory containing a "package.xml" file nor a file
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/flyn/catkin_ws/build/catkin_generated/env_cached.sh
  "/usr/bin/python"
  "/opt/ros/indigo/share/catkin/cmake/interrogate_setup_dot_py.py" "Project"
  "/home/flyn/catkin_ws/src/setup.py"
  "/home/flyn/catkin_ws/build/catkin_generated/setup_py_interrogation.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_python_setup.cmake:69 (safe_execute_process)
  CMakeLists.txt:64 (catkin_python_setup)


-- Configuring incomplete, errors occurred!
See also "/home/flyn/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/flyn/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
edit retag flag offensive close merge delete