Robot acceleration

Requests regarding how to set up experiments in ARGoS.
jtrautmann
Posts: 9
Joined: Thu Jan 30, 2020 11:29 am

Robot acceleration

Postby jtrautmann » Tue Feb 18, 2020 11:54 am

Hey,

I'm using Argos to learn path planning by machine learning. For this I'm using the Foot-Bot with the dynamics2d physics engine in simulation, but in reality I'm using the TurtleBot3. I got most of it working, but I've got one problem: the learning algorithm learns to rotate the robot very much, which seems to work good for the Foot-Bot but not for the TurtleBot3, because he rotates far too much for the same rotation command. After looking at many things and thinking about it, my guess is that the robot in simulation has a lower acceleration than the TurtleBot3. So I went searching where exactly the acceleration is defined in the simulation and for this I searched where the motion is applied to the robot, but after nearly 2 days of searching I didn't really find it. I just found that it probably happens when the CPhysicsModel::UpdateFromEntityStatus gets called by CDynamics2DEngine::Update, but I don't really know where.

So my question is: Where does the motion application happen exactly and is there a way to change the acceleration in the simulation or can I at least get the acceleration somewhere to adapt the commands sent to the TurtleBot3 in reality? Or is my only possibility to model the TurtleBot3 robot in the simulation?

Thank you very much in advance!

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Robot acceleration

Postby pincy » Wed Feb 19, 2020 9:58 pm

If you type

Code: Select all

$ argos3 -q dynamics2d
you find this section:

Code: Select all

For the the robots that use velocity-based control, such as ground robots with the differential_steering actuator (e.g. the foot-bot and the e-puck), it is possible to customize robot-specific attributes that set the maximum force and torque the robot has. The syntax is as follows, taking a foot-bot as example: <arena ...> ... <foot-bot id="fb0"> <body position="0.4,2.3,0.25" orientation="45,0,0" /> <controller config="mycntrl" /> <!-- Specify new value for max_force and max_torque --> <dynamics2d> <differential_steering max_force="0.1" max_torque="0.1"/> </dynamics2d> </foot-bot> ... </arena> The attributes 'max_force' and 'max_torque' are both optional, and they take the robot-specific default if not set. Check the code of the dynamics2d model of the robot you're using to know the default values.
This said, I should really include the TurtleBot3 in ARGoS. I'll see if I can take some time to do it in May.
I made ARGoS.

jtrautmann
Posts: 9
Joined: Thu Jan 30, 2020 11:29 am

Re: Robot acceleration

Postby jtrautmann » Tue Feb 25, 2020 9:12 am

Thank you for your answer! Unfortunately, this wasn't the solution. But it turned out the controller from Tensorswarm which I was using didn't set the speed for the wheels correctly. It considered the distance between the wheels and the wheel radius, but there was a constant which had to be multiplied with the wheel velocities. I don't really know why, but now it works.


Return to “How to... ?”