I am able to locate centroids of each blocks, but i am unable to join two blocks with a line segment by avoiding the obstacle as shown in the figure. Please need help how do i achieve this using matlab.

  • $\begingroup$ If you want programming help, you should include sample code (especially your world definition). Also, we are assuming that this is a robot navigation problem, but you should state this if it is the case--otherwise, there are very simple algorithms that can connect the centroids while avoiding the obstacle. $\endgroup$ – JSycamore Jul 6 '16 at 21:30

Sorry I do not know. But following course has your needed info

Some course can register while not running. Some need wait for run time.

Low-level motion (PID, point a to b) https://www.coursera.org/course/conrob.

High level path planning https://www.edx.org/course/tumx/tumx-autonavx-autonomous-navigation-1658

part 1 and of of this, https://courses.edx.org/courses/SNUx/SNU446.345.1x/1T2014/info

Fly https://www.edx.org/course/tumx/tumx-autonavx-autonomous-navigation-1658

  • $\begingroup$ okay so can you tell me, how to join two blocks with a line segment, ignoring the obstacle, i mean how can i draw a straight line between two blocks. $\endgroup$ – Naba Das Aug 3 '14 at 17:34
  • $\begingroup$ Block_1 x0,y0 Block_2_Robot x1,y1,speed,angle_of_movement (by robot sterling wheel as in 4 wheels car or differential drive for 2 wheel robot) $\endgroup$ – EEd Aug 3 '14 at 17:39
  • $\begingroup$ as this diagram, where robot is, where to go and what angle to go. intechopen.com/source/html/9117/media/image36.png $\endgroup$ – EEd Aug 3 '14 at 17:47
  • $\begingroup$ Am having difficulty with the coding part in matlab. I want to join the robot with the block by a line segment and then i want to move the robot by using the line segment as the reference point. $\endgroup$ – Naba Das Aug 3 '14 at 17:53

Have you tried the line() function, which plots a straight line on a figure?

You do something like

hold on
line(X, Y);

Check help line for details.

  • $\begingroup$ ya i did, but actually i am unable to do so, can you please provide me a sample code. $\endgroup$ – Naba Das Aug 5 '14 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.