Monday, September 11, 2017

How to simply merge turtlebot source code into one workspace?

When we are trying to install turtlebot on our own computer, we will follow Turtlebot Installation. In section 1.3 source installation, 1.3.2 workspaces, it simply writes "We are using chained workspaces here, but you could just as simply merge them into one." I have done this several times, but still there are some learner asking me how to do this. So here is a simple step by step tutorial and explanation how we could simply merge them into one workspace.

Let's have a look at the original command lines

> mkdir ~/rocon
> cd ~/rocon
> wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/indigo/rocon.rosinstall
> source /opt/ros/indigo/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make

> mkdir ~/kobuki
> cd ~/kobuki
> wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall
> source ~/rocon/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make

> mkdir ~/turtlebot
> cd ~/turtlebot
> wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall
> source ~/kobuki/devel/setup.bash
> rosdep install --from-paths src -i -y
> catkin_make
This is a very standard way to create three workspaces and compile one by one. -j5 is to define how many threads to do the installation work, so it is not compulsory, however it will speed up the compilation.

Pay attention to the source, if you have some background knowledge about the ROS workspace, the first step source /opt/ros/indigo/setup.bash may be omitted.

Here, every catkin_make should be executed in the right sequence. It is a must to chain the workspaces.

So if we want to merge the three workspaces into one, we should use wstool merge.

> mkdir ~/turtlebot_ws
> cd ~/turtlebot_ws 
> wstool init src https://raw.github.com/robotics-in-concert/rocon/release/indigo/rocon.rosinstall
> wstool merge -t src https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall
> wstool merge -t src https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall
> wstool update -t src
> catkin_make

Some error: multiple packages, I choose to delete kobuki/kobuki_rapps.

Multiple packages found with the same name "kobuki_rapps": - kobuki/kobuki_rapps - rocon_rapps/kobuki_rapps

And delete another two packages: create_gazebo_plugins, kobuki_gazebo_plugins.

Now you should be able to compile successfully.


Wednesday, July 5, 2017

Ubuntu 16.04 Realtek rtl8822be WiFi Problem, No WiFi after Installation

Thanks for the comments. I searched for a Chinese post and have the driver installed.

http://blog.csdn.net/xingce_cs/article/details/76851087 (if you can read Chinese)

Key steps:

sudo apt update sudo apt install git git clone https://github.com/rtlwifi-linux/rtlwifi-next cd rtlwifi-next make sudo make install sudo modprobe rtl8822be
Restart~

20180319 additional info

After some updates, wifi of this poor laptop down again. Check the err msg "RX_FLAG_40MHZ" undeclared, we find Possible issue with new kernels #247, so instead of the original git address, using

git clone https://github.com/synthtc/rtlwifi-next

Same steps after that, build and install. Make sure that your system is up-to-date then proceed. Hope this driver problem can be solved by official release soon..

20181017
if you have met the following err msg

error: ‘NUM_NL80211_BANDS’ undeclared here (not in a function)

https://ubuntuforums.org/showthread.php?t=2382631

check this link and we got

The second can't compile without making a little change in the source code. The change is to add the line
#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS
in two files: 
----in wifi.h after
#ifndef __RTL_WIFI_H__
#define __RTL_WIFI_H__
and before #include lines

---in base.c before #include lines

-----Original Post----------

Seems this is a very common problem. After my fresh installation, good thing is that Nvidia did not give me much problem.

This is time goes to WiFi...

Some people suggest if no wifi when PC awake from hibernation, We could simply restart it.

sudo service network-manager restart
This definitely doesn't work for my case.


Firstly, we need to find out our more details of our wifi adapter.

sudo lshw -class network

Product and vendor: Realtek Semiconductor Co., Ltd. So we should google for corresponding solutions. Skip the post or videos working on Broadcom problems. Because in my Software & Updates dialogue, the Additional Drivers tab, there is no Broadcom items. In my case, only Unknown besides Nvidia.

If your Realtek adapter is rtl8723be, you could follow the steps shown in the video. I tried to follow the steps also.

If you execute

sudo airmon-ng

command not found. Try to install aircrack. Mentioned in the comments.

sudo apt-get install aircrack-ng

Then problem comes. when execute suds arimon-ng, It does not give me any info. Login to windows and checked the type of my realtek is rtl8822be, from the official website we know that this is a 802.11ac/abgn PCIe WLAN with Bluetooth 4.1 Single-Chip Controller.
Seems my rtl8822be is too new to be recognized by the ubuntu system...

Now google
ubuntu 16.04 + "rtl8822" + driver

This time the results are not so off the target.

https://askubuntu.com/questions/926364/how-to-make-my-pci-wifi-card-rtl8822-working-on-ubuntu#

So excited that someone has the same problem on the same brand new HP omen..

Hints from the comments that I should upgrade the linux firmware.

Check this page
https://launchpad.net/ubuntu/+source/linux-firmware/1.161

Ok, it mentioned that
rtl_bt: Add firmware and config file for RTL8822BE
Lets download the .deb and install...

seems the blue tooth is working now but nothing happens to the wifi -_-!

Install linux firmware 1.167, still no wifi.. So do not know what to do and stops here.. waiting for the new official updates.




Tuesday, January 17, 2017

Install Nvidia drivers and black screen issue for Ubuntu 14.04 on a dual graphic cards laptop, on a sole Nvidia desktop, etc

I update the driver to 375.26 and all good. Frustrated. Thank NVidia. It takes me more than half a year to troubleshoot the issue. With Intel graphic card we still can run RViz but hangs in Gazebo and PCL.

----------
nVidia drivers.
should be easier on a desktop but seems many problems for dual graphic cards laptops. Up to now none of the post exactly describes the display problems with my laptop.

Check this first. Before start, be prepared for a shell only environment cos it is easy to crash the graphic user interface.
How to install the latest Nvidia drivers on Ubuntu 14.04 Trusty Tahr

It is important to know the current status of the graphic card
 ~ lspci -vnn | grep -i VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
 Subsystem: Sony Corporation Device [104d:909a]
 Flags: bus master, fast devsel, latency 0, IRQ 30
 Memory at b9000000 (64-bit, non-prefetchable) [size=4M]
 Memory at c0000000 (64-bit, prefetchable) [size=256M]
 I/O ports at 7000 [size=64]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: i915

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 640M LE] [10de:0fd3] (rev a1) (prog-if 00 [VGA controller])
 Subsystem: Sony Corporation Device [104d:909a]
 Flags: bus master, fast devsel, latency 0, IRQ 7
 Memory at b8000000 (32-bit, non-prefetchable) [size=16M]
 Memory at a0000000 (64-bit, prefetchable) [size=256M]
 Memory at b0000000 (64-bit, prefetchable) [size=32M]
 I/O ports at 6000 [disabled] [size=128]
 Expansion ROM at <ignored> [disabled]
 Capabilities: <access denied>

You can see that intel is properly installed but NVidia is not working.

sudo apt-get install nvidia-331
it will automatic install nvidia 340.


black screen. will be freeze, just no display. can here the sound, can change to tty1 by press ctrl alt + f1. did not check whether the display is on another screen. remember last time, there s no display because the main display is by default an external one.

can be rescued by
sudo prime-select intel


Is blacklist nouveau necessary?
Even I have a blacklist.nvidia340 but I still install nouveau drivers...
and the system freeze.
 ~ lspci -vnn | grep -i VGA -A 12
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 640M LE] [10de:0fd3] (rev a1) (prog-if 00 [VGA controller])
 Subsystem: Sony Corporation Device [104d:909a]
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at b8000000 (32-bit, non-prefetchable) [size=16M]
 Memory at a0000000 (64-bit, prefetchable) [size=256M]
 Memory at b0000000 (64-bit, prefetchable) [size=32M]
 I/O ports at 6000 [size=128]
 Expansion ROM at <ignored> [disabled]
 Capabilities: <access denied>
 Kernel driver in use: nvidia




check this post...
https://vxlabs.com/2015/02/05/solving-the-ubuntu-14-04-nvidia-346-nvidia-prime-black-screen-issue/

Three ways to install Nvidia and the way on "F**k Nvidia" begins...

Install from official website fails. 


check the graphic card

if you wanna check whether your laptop is suitable for OpenGL,
/usr/lib/nux/unity_support_test -p
and you will see something like
OpenGL vendor string:   NVIDIA Corporation
OpenGL renderer string: GeForce GTX 660/PCIe/SSE2
OpenGL version string:  4.4.0 NVIDIA 340.96

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       yes
if the unity 3D supported is no, definitely it won't work well.

Some issues related to the graphic drivers, is already in the wiki. And pub key, dpkg lock,

Rather than Nvidia, Google is our best friend forever. Most of the problems can be solved by google and askubuntu forum so will not repeat here. For different hardware settings and different system configuration, just tackle the problem when it happens.

after disable gpu, can enter system but unity_support_test -p

Xlib:  extension "NV-GLX" missing on display ":0".
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  27
  Current serial number in output stream:  28

without gpu, cannot run rviz.

sudo apt-get install nvidia-current-updates
sudo nvidia-xconfig
----------

Again, Nvidia driver problem. on a desktop with sole Nvidia graphic card, gtx1060.

Phenomenon: We can see the welcome screen ,after enter the password, the display blackout and back to the welcome screen again... so it is a deadlock.

Installed 367.XX, cannot be solved. Tried 375, same problem.

When switched to tty1, an error is printed on the screen:

TSSI upper saturation

Ok, I am not sure about this error and google cannot give me much useful info.