ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why can't I launch the node?

asked 2020-04-21 09:53:55 -0500

Nosnik gravatar image

updated 2020-04-22 12:22:10 -0500

Hi, I have cloned the rplidar ros package from https://github.com/robopeak/rplidar_ros into the src file of my ros workspace.

When I roslaunch the file rplidar.launch inside the package I get the error:

ERROR: cannot launch node of type [rplidar_ros/rplidarNode]: rplidar_ros
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share

Why is it that I cant launch this node? I have the RPLidar connected via USB

I am running Kinetic on Ubuntu 16.04

the contents of the launch file is shown below if that helps:

<launch>
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>
  <param name="serial_baudrate"     type="int"    value="115200"/><!--A1/A2 -->
  <!--param name="serial_baudrate"     type="int"    value="256000"--><!--A3 -->
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node>
</launch>
edit retag flag offensive close merge delete

Comments

What do you mean by "I have installed"? Installed the debian packagen? Downloaded the source into a ROS workspace?

mgruhler gravatar image mgruhler  ( 2020-04-22 01:30:04 -0500 )edit

Have you built your workspace after git clone and before trying to roslaunch anything?

If not: that is your problem.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-22 12:29:40 -0500 )edit

I built my workspace beforehand following the ros wiki for creating a workspace for catkin (http://wiki.ros.org/catkin/Tutorials/...) then did catkin_make after cloning the rplidar package then I get the error when trying to launch the file.

The only other package in the workspace source folder is hector_slam if that is relevant .

Also when trying:

roslaunch rplidar_ros rplidar.launch

from my workspace I get the error:

[rplidar.launch] is neither a launch file in package [rplidar_ros] nor is [rplidar_ros] a launch file name The traceback for the exception was written to the log file

I can only 'launch' the rplidar.launch file when inside the actual launch file and typing:

roslaunch rplidar.launch

Nosnik gravatar image Nosnik  ( 2020-04-22 12:46:49 -0500 )edit
1

And did you after building source the devel/setup.bash?

gvdhoorn gravatar image gvdhoorn  ( 2020-04-22 12:47:46 -0500 )edit

I was following the creating a catkin workspace for ros tutorial so I'm fairly certain I did

Nosnik gravatar image Nosnik  ( 2020-04-22 13:33:49 -0500 )edit

Well it's one of the main causes of the error message you show, so I would make sure "fairly" is actually "100% certain".

gvdhoorn gravatar image gvdhoorn  ( 2020-04-22 13:54:45 -0500 )edit

I reinstalled everything from scratch and now it works so it is likely you were right

Nosnik gravatar image Nosnik  ( 2020-04-23 09:40:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-23 09:40:52 -0500

Nosnik gravatar image

source the devel/setup.bash

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-04-21 09:53:55 -0500

Seen: 539 times

Last updated: Apr 23 '20