C++

Converting sensor_msgs::PCLPointCloud2 to sensor_msgs::PointCloud and reverse

 

Converting sensor_msgs::PCLPointCloud2 to sensor_msgs::PointCloud and reverse Read More »

Controlling your robot with joystick and reading data from it

First, install the necessary package:

make sure your joystick is working:

also, make sure your controller has correct permissions:

The permission on the last column must be rw, if it “–” like this:

then correct the permission:

run the Joy node and roscore:

The joystick data are being published under

Controlling your robot with joystick and reading data from it Read More »

Making occupancy grid map in ROS from gazebo with Octomap

Here is an example of obtaining occupancy grid from sensory data of turtlebot robot. 1.First you need to install all dependencies for gazebo and turtlebot and  octomap server:

2. Launch gazebo in a simulated environment:

3.Launch RVIZ to view the published data

3.Move your robot via keyboard:

to learn how to move the robot with

Making occupancy grid map in ROS from gazebo with Octomap Read More »

Sample based-optimisation-based planner with signed distance fields cost map

Rapidly-exploring random trees (RRT) and their variant are a very power solution for solving motion planning problem in robotics, but they suffer from finding an optimise solution and the generated path is usually jerky with redundant movements. Sample based-optimisation-based planners benefit the robustness of RRT and the possibility of imposing a cost function. Here in this work, I

Sample based-optimisation-based planner with signed distance fields cost map Read More »

Solving of optimisation problem with evolutionary algorithm (LM-CMA-ES)

Limited-Memory CMA-ES (LM-CMA-ES)  is a variation of CMA-ES which has been tailored for large-scale optimisation with limited memory. As a warm up here, I have used this algorithm to solve the min point of the following function: $$ z= -( 4 \times  e^{- ( (x-4)^2 +(y-4)^2 ) }+ 2 \times e^{- ( (x-2)^2 +(y-2)^2 ) } )$$ The function

Solving of optimisation problem with evolutionary algorithm (LM-CMA-ES) Read More »

Lucas–Kanade method optical flow with MATLAB

In this tutorial, I will show you how to estimate optical flow based on Lucas–Kanade method.  This project has the following scripts: Optical_flow_estimation, myFlow, myWarp, computeColor, flowToColor. The myFlow does the main job, it gets two images and a window length (patch length) and a threshold for accepting the optical flow.  In the following, you see the myFlow.  You can uncomment figure function calls

Lucas–Kanade method optical flow with MATLAB Read More »

Send CMake param to catkin

It quite often happens that you need to send a CMake parameter to your catkin project, for instance, you need to build your code for debugging mode. The correct syntax is:

another example:

read more: http://wiki.ros.org/catkin/Tutorials/using_a_workspace  

Send CMake param to catkin Read More »