nagarjunvinukonda / Dynamic-Obstacle-Tracker-and-Avoidance-ORCA

This package is modified for tracking humans and small moving obstacles for tracking velocity, radius, and position
50 stars 5 forks source link

How to visualize ORCA lines? #4

Open Sivasankar-Ganesan opened 3 years ago

Sivasankar-Ganesan commented 3 years ago

How to visualize the ORCA lines when I am using two robots A & B?

nagarjunvinukonda commented 3 years ago

Hi Sivasankar,

Thanks for reaching out.

In order to understand how ORCA lines are formed programmatically, you need to check on the function called " Agent::computeNewVelocity()" avaible on Agent.cpp. And no.of ORCA lines formed depends on no.of agents around you. Which is found using function "const Line &RVOSimulator::getAgentORCALine(size_t agentNo, size_t lineNo) const".

If you want to visualize it, you need to use the Eigen library and OpenCV for generating markers along the ORCA lines vector. You can modify the agent.cpp in order to visualize them.

I hope this solves your problem.

Please feel free to contribute to this project and provide pull requests to merge them.

Sivasankar-Ganesan commented 3 years ago

Is it possible to use the Rviz Visualization marker along the ORCA lines vector?

nagarjunvinukonda commented 3 years ago

I guess you can do that. You need to create a subscriber which subscribes a set of ORCA lines from all the obstacles around it to publish in Rviz as a topic.

But, when you do that, make sure to comment"forwardSimulationPosition()" in test_sim.cpp. Because this function uses OpenCV to identify the proxemics in Rviz and provide velocity profiles. If this is not commented, the function may confuse the pixel values of markers as proxemics and leads to error.

You can also create ORCA lines visualization in Gazebo instead of Rviz. This might give a better view of ORCA lines formation for dynamic Obstacles. Since Rviz is considering only static obstacles.

Sivasankar-Ganesan commented 3 years ago

Thanks for your information.