Raspberry Pi is freezing since CPU usage reaches 100 while installing ROS - makefile

I am trying to install ROS on Raspberry Pi 3 (Raspbian Jessie).
After invoking following command, I realized that Raspberry Pi is freezing and it is not responding anymore-
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo
I tried to power it off and re-run the above command. However, it got stuck again on the same line. I also tried to use CLI but got in vain. Please see below a picture-
Please see below the output of top command-
Any workaround, please? I want to use ROS Indigo on Raspberry Pi.

Your system is running out of memory. Even your swap is full. You can solve this issue in multiple ways:
Use less jobs to build your application by adding the option --jobs 1 as explained here
Close other memory hungry applications during your build process
Increase the swap partition like so

Related

Can't run Fuchsia components with shell

So I am trying to get started developing on Fuchsia and I wanted to get the hello world component to run. However, following these steps doesn't work for me. I'm using core.qemu-x64 running on an Ubuntu 20.04 VM with Virtual Box. I have gotten the emulator to run with fx qemu -N but fx vdl start -N hasn't worked for me.
I run fx serve-updates but it just outputs "Discovery..." and never changes. Then I try to run fx shell run fuchsia-pkg://fuchsia.com/hello-world-cpp#meta/hello-world-cpp.cmx but it says "No devices found." It seem like this shouldn't be an issue because with Linux the device finder should automatically pick it up. Regardless I tried following the MAC instructions and setting the device with fx set-device 127.0.0.1:22. That just makes the run command say "ssh: connect to host 127.0.0.1 port 22: Connection refused". I also tried to set it to the device to the nodename outputted by the fx qemu -N command which is "fuchsia-####-####-####" but that just makes the run command say no devices are found again.
I have verified that I actually have the hello-world packages with the fx list-packages hello-world which outputs all the hello-world packages as expected.
Is there any way I can get the device to be discoverable by the shell command? Alternatively, can I run components like the hello-world component from the qemu emulator directly?
Please let me know if I can provide any additional information.
I guess I just wasn't patient enough. I assumed the emulator was done getting setup because it stopped giving console output and it allowed me to input commands but it seems I just had to wait longer. After 50 minutes of the fx qemu -N command running, the terminal that had fx serve-updates going finally picked up the device. Then I was able to execute the hello world component. It would be nice if the documentation at least gave an idea of how long the different commands would take before they'd be usable.

Gazebo stuck at loading your world

https://i.imgur.com/hYf1Bes.jpgm
I am trying to set up ROS and Gazebo in a VM running Ubuntu.
The goal is that I want to simulate Turtlebot with the open manipulator.
I installed everything without any issues.
Though I am not able to launch the Turtlebot environment on Gazebo (like here: http://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/)
$roslaunch turtlebot3_fake turtlebot3_fake.launch
results in Gazebo staying forever in the state loading your world. After some time, it stops responding.
Launching the empty world however works.
I am using ROS 1 with Gazebo 7.0
My hardware setup:
MacBook Pro 13" 2019 with 16 GB RAM
Parallels VM: 3D virtual. ON, no performance limit, 4 CPU kernels, 12 GB RAM enabled
Thank you so much for your help.
After every change you made source your bash and make sure to run :
catkin make
if you've done this already then check if ros is installed properly by running
roscore
on one terminal and let it stay running.
After that try to launch your turtlebot on another terminal.
If it doesnt work even you have installed all of the needed things, i think the problem is with your VM, id recommend you to run ROS on Ubuntu running USB Stick.
cd ~/.gazebo/
mkdir models
cd models/
wget http://file.ncnynl.com/ros/gazebo_models.txt
wget -i gazebo_models.txt
ls model.tar.g* | xargs -n1 tar xzvf
try this gazebo try to download to packages that's why it waits u need internet for that this may take few mins

Install "perf" on Mac

I need the "perf" utility to monitor the program on my Mac. I know linux comes with it, but is it available on Mac?
I am working on a OSX 10.9 Mavericks and tried "port search" for perf or linux-tools, but I couldn't get any results.
As #Sami Laine said in his comment, the Linux perf tool is dependent on Linux specific code. It relies on the perf_event_open system call which is not standardized.
Note: Maybe you could search how MacOSX users are using recent hardware performance counters.
Instruments app
On macOS you can use the Instruments application to profile your code.
I like to use the "Time Profiler" which will show you how much time your application is its various parts during execution. I haven't used perf myself, but from talks/videos that I've seen this seems to be the most common use.
To use the "Time Profiler":
Run Instruments, select Time Profiler
At the top left, select your target (executable).
Hit the Record button on the top left and let it run for a little
while.
Pause or Stop the execution and drill down on your calls in the main
window.
Hope this helps.
On OSX you can use sample together with filtercalltree.
Both have useful help text if you run them without commands, but an example invocation to sample process id 1234 for the default 10 seconds at 1ms resolution would be something like:
sample 1234 -f output.prof
filtercalltree output.prof
Once you've generated your call graph, FlameGraph is another great tool for visualizing it, and it supports sample call graphs via the stackcollpase-sample.awk script.
Check out Google Perf Tool
If you dont have brew installed:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
If you have brew installed:
brew install google-perftools
Reference: https://github.com/gperftools/gperftools

Docker base image running slowly Mac OS X

So I have docker set up on OS X by using boot2docker. I have everything working, however, when I run docker run -i -t base /bin/bash it works, the prompt shows up... but it is EXTREMELY slow. By slow, I mean that if I would type one character, it takes about 30 seconds to a minute for that character to show up on the screen. I checked my Activity Monitor to make sure my system wasn't low on memory but that was not the case. It was showing around 85% of idle memory while this process was running. I was curious to see if anyone else on OS X was experiencing issues like this. Any input would be appreciated.
I've experienced the very same problem and as Julian already stated, it's a known issue. But, there is one post in that issue-thread that worked for me (well, at least an adapted version of it).
./boot2docker stop # stop a currently running deamon-instance
./boot2docker delete # remove the vm
rm -rf boot2docker.iso # in my case I had a (very old) iso-image
At this stage any new attempt to re-initialize the boot2docker-vm failed for me. So I was forced to re-install boot2docker itself (and as it turned out I had a very old version). You can do this via Homebrew or with the new installer (whereas, the solution demonstrated in the docker-docu doesn't work anymore). In any case, don't forget to set the DOCKER_HOST variable correct as explained in the documentation:
export DOCKER_HOST=tcp://127.0.0.1:4243
After re-installing boot2docker the following commands should work again:
./boot2docker init # fetches a brand new vm image and initializes
./boot2docker up # now we're back in business
That did it for me - now the performance is as expected
 docker run -i -t --rm dockerfile/ubuntu /bin/bash
gives me an (almost) instant bash-prompt.

Problem with GCC allocated memory on VPS

I am trying to install a python module on my VPS and am running into the following problem once I try to run the install:
virtual memory exhausted: Cannot allocate memory
error: command 'gcc' failed with exit status 1
I tried a few things that I read online to try to solve this but have yet to have any luck. I spoke with a friend at work, and he said that a common way to get around this on a VPS was to alias GCC with mySQLd since VPSs will typically allow more virtual memory for mySQL.
So, my question is: how does one alias GCC with mySQLd and then switch it back?
For reference, I am running CentOS.
I recently had the same issue while compiling PHP5 on a virtual server. The way I finally solved it was to add more swap space by creating a swap file; see http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html for instructions. You may also need to raise vm.max_map_count by running /sbin/sysctl -w vm.max_map_count=[ENOUGH], where [ENOUGH] is a magic number for which I do not have a good recommendation. However, you can check it first (/sbin/sysctl vm.max_map_count) and base your guess on that.
And please congratulate your co-worker on his creativity! :)

Resources