15,030,954 members
See more:
Develop a new prototype cockroach robot.Given the size, position and orientation angle of the robot and obstacle wall define by a line. Estimate the collusion position and distance travelled by simulating the movements of the robot over different time steps

What I have tried:

```#include <iostream>
#include <cstdlib>
#include <vector>
#include <cmath>
#include <string>
#include <omp.h> // Compiler/Linker Options are already set in C::B '.CBP' file

using namespace std;

//Structures and functions
struct point_type
{
double x, y;
point_type();
point_type(double x, double y);
};

struct circle_type
{
point_type position;
circle_type();
};

point_type::point_type()
{
x = 0.0;
y = 0.0;
}
point_type::point_type(double x,double y)
{
this->x=x;
this->y=y;
}

circle_type::circle_type()
{
position=point_type();
}

{
this->position=position;
}```
Posted
OriginalGriff 1-Mar-21 6:18am

And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
Rick York 1-Mar-21 11:35am

OK, you have a point structure and a circle structure. You also have a problem statement. What you do not have is a question. This is really just a trigonometry problem with a little bit of algebra thrown in to calculate positions. You will have to assume the velocity of the robot since it isn't stated.