Gazebo | Ignition | Community
Ask Your Question

How to make robot move autonomous ?

asked 2016-12-18 23:43:33 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am using ROS indigo and gazebo 7 and new to this area. I have gone through some tutorials from gazebosim website where I found diff_drive robot. It is for to move robot according to x y z values. I want to make that autonomous. Can you help me with that that how can I move robot some meters and then take right or left turn. I am using hokuyo laser model. I want to move robot left or right when the laser sense that the object is 1 meter away. I guess i need c file for this but i don't know where to find the file and how to use this c file.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-19 10:20:06 -0500

chapulina gravatar image

The common way of controlling models in gazebo is using model plugins, which are written in C++. This tutorial gives a simple introduction to model plugins.

A nice example which might be worth looking into is the diff drive robot in the beginner tutorials. That shows you how to create a robot from scratch and use a plugin to make it follow the closest object, sensed by a depth camera (not a laser scanner like you want). By this point you won't need to write any C++ code and will be using existing plugins.

After you go through that tutorial and get the robot follower working, you can start looking into the C++ code controlling its behavior and modify it for your use case. Here's where you can find the files:

Have fun! And feel free to ask more specific questions on this site if you get stuck anywhere.

edit flag offensive delete link more


Thank you for your help. I want to make swarm robotics in gazebo. and i wanted wifi plugin but it is not available. I found transreceiver and transmitter files but has diff models. Is there 802.11 card available , so I can make robot sense the RSSI value and calculate the distance. after getting the distance robot should move away form each other. Can you tell me how should I start?

brijesh gravatar imagebrijesh ( 2016-12-20 14:19:24 -0500 )edit

I don't have any experience using these sensors. You'll have better luck starting a new question about that.

chapulina gravatar imagechapulina ( 2016-12-20 19:13:46 -0500 )edit

Thank You for your suggestion. I used follower plugin and robot starts moving when I put object in front of it. but robot does not start moving when launch my model using roslaunch. what changes i have to make to make robot move directly after starting the simulation.

brijesh gravatar imagebrijesh ( 2016-12-22 12:02:18 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-12-18 23:43:33 -0500

Seen: 3,091 times

Last updated: Dec 19 '16