Issue with "Installing the RPLidar Lidar Sensor on the Raspberry Pi"

I am running Raspbian Stretch and ROS Kinetic on a Rpi 3B+.

I am using a RPLidar A1M8.

I have successfully built the ROS Desktop option, but I am getting the following message when using the roslaunch rplidar_ros view_rplidar.launch command string"

QXcbConnection: Could not connect to display
[rviz-3] process has died [pid 7994, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz -d /home/pi/rplidar_ws/src/rviz/rplidar.rviz __name:=rviz __log:=/home/pi/.ros/log/bf3bc964-d237-11e9-a538-b827ebcb393e/rviz-3.log].
log file: /home/pi/.ros/log/bf3bc964-d237-11e9-a538-b827ebcb393e/rviz-3*.log

Viewing the RPLidar output using the Test application commands works fine:

roslaunch rplidar_ros rplidar.launch
rosrun rplidar_ros rplidarNodeClient

Since I am new to ROS programming, can anyone tell me why I am getting the error with the rplidar.rviz function?

Regards,
Tom C

log file: /home/pi/.ros/log/bf3bc964-d237-11e9-a538-b827ebcb393e/rviz-3*.log

What did it say in the log?

Ah, I see your post at answers.ros.org

Did you launch it from a command shell on the desktop? You can’t be ssh’d in unless you set up a remote display.

Are you on Raspbian for Robots or plain stretch?

On plain stretch:

sudo apt-get install tightvncserver

tightvncserver
pw: yourpw
viewonly pw: no

default is 1024x768 can change: tightvncserver -geometry 1920x1080

Then remote in using a vncviewer or remote desktop:

vnc://ip.ip.ip.ip:5901

1 Like

@cyclicalobsessive,

Thanks for the insights, much appreciated.

I am running just plain Stretch at the moment.

I will give your instructions a shot and report back.

Regards,
Tom C

@cyclicalobsessive,

I installed tightvncserver, started tightvncserver and setup a pw.

I then started VNC Viewer on my PC and entered vnc://xxx.xxx.xxx.xxx:5901 where xxx is the ip address of the Rpi I use to SSH into.

However the VNC Viewer will not connect because "Invalid endpoint: port not correctly specified. Is there a way to determine the correct port number that the tightvncserver is using as 5901 doesn’t work?

Update: I suspect that the problem is not the port number, but has to do with “port forwarding” which I think my router is presently not setup to do.

By the way, do I need a VNC account to use VNC viewer?

Regards,
Tom C

If the two machines are on the same (home) side of the router, you don’t set up port forwarding - (that is only for exposing safe zone machine to the outside world).

See what the log says (below is all normal) with:

$ more ~/.vnc/*.log
::::::::::::::
/home/pi/.vnc/ROSPI:1.log
::::::::::::::
09/09/19 09:26:23 Xvnc version TightVNC-1.3.9
09/09/19 09:26:23 Copyright (C) 2000-2007 TightVNC Group
09/09/19 09:26:23 Copyright (C) 1999 AT&T Laboratories Cambridge
09/09/19 09:26:23 All Rights Reserved.
09/09/19 09:26:23 See http://www.tightvnc.com/ for information on TightVNC
09/09/19 09:26:23 Desktop name 'X' (ROSPI:1)
09/09/19 09:26:23 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
09/09/19 09:26:23 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/home/pi/.Xresources'
AUDIT: Mon Sep  9 09:26:27 2019: 9544 Xtightvnc: client 7 rejected from local host

I just tried vncviewer on Windows10 and it worked fine with xxx.xxx.xxx.xxx:5901 without the vnc://

You do not need an account to use vncviewer

@cyclicalobsessive,

Thanks for the quick response, much appreciated. Learning a lot with your help.

Using the Rpi ip only followed by :5091 did the trick. Looks good.

Regards,
Tom C

Make sure you try the DI GoPiGo3 application GoPiGo3 Control Panel on the Desktop too.

2 Likes

@cyclicalobsessive,

Will checkout the Di GoPiGo3 Control Panel as you have suggested. However:

Even with the VNC Viewer remote desktop running I am still getting the “[rviz-3] process has died [pid 7994, exit code -6,” message.

Also when I tried rosdep install rviz to satisfy system dependencies as a test, I received this message:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rviz: No definition of [yaml-cpp] for OS version

So it is obvious that rviz is missing the yaml-cpp dependency for the Raspbian Stretch build.

I will search the IoT to see how to correct the missing dependency, but suggestions are welcome!

Update:

The libyaml-cpp-dev dependency is available for Jessie

Regards,
Tom C

You issued the launch cod in a bash shell on the desktop, correct?

What did that log file say was the reason Rviz died?

Please define bash shell.

I ran the launch code from the Desktop CLI.

I was able to view the log file using the Desktop but cannot figure out how to copy out the log file to the Windows 10 desktop.

Suggestions.

Update:

the yaml-cpp dependency is available from an Ubuntu website.

Regards,
Tom C

IMO, you are headed for a wall at light speed - you cannot safely mix a compiled from sources install with a “package install”.

@cyclicalobsessive,

Suggestions?

Regards,
Tom C

From your windows system, use WinSCP to copy files from your RPi to your Windows system.

It is also doable from the command line on your Windows system:

scp pi@ip.ip.ip.ip:/home/pi/file_you_want .      <- note space dot  or instead of dot put a new_file_name  
password: your RPi password
.... bytes copied

a quick and dirty way is to ssh from your Windows machine,

$ more /full_path/to_file

and then highlight the text and copy/paste into a file on your windows system or into a browser (post) directly.

1 Like

@cyclicalobsessive,

Thanks for the insights, much appreciated.

This is what I got:

The only log file that had a reference to rviz-3 was the roslaunch-raspiberrypi-13218.log which included the following:

“[roslaunch][ERROR] 2019-09-09 10:17:02,957: [rviz-3] process has died [pid 1327$
log file: /home/pi/.ros/log/7bfd8946-d30c-11e9-b184-b827ebcb393e/rviz-3*.log”

The rviz-3*.log was empty.

Regards,
Tom C

@cyclicalobsessive,

There seems to be plenty of issues with the yaml-cpp dependency for rviz.

There were some suggestions of backing the yaml-cpp dependency out of ros, but that requires a removal of ros and a reinstall as follows:

sudo apt-get remove ^ros*
sudo apt-get remove --purge yaml-cpp
sudo apt-get install ros-groovy-desktop-full

Where "groovy" would be replace by kinetic.

The rplidar.rviz package was written five years ago and much has changed with rviz since then.

Comments?

Regards,
Tom C

@cyclicalobsessive,

Running the following command, rosdep install -a, revealed the following:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rosconsole: No definition of [rostime] for OS [debian]
catkin: No definition of [python-argparse] for OS version
qt_dotgraph: No definition of [python_qt_binding] for OS [debian]
urdf: No definition of [rostest] for OS [debian]
rosgraph: No definition of [catkin] for OS [debian]
rqt_py_console: No definition of [rqt_gui_py] for OS [debian]
nodelet_topic_tools: No definition of [roscpp] for OS [debian]
rqt_graph: No definition of [rqt_gui_py] for OS [debian]
nodelet_tutorial_math: No definition of [std_msgs] for OS [debian]
qt_gui: No definition of [python_qt_binding] for OS [debian]
filters: No definition of [pluginlib] for OS [debian]
smclib: No definition of [catkin] for OS [debian]
rosparam: No definition of [rosgraph] for OS [debian]
geneus: No definition of [genmsg] for OS [debian]
roscpp_serialization: No definition of [rostime] for OS [debian]
rqt_rviz: No definition of [rviz] for OS [debian]
rosbuild: No definition of [message_runtime] for OS [debian]
rosclean: No definition of [catkin] for OS [debian]
tf: No definition of [rosunit] for OS [debian]
rqt_publisher: No definition of [rqt_py_common] for OS [debian]
roswtf: No definition of [cmake_modules] for OS [debian]
geometric_shapes: No definition of [rosunit] for OS [debian]
eigen_stl_containers: No definition of [eigen] for OS version
smach_ros: No definition of [smach_msgs] for OS [debian]
rqt_web: No definition of [webkit_dependency] for OS [debian]
shape_msgs: No definition of [std_msgs] for OS [debian]
trajectory_msgs: No definition of [rosbag_migration_rule] for OS [debian]
diagnostic_aggregator: No definition of [bondpy] for OS [debian]
robot_state_publisher: No definition of [rostest] for OS [debian]
smach_msgs: No definition of [std_msgs] for OS [debian]
resource_retriever: No definition of [boost] for OS version
rqt_topic: No definition of [std_msgs] for OS [debian]
opencv3: No definition of [protobuf] for OS version
rqt_action: No definition of [rqt_py_common] for OS [debian]
rqt_top: No definition of [rqt_gui_py] for OS [debian]
diagnostic_msgs: No definition of [std_msgs] for OS [debian]
rosgraph_msgs: No definition of [std_msgs] for OS [debian]
rosboost_cfg: No definition of [catkin] for OS [debian]
genmsg: No definition of [catkin] for OS [debian]
xacro: No definition of [rostest] for OS [debian]
turtle_tf2: No definition of [turtlesim] for OS [debian]
rqt_robot_dashboard: No definition of [rqt_robot_monitor] for OS [debian]
rqt_service_caller: No definition of [rqt_py_common] for OS [debian]
xmlrpcpp: No definition of [rostime] for OS [debian]
gl_dependency: No definition of [python-qt5-bindings-gl] for OS version
pluginlib: No definition of [roslib] for OS [debian]
rqt_msg: No definition of [rqt_console] for OS [debian]
rosmaster: No definition of [rosgraph] for OS [debian]
rosnode: No definition of [rostopic] for OS [debian]
rqt_pose_view: No definition of [tf] for OS [debian]
bond: No definition of [std_msgs] for OS [debian]
self_test: No definition of [roscpp] for OS [debian]
rospack: No definition of [ros_environment] for OS [debian]
actionlib_msgs: No definition of [std_msgs] for OS [debian]
rqt_image_view: No definition of [sensor_msgs] for OS [debian]
rqt_console: No definition of [rqt_py_common] for OS [debian]
joint_state_publisher: No definition of [rostest] for OS [debian]
rviz_plugin_tutorials: No definition of [rviz] for OS [debian]
tf2_msgs: No definition of [message_generation] for OS [debian]
python_qt_binding: No definition of [python-qt5-bindings] for OS version
laser_geometry: No definition of [rosunit] for OS [debian]
rviz: No definition of [yaml-cpp] for OS version
gencpp: No definition of [genmsg] for OS [debian]
rqt_gui_cpp: No definition of [nodelet] for OS [debian]
rqt_bag: No definition of [rqt_gui_py] for OS [debian]
rqt_gui: No definition of [qt_gui] for OS [debian]
qt_gui_py_common: No definition of [python_qt_binding] for OS [debian]
eigen_conversions: No definition of [std_msgs] for OS [debian]
roscpp_traits: No definition of [rostime] for OS [debian]
rosout: No definition of [rosgraph_msgs] for OS [debian]
diagnostic_common_diagnostics: No definition of [tf] for OS [debian]
rostopic: No definition of [rospy] for OS [debian]
visualization_msgs: No definition of [std_msgs] for OS [debian]
message_generation: No definition of [genpy] for OS [debian]
ros_environment: No definition of [catkin] for OS [debian]
qwt_dependency: No definition of [catkin] for OS [debian]
rostime: No definition of [cpp_common] for OS [debian]
rqt_nav_view: No definition of [tf] for OS [debian]
kdl_conversions: No definition of [orocos_kdl] for OS [debian]
roslint: No definition of [catkin] for OS [debian]
rosservice: No definition of [rosmsg] for OS [debian]
actionlib_tutorials: No definition of [message_runtime] for OS [debian]
rosunit: No definition of [roslib] for OS [debian]
turtle_tf: No definition of [turtlesim] for OS [debian]
roscpp_tutorials: No definition of [std_msgs] for OS [debian]
turtle_actionlib: No definition of [geometry_msgs] for OS [debian]
python_orocos_kdl: No definition of [orocos_kdl] for OS [debian]
visualization_marker_tutorials: No definition of [visualization_msgs] for OS [debian]
bondcpp: No definition of [smclib] for OS [debian]
rosconsole_bridge: No definition of [rosconsole] for OS [debian]
pluginlib_tutorials: No definition of [roscpp] for OS [debian]
roslz4: No definition of [rosunit] for OS [debian]
rqt_dep: No definition of [rqt_gui_py] for OS [debian]
rosmsg: No definition of [std_msgs] for OS [debian]
rospy: No definition of [std_msgs] for OS [debian]
turtlesim: No definition of [std_srvs] for OS [debian]
rqt_robot_monitor: No definition of [rqt_bag] for OS [debian]
roslib: No definition of [rosmake] for OS [debian]
diagnostic_analysis: No definition of [roslib] for OS [debian]
stereo_msgs: No definition of [std_msgs] for OS [debian]
rqt_shell: No definition of [rqt_gui_py] for OS [debian]
interactive_markers: No definition of [visualization_msgs] for OS [debian]
diagnostic_updater: No definition of [std_msgs] for OS [debian]
rviz_python_tutorial: No definition of [rviz] for OS [debian]
tf2: No definition of [tf2_msgs] for OS [debian]
rqt_runtime_monitor: No definition of [rqt_gui_py] for OS [debian]
rosbash: No definition of [rospack] for OS [debian]
rqt_reconfigure: No definition of [rqt_py_common] for OS [debian]
rqt_bag_plugins: No definition of [std_msgs] for OS [debian]
rqt_plot: No definition of [std_msgs] for OS [debian]
topic_tools: No definition of [xmlrpcpp] for OS [debian]
rostest: No definition of [rosunit] for OS [debian]
control_msgs: No definition of [actionlib_msgs] for OS [debian]
tf_conversions: No definition of [tf] for OS [debian]
interactive_marker_tutorials: No definition of [tf] for OS [debian]
cpp_common: No definition of [boost] for OS version
nodelet: No definition of [std_msgs] for OS [debian]
rqt_robot_steering: No definition of [rqt_gui_py] for OS [debian]
dynamic_reconfigure: No definition of [std_msgs] for OS [debian]
genpy: No definition of [genmsg] for OS [debian]
message_runtime: No definition of [genpy] for OS [debian]
std_msgs: No definition of [message_runtime] for OS [debian]
roscreate: No definition of [roslib] for OS [debian]
image_transport: No definition of [sensor_msgs] for OS [debian]
rqt_launch: No definition of [rqt_py_common] for OS [debian]
angles: No definition of [rosunit] for OS [debian]
webkit_dependency: No definition of [python-qt5-bindings-webkit] for OS version
cv_bridge: No definition of [rostest] for OS [debian]
rosbag_storage: No definition of [roslz4] for OS [debian]
roslang: No definition of [genmsg] for OS [debian]
std_srvs: No definition of [message_runtime] for OS [debian]
cmake_modules: No definition of [catkin] for OS [debian]
mk: No definition of [rospack] for OS [debian]
octomap: No definition of [catkin] for OS [debian]
bondpy: No definition of [smclib] for OS [debian]
tf2_kdl: No definition of [rostest] for OS [debian]
smach: No definition of [catkin] for OS [debian]
genlisp: No definition of [genmsg] for OS [debian]
class_loader: No definition of [boost] for OS version
tf2_py: No definition of [rospy] for OS [debian]
collada_urdf: No definition of [urdf] for OS [debian]
nav_msgs: No definition of [actionlib_msgs] for OS [debian]
rosmake: No definition of [catkin] for OS [debian]
rqt_srv: No definition of [rqt_msg] for OS [debian]
roscpp: No definition of [xmlrpcpp] for OS [debian]
collada_parser: No definition of [urdf] for OS [debian]
actionlib: No definition of [rosnode] for OS [debian]
qt_gui_cpp: No definition of [qt_gui] for OS [debian]
rplidar_ros: No definition of [std_srvs] for OS [debian]
tf2_ros: No definition of [rostest] for OS [debian]
librviz_tutorial: No definition of [rviz] for OS [debian]
roslisp: No definition of [boost] for OS version
message_filters: No definition of [xmlrpcpp] for OS [debian]
sensor_msgs: No definition of [rosunit] for OS [debian]
map_msgs: No definition of [nav_msgs] for OS [debian]
rospy_tutorials: No definition of [std_msgs] for OS [debian]
random_numbers: No definition of [boost] for OS version
rqt_gui_py: No definition of [rospy] for OS [debian]
rqt_py_common: No definition of [rosbag] for OS [debian]
roslaunch: No definition of [rosbuild] for OS [debian]
rqt_tf_tree: No definition of [tf2_ros] for OS [debian]
rqt_moveit: No definition of [sensor_msgs] for OS [debian]
rqt_logger_level: No definition of [rqt_gui_py] for OS [debian]
kdl_parser: No definition of [rostest] for OS [debian]
gennodejs: No definition of [genmsg] for OS [debian]
media_export: No definition of [catkin] for OS [debian]
geometry_msgs: No definition of [std_msgs] for OS [debian]
urdf_parser_plugin: No definition of [catkin] for OS [debian]
orocos_kdl: No definition of [eigen] for OS version
rosbag: No definition of [xmlrpcpp] for OS [debian]
rosbag_migration_rule: No definition of [catkin] for OS [debian]

Hidden in this mass number of missing dependencies was:

“rviz: No definition of [yaml-cpp] for OS version”

Apparently yaml-cpp is critical for rosdep building required dependencies:

The data that rosdep uses is captured in the [rosdep.yaml] located within each ROS [stack]. Please see the [rosdep.yaml documentation] for details on this format.

It is beginning to look like Raspbian/Debian Linux OS is not the best version of Linux to build the ROS Kinetic Desktop on.

The " Installing the RPLidar Lidar Sensor on the Raspberry Pi" instructions used Ubuntu and not Raspbian/Debian Linux for the ROS Kinetic installation and eventually the RPLidar_Node and GoPiGo2_Node.

Suggestions on how to install at least some of the missing dependencies that might be required for the GoPiGo3_Node future builds?

Regards,
Tom C

Yes - Install ROS Desktop on your Windows machine and point it to your working ROS Master, GoPiGo3 Node and LIDAR Nodes running on the RPi.

@cyclicalobsessive,

I am unable to paste into the VCN Viewer CLI window from Windows 10 windows. What am I doing wrong?

Regards,
Tom C

Using Windows? No, I’m just being a smart alec. I don’t know.

(I’m copy/pasting to/from RPi tightvncserver <-> Mac Remote Desktop,
and also Mac Running Fusion Virtual Machine Running Windows 10 Running VNC Viewer connected to RaspberryPi Desktop via tightvncserver)

Configuring copy/paste can get a little crazy when using a remote desktop. There are basically two machines trying to interpret what you want, and there are some configuration settings on vncviewer that can block the paste.

First see what works with each copy method (“right mouse copy”, “cntl-c copy”) and with each paste method (“right mouse paste”, “cntl-v paste”).

  • FROM Win10 -> TO RPi
  • mouse copy - mouse paste
  • mouse copy - cntl-v paste
  • cntl-c copy - mouse paste
  • cntl-c copy - cntl-v paste

Then you have to try the other direction:

  • FROM RPi -> TO Win10
  • mouse copy - mouse paste
  • mouse copy - cntl-v paste
  • cntl-c copy - mouse paste
  • cntl-c copy - cntl-v paste

In my vncviewer properties Options: Pass media keys and Pass special keys are checked, and
on the Expert tab: ClientCutText is True SendKeyEvents True, SendPointerEvents True, ServerCutText True, ServerClipboardGraceTime is 1000

@cyclicalobsessive,

Thanks for the suggestions, I will give them a try and will take a look at the properties Options and Expert tab. I looked at those already, but did not know what options to exercise and left them alone.

Regards,
Tom C