Hi,

I am trying to rotate the robot at 180 degree on single step of simulation out of three buttons.

What do you mean by "out of three buttons" ?

But robot only move maximum of 30 degree at each time step. The code is given below:

Code: Select all

```
Real fLeftWheelSpeed, fRightWheelSpeed;
fLeftWheelSpeed = m_sWheelTurningParams.MaxSpeed;
fRightWheelSpeed = -m_sWheelTurningParams.MaxSpeed;
m_pcWheels->SetLinearVelocity(fLeftWheelSpeed, fRightWheelSpeed);
```

This code does not contain the algorithm with which you choose the speeds. How do you calculate them?

I want to achieve the goal, when i press the one step of simulation then my robot should move its wheels at 180 degree. While robot should not change its position but only wheels should move at desired angle.

If I interpret what you say correctly, you want the robot to rotate on the spot by 180 degrees in one time step. While this is not realistic at all (a time step is typically 1/10 of a second, and no motor will ever give that much speed in such a short time!), a possible way to do this is by using the differential steering model:

http://rossum.sourceforge.net/papers/DiffSteer/.

To rotate by an angle

*A* in

*T* seconds, you need to attain a rotational speed of

*A*/

*T*. Since you want to rotate on the spot, you need to set both wheel speeds to the same absolute value

*V*; however, one wheel will be set a positive speed, and the other a negative one.

From the differential steering model, you obtain the following equation:

*A* /

*T* = (

*V* - (-

*V*)) /

*B*
where

*B* is the distance of the two wheels. For the foot-bot,

*B* = 14cm (see

https://github.com/ilpincy/argos3/blob/ ... entity.cpp).

Reworking the above equation, we get:

*V* = (

*A* *

*B*) / (

*2* *

*T*)

Plugging in the values you wanted,

*A* = 3.14 rad and

*T* = 0.1 sec, you get

*V* = 219.8 cm/sec, that is, more than 2 m/s. For a real application this value is ludicrous, so I would suggest you to try a more realistic behavior.

Also, notice that the above reasoning does not consider the natural noise in wheel actuation. You can see the effect of wheel noise in ARGoS with this syntax:

Code: Select all

```
<controllers>
...
<my_controller ...>
...
<actuators>
...
<differential_steering implementation="default"
noise_std_dev="1" />
...
</actuators>
...
</my_controller>
...
</controllers>
```

where noise_std_dev is the standard deviation of the Gaussian noise applied to the ideal wheel speed you set with SetLinearSpeed().

Cheers,

Carlo

I made ARGoS.