Sunday, August 5, 2018

VSCode tips for ROS

Tip1 - Adding a file extension to a language

You can add new file extensions to an existing language with the files.associations setting, for example assign gazebo .world file to XML

"files.associations":{
 ".world": "xml"
}


Tip2 - use code runner to check urdf files

code runner:  Run code snippet or code file for multiple languages
  • install 'Code runner' extension into vscode 
  • install check_urdf (apt-get install liburdfdom-tools)
  • from settings append file extension into code runner mapping
"code-runner.executorMapByFileExtension": { 
".urdf": "check_urdf"

Tip3 - use code runner to check xacro files

ROS node xacro in package xacro convert xacro  file to urdf

rosrun xacro xacro <file_name.xacro>

The idea is to run the above command redirect the output to tmp file and then run check_urdf on it.

"files.associations":{
".xacro": "rosrun xacro xacro --inorder $fullFileName > /tmp/tmp.urdf && check_urdf /tmp/tmp.urdf"
}


code runner supported parameters
  • $workspaceRoot: The path of the folder opened in VS Code
  • $dir: The directory of the code file being run
  • $dirWithoutTrailingSlash: The directory of the code file being run without a trailing slash
  • $fullFileName: The full name of the code file being run
  • $fileName: The base name of the code file being run, that is the file without the directory
  • $fileNameWithoutExt: The base name of the code file being run without its extension

Monday, July 30, 2018

ROS in 5 mins

A series of 5 minutes (or more) videos about  different topics in ROS from "The Construct"

023 - Understanding ROS Coordinate Frame (Part 1 /2)

coordinate frames convention , linear and angular motion
Which X are forward, which direction are positive rotation

110 - How to launch two drones on a Single Gazebo Simulation

Show you how you can launch two drones (or more) in the same Gazebo simulation, each one having its own independent control system based on ROS. This procedure can be replicated to launch as many drones as required.

044 - How to convert quaternions to Euler angles

The following example can help you understand how to use the conversion from quaternions provided by an Odometry message to Euler angles Roll, Pitch and Yaw.

135 -How to rotate a robot to a desired heading using feedback from odometry

Rotate our robot based on data from odometry. We will subscribe to /odom topic to get the heading of our robot, process it, and then send a command over the
/cmd_vel_mux/input/teleop topic.

070 - Moving Joints in Gazebo Simple Example

Create URDF, add the ros control plugin, and include a config file to configure the plugin. launch and send commands (see README.md)

 

Install NVIDIA driver on ubuntu

Automatic Install using standard Ubuntu Repository

Detect the nvidia model and the recommended driver

 $ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001180sv00001458sd0000353Cbc03sc00i00
vendor   : NVIDIA Corporation
model    : GK104 [GeForce GTX 680]
driver   : nvidia-304 - distro non-free
driver   : nvidia-340 - distro non-free
driver   : nvidia-384 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin 
 
install recommended driver by running
 
$ sudo ubuntu-drivers autoinstall
 
rboot and check
 
the easiest way to check 
Settings -> Details -> about  


resource
How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux  

VSCode ROS extensions

List of nice VSCode extensions helping work with ROS

Special for ROS

Common but useful
  • Python (link)
  • XML Tools (link)
  • YAML Support by Red Hat (link)


Good ROS Tutorials



Here is a list of good ROS tutorials that i done


This project is about using a Two Wheeled Mobile Robot to explore features and tools provided by ROS (Robot Operating System). We start building the robot from the scratch, using URDF (Unified Robot Description Format) and RViz to visualize it. Further, we describe the inertia and show how to simplify the URDF using XACROS. Later, motion planning algorithms, such as Obstacle Avoidance and Bugs 0, 1 and 2 are developed to be used in the built robot. Some ROS packages, like robot_localization, are used to built a map and localize on it.
My source code
5 golden tutorials


My source code

Gaitech EDU is an educational website on robotics and in particular on Robot Operating System (ROS). The objective is to provide an easy-to-follow educational content that helps in better mastering the concepts of ROS and promoting its use for developing robotics software

Tuesday, August 30, 2016

buildroot qemu ARM

build embedded system for qemu and ARM with buildroot (buildroot-2016.05)

use qemu_arm_versatile_defconfig config file as base config
$make qemu_arm_versatile_defconfig

changed nothing
$make

run
$qemu-system-arm 
-M versatilepb 
-kernel output/images/zImage 
-dtb output/images/versatile-pb.dtb 
-drive file=output/images/rootfs.ext2,if=scsi,format=raw 
-append "root=/dev/sda console=ttyAMA0,115200" 
-nographic 
-net nic,model=rtl8139 -net user

can be replace with:
-hda=output/images/rootfs.ext2


-M Set the emulated machine type
-kernel 
-dtb device tree image
-drive block device option
-append kernel command line /-drive/
-nographic disable graphical output and redirect serial I/Os to console

execution command taken from:
buildroot-2016.05/board/qemu/arm-versatile/readme.txt

Wednesday, July 22, 2015

nohup vs &




reference
http://stackoverflow.com/questions/21294283/when-did-hup-stop-getting-sent-and-what-can-i-do-about-it
http://stackoverflow.com/questions/4298741/how-bash-handles-the-jobs-when-logout
http://stackoverflow.com/questions/15595374/whats-the-difference-between-nohup-and-ampersand
http://www.astro.washington.edu/users/sjschmidt/premap/linux/processes.html