Robotics StackExchange | Archived questions

How to follow line using camera placed on a moving vehicle

Hi,

I want to do line following, I am using camera sensor which is been placed on a moving vehicle using worldPlugin and I have to track line using camera. I was using follow camera , but it is not following the line model. How can I do line following using camera attached on a moving vehicle? Is their any tutorial which can help me tracking line using moving camera?Any suggestions would highly be appreciated. Thanks!

Here is my code

public: void OnUpdate(const common::UpdateInfo & /_info/)

{

      this->model->SetLinearVel(math::Vector3(0.4, 0, 0));

      this->camerap->SetActive(true);

     gui::Events::follow(this->model1->GetName());
     gui::Events::follow(this->model2->GetName());
}

Asked by anonymous on 2015-04-23 06:08:33 UTC

Comments

The event you're using will make the user camera (the one through which you see the scene) follow the given model; it's equivalent to right-clicking a model and selecting Follow. Following a model means that the camera will try to keep the whole model in sight while the model moves. This means that the camera can only follow one entity at a time, so in your code, it would end up zooming on model2 and moving whenever the model moves.

Asked by chapulina on 2015-04-23 11:53:59 UTC

Could you please follow up on your previous questions instead of opening a new one, it makes it tedious for others to gather the information. And most likely people are less willing to answer your questions.

Asked by ffurrer on 2015-04-24 04:13:12 UTC

Ohk I am sorry for the inconvenience.....I opened a new question because i thought this question is different from the previous one because it is related to line following using camera and previous one was more on how to draw lines. Anyway ill keep this in my mind while opening a new question. Thanks!

Asked by anonymous on 2015-04-24 04:25:58 UTC

Answers

Ohk, so is it possible to differentiate between color intensities of ground model and line model using moving camera? I am actually confused how can I follow line in gazebo because magnetic sensors are not available in gazebo and rest only laser and camera sensor are left for line following and I tried with laser sensor but it was quite difficult. can you suggest anything? Thanks!

Asked by anonymous on 2015-04-24 00:54:23 UTC

Comments