rosrun tab completion not working and find: ‘’: Datei oder Verzeichnis nicht gefunden

asked 2021-03-05 05:51:03 -0500

mab0189 gravatar image

updated 2021-03-09 04:53:15 -0500

I just installed ROS-Noetic from source on a raspberry pi 3B+ with raspbian stretch. I have some strange problems regarding rosrun. The first problem that i have is that the tab completion is not working. I did source ./devel/setup.bash but it does not work.

Before that i had the following problem:

TKI@pi:~/ROS_Calculate/catkin_ws $ rosrun caterminate called after throwing an instance of 
'rospack::Exception'
what():  error parsing manifest of package rosmaster at /opt/ros/melodic/share/rosmaster/package.xml

Which i hopefully fixed according to this rosanswers question

My ROS_PACKAGE_PATH looks like this after i source ./devel/setup.bash of my catkin workspace:

TKI@pi:~/ROS_Calculate/catkin_ws $ echo $ROS_PACKAGE_PATH
/home/TKI/ROS_Calculate/catkin_ws/src:/opt/ros/noetic/share

The other problem that i have with rosrun is that it says:

find: ‘’: Datei oder Verzeichnis nicht gefunden

after i start my ros node with rosrun.

TKI@pi:~/ROS_Calculate/catkin_ws $ rosrun calculate calc_talker.py
find: ‘’: Datei oder Verzeichnis nicht gefunden
[INFO] [1614837047.381706]: first_number: 1
second_number: 1
[INFO] [1614837047.481842]: first_number: 2
second_number: 1
[INFO] [1614837047.581801]: first_number: 3
second_number: 2

I am still pretty new to ROS and i do not know how to solve this. I am very very gratefull for your help!

Edit - The package.xml and calc_talker.py for my calculate package looks like this:

<?xml version="1.0"?>
<package format="2">
    <name>calculate</name>
    <version>0.0.1</version>
    <description>
        The calculate package is a small package to train ROS programming.
        It consists of a calc_talker that calculates the fibonacci sequence
        and a calc_listener that is listening to the calc_talkers calculations.
        The package also defines a custom message Calc.
    </description>
    <maintainer email="email@email.de">mab0189</maintainer>
    <license>BSD</license>
    <author email="email@email.de">mab0189</author>
    <buildtool_depend>catkin</buildtool_depend>
    <build_depend>rospy</build_depend>
    <build_export_depend>rospy</build_export_depend>
    <exec_depend>rospy</exec_depend>
    <build_depend>message_generation</build_depend>
    <exec_depend>message_runtime</exec_depend>
</package>

calc_talker.py:

#!/usr/bin/env python

import rospy
from calculate.msg import Calc

def talker():

    pub = rospy.Publisher("Calc_Chatter", Calc, queue_size=100)
    rospy.init_node("Calc_Talker", anonymous=True)
    rate = rospy.Rate(10)

    number1 = 1
    number2 = 1

    while not rospy.is_shutdown():

        result = number1 + number2

        msg = Calc()
        msg.first_number = number1
        msg.second_number = number2

        number2 = number1
        number1 = result

        rospy.loginfo(msg)
        pub.publish(msg)
        rate.sleep()

if __name__ == "__main__":
    try:
        talker()
    except rospy.ROSInterruptException:
        pass
#EoF
edit retag flag offensive close merge delete

Comments

1

What is inside the <name> </name> element in the file package.xml ?

Roberto Z. gravatar image Roberto Z.  ( 2021-03-05 07:29:58 -0500 )edit

@Roberto Z. i added it to my question. I originally developed this package in a Ubuntu VM with ROS Noetic and everything worked as expected there. Thank you very much for your help!

mab0189 gravatar image mab0189  ( 2021-03-05 08:10:36 -0500 )edit
1

Ok, thanks, that looks good. I think it might be something probably hidden inside the calc_talker.py file that is causing that message...

Roberto Z. gravatar image Roberto Z.  ( 2021-03-05 09:57:53 -0500 )edit

@Roberto Z. do you think so? I suspect that there might be something wrong with my ROS since the tab completion is not working correct either.

mab0189 gravatar image mab0189  ( 2021-03-05 11:03:29 -0500 )edit
1

@mab0189 when I face this issue, I usually do rospack find package-name and after that the tab completion works so it might be worth a try.

shlock gravatar image shlock  ( 2021-03-09 02:59:06 -0500 )edit

@shlock Thank you very much for your comment. When i run rospack find calculate i get the following output:

TKI@pi:~/ROS_Calculate/catkin_ws $ rospack find calculate
Speicherzugriffsfehler

Which roughly translates to ~Memory access failure. This seems odd.

mab0189 gravatar image mab0189  ( 2021-03-09 04:38:03 -0500 )edit

Note: I installed ROS-Kinetic from source on the raspberry pi 3B+ on a copy of the exact same image and the tab completion works and i don't get the strange find: ‘’: Datei oder Verzeichnis nicht gefunden message when i rosrun my node. Rospack find is also not throwing a memory access failure.

mab0189 gravatar image mab0189  ( 2021-03-09 04:43:00 -0500 )edit