Skip to content

QMcCloud/Yoshi_cpp-py_movement

Repository files navigation

a README file (PDFs welcome!) describing your approach in reactor to analyzing /ir_intensity and the "control" scheme that you used to steer it

A quick descriptio of the Reactor member function We first make a subscriber to listen to the IR intensity topic with a callback function of ir_callback.

We also make a publisher to send a twist message to the cmd vel topic. The pub_cmd_vel_callback is called by the timer to publish the robot's twist command every 0.25 seconds.

In order to analyze the ir intensity values, we map them into a list.

We then sum the left and right sides of ir intensity values.

we compare the left and right values to determine if the robot should turn right or left.

the turn rate is then scaled down and squished with a sigmoid function.

With the turn rate now within the range ±1 we use it to determine the forward rate such that the turn and forward rates form a pseudo unit vector.

Lastly we set the robot's twist turn rate and forward rate rescaled up to the max allowed values, and log the values and twist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages