Ask Your Question

I created a python and c++ node . But I cant see my nodes with rosrun command.

asked 2020-04-01 16:23:36 -0500

Kaymak gravatar image

updated 2020-04-02 05:21:15 -0500

gvdhoorn gravatar image

I am pretty new Ubuntu and ROS . I created a python and c++ node as you can see first and second part . But I dont see my nodes with rosrun command. I have got this nodes on my my_robot packages (kaymak@kaymak-X550JX:~/catkin_ws/src/my_robot/scripts$ and kaymak@kaymak-X550JX:~/catkin_ws/src/my_robot/src$) .Please help me how can I fix the problem?

---C++ Nodes ----

kaymak@kaymak-X550JX:~/catkin_ws/devel/lib/my_robot$ ls

---Python Nodes---

kaymak@kaymak-X550JX:~/catkin_ws/src/my_robot/scripts$ chmod +x 
kaymak@kaymak-X550JX:~/catkin_ws/src/my_robot/scripts$ ls

---Error Messages---

kaymak@kaymak-X550JX:~$ rosrun my_robot 
Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS]
  rosrun will locate PACKAGE and try to find
  an executable named EXECUTABLE in the PACKAGE tree.
  If it finds it, it will run it with ARGS.
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2020-04-02 07:07:57 -0500

jahim44229 gravatar image

Open bashrc file;

nano ~/.bashrc

Add this to the end;

source ~/catkin_ws/devel/setup.bash

Then save and quit.

If it works, you fixed it.

If it doesn't work, you can add it to the bottom of the bashrc file;

export ROS_PACKAGE_PATH=/home/<user_name>/catkin_ws/src:/opt/ros/melodic/share

<user_name> -> write your own user name in this section

edit flag offensive delete link more

answered 2020-04-02 09:17:25 -0500

Rayman gravatar image

The command is


So you should run the following commands

rosrun my_robot node_cpp
rosrun my_robot
edit flag offensive delete link more

answered 2020-04-07 07:31:42 -0500

Kaymak gravatar image

I solved the problem . It was so easy . As I mentioned before I am new at ros . I read a lot of about the same problems . But I hadn't found the answer

The solutuion was just click 'TAB' twice rapidly after this command : kaymak@kaymak-X550JX:~$ rosrun my_robot

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-04-01 16:23:36 -0500

Seen: 53 times

Last updated: Apr 07 '20