Robotics StackExchange | Archived questions

How to solve Segmentation fault (core dumped) when rviz on raspberry pi 2?

As title , how could I solve segmentation fault when rviz?

image description

My raspberry pi 2 img is using ubuntu 14.04 with ros indigo.

I tried to rmove ros-indigo-ros-model and git clone from github to my catkin workspace. (https://github.com/ros/robot_model)

Here is my steps.

sudo apt-get remove ros-indigo-robot-model 
cd ~/catkin_ws/src 
git clone https://github.com/ros/robot_model.git 
cd ~/catkin_ws
catkin_make 
source devel/setup.bash
rospack profile

But it just works on tegra tk1 not on raspberry pi 2.

Thanks, Alyson

Asked by YingHua on 2016-01-07 10:18:56 UTC

Comments

Answers

From http://wiki.ros.org/indigo/Installation/UbuntuARM

"Using RVIZ

It is not recommended to run rviz on most ARM-based CPUs. They're generally too slow, and the version of OpenGL that is provided by the software (mesa) libraries it not new enough to start rviz.

'IF' you have a powerful board with a GPU and vendor-supplied OpenGL libraries, it might be possible to run rviz. The IFC6410 and the NVidia Jetson TK1 are two such boards where rviz will run, although neither is fast enough for graphics-heavy tasks such as displaying pointclouds.

Note that rviz will segfault if you have the GTK_IM_MODULE environment variable set, so it's best to unset it in your ~/.bashrc:"

Asked by nickw on 2016-01-07 10:34:35 UTC

Comments

Do you mean raspberry pi 2 can't use rviz? but github group shows this problem has been solved recently.

http://answers.ros.org/question/222862/raspberry-pi-2-rosberrypi-vs-ubuntuarm/?comment=223080#post-id-223080

https://github.com/ros/robot_model/issues/110

Asked by YingHua on 2016-01-07 11:07:47 UTC

I just don't know how to do and what are the steps to solve it. :(

Asked by YingHua on 2016-01-07 11:08:53 UTC

The page linked to has instruction, missed off copying it
add unset GTK_IM_MODULE to your .bashrc file You may be able to get it to run, but performance is likely to be poor, as detailed in that quote - tegra is much more powerful, especially for graphics with better openGL implementation

Asked by nickw on 2016-01-07 11:38:46 UTC

I do add unset GTK_IM_MODULE to ~/.bashrc but it doesn't work. https://goo.gl/9EA2X4

Asked by YingHua on 2016-01-08 03:20:26 UTC

I would suspect that ubuntu on the pi has less optimisation for the graphics of the board compared with raspbian. You might get rviz to run on that, but i think it will be disappointing performance even if you do get it to launch

Asked by nickw on 2016-01-08 04:08:51 UTC

YingHua: You found the fixed bug--did you apply one of the two fixes? Either you upgrade libpcre3 or you upgrade collada-dom to the versions containing the fixes. It should fix the segmentation fault right away.

Asked by dchang0 on 2016-01-09 01:57:07 UTC

@dchang0 ok!I will try to upgrade collada-dom. I tried to upgrade libpcre3,it still shows segmentation fault.

Asked by YingHua on 2016-01-10 00:41:17 UTC

Upgrading libpcre3 to 8.35 definitely fixed the segmentation fault for me. You should not have to upgrade collada-dom if you did upgrade libpcre3 to high enough a version. It is an "either or" fix.

Asked by dchang0 on 2016-01-10 01:11:33 UTC

@dchang0 ahm....I guess what you mean is if I have already upgrade libpcre3 to the newest version I were fix the error. Is that right? If it is, I have already upgrade to the newest, it still shows segmentation fault.

Asked by YingHua on 2016-01-10 22:26:27 UTC

I found your question on github.( https://github.com/ros-visualization/rviz/issues/955 ) Are you using ordoid-c1?

Asked by YingHua on 2016-01-10 22:27:53 UTC

Correct, upgrading libpcre3 should be enough; you would not need to upgrade collada-dom, although it would not hurt to upgrade both. Yes, I am using an ODROID-C1+, which is also an ARM architecture like the Raspberry Pi 2 Model B. They both use the armhf ports packages of Ubuntu.

Asked by dchang0 on 2016-01-10 22:46:03 UTC

You can follow the general debugging steps that I went through on the ODROID C1+ at that link you found to troubleshoot your specific error. It is possible that you are experiencing some other error than the one that was already fixed by upgrading libpcre3 on the Raspberry Pi.

Asked by dchang0 on 2016-01-10 22:59:49 UTC

While it is true that the ODROID C1+ is not the same as the Raspberry Pi 2 Model B, note that the libpcre3/collada-dom fix was written for the NVidia Jetson TK1, yet it worked on the ODROID C1+. Do not assume that just because you have an RPi none of these fixes apply to you.

Asked by dchang0 on 2016-01-10 23:09:20 UTC

I met this question. The reason is that I used the version of ros-indigo-base. When I use the ros-indigo-desktop instead of it, I can use the rviz.

Asked by xuminzero on 2016-01-27 08:37:02 UTC

Comments