Why can't I launch the node?
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>
Asked by Nosnik on 2020-04-21 09:53:55 UTC
Comments
What do you mean by "I have installed"? Installed the debian packagen? Downloaded the source into a ROS workspace?
Asked by mgruhler on 2020-04-22 01:30:04 UTC
Have you built your workspace after
git clone
and before trying toroslaunch
anything?If not: that is your problem.
Asked by gvdhoorn on 2020-04-22 12:29:40 UTC
I built my workspace beforehand following the ros wiki for creating a workspace for catkin (http://wiki.ros.org/catkin/Tutorials/create_a_workspace) 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
Asked by Nosnik on 2020-04-22 12:46:49 UTC
And did you after building
source
thedevel/setup.bash
?Asked by gvdhoorn on 2020-04-22 12:47:46 UTC
I was following the creating a catkin workspace for ros tutorial so I'm fairly certain I did
Asked by Nosnik on 2020-04-22 13:33:49 UTC
Well it's one of the main causes of the error message you show, so I would make sure "fairly" is actually "100% certain".
Asked by gvdhoorn on 2020-04-22 13:54:45 UTC
I reinstalled everything from scratch and now it works so it is likely you were right
Asked by Nosnik on 2020-04-23 09:40:02 UTC