ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

custom_node not launching

asked 2022-01-28 01:54:12 -0500

umar_anjum gravatar image

Hi, all I have ubuntu 16.04LTS and ROS1, I am working on ur5, I am trying to create a launch file which will include my pythons executable the following is my launch file

?xml version="1.0"?>

launch>

arg name="gui" default="True" />

param name="robot_description" command="$(find xacro)/xacro --inorder $(find ur5_description)/urdf/ur5_robotiq85_gripper.urdf.xacro" />

node name="my_joint_state_publisher" pkg="ur5_description" type="my_joint_state_publisher.py" />

node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

node name="rviz" pkg="rviz" type="rviz" args="-d $(find ur5_description)/config/ur5.rviz" required="true" /> /launch>

but this gives me the following error: cannot launch node of type [ur5_description/my_joint_state_publisher.py]: can't locate node [my_joint_state_publisher.py] in package [ur5_description]

my pkg name is correct and my python file is an executable file check then twice. What could be the reason of this error?

edit retag flag offensive close merge delete

Comments

Is your package visible when you run rospack list? If not you need to source it

osilva gravatar image osilva  ( 2022-01-28 05:40:51 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-01-28 07:57:00 -0500

Robo_guy gravatar image

@umar_anjum this link might be helpful - https://answers.ros.org/question/3442... This guy had a similar problem like you, so this should solve your problem.

edit flag offensive delete link more

Comments

@umar_anjum did that link help you ? Did it help you in solving your problem ?

Robo_guy gravatar image Robo_guy  ( 2022-02-02 23:54:24 -0500 )edit

@Robo_guy I solved the problem.

umar_anjum gravatar image umar_anjum  ( 2022-02-08 03:52:53 -0500 )edit

@umar_anjum Ok great

Robo_guy gravatar image Robo_guy  ( 2022-02-09 22:56:22 -0500 )edit
0

answered 2022-02-08 03:55:55 -0500

umar_anjum gravatar image

I kept my original launch file as is and changed this into a python file which I can run by making is executable. This pretty much solved my problem and I came to find that launch files are to just launch things in an environment but not to manipulate them.

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

2 followers

Stats

Asked: 2022-01-28 01:54:12 -0500

Seen: 55 times

Last updated: Feb 08