Limiting Force/Speed of Footbot

Requests regarding how to set up experiments in ARGoS.
DrLeopoldStrabismus
Posts: 6
Joined: Mon Jun 13, 2016 6:47 pm

Limiting Force/Speed of Footbot

Postby DrLeopoldStrabismus » Mon Sep 26, 2016 4:32 pm

I'm looking for any constant limit on footbot speed or velocity, and how to retrieve them programatically.

The closest I can find is a FOOTBOT_MAX_FORCE defined in dynamics2d_footbot_model.cpp::25, which is then passed to the m_cDiffSteering CDynamics2DDifferentialSteeringControl object. I can't find anywhere down the chain where this constraint is applied to velocity control.

How can I programatically retrieve the maximum velocity of a footbot? If no method exists, what would be a sane constraint?

Thanks in advance.

ahyoussef
Posts: 13
Joined: Sat Sep 03, 2016 3:15 pm

Re: Limiting Force/Speed of Footbot

Postby ahyoussef » Mon Oct 03, 2016 9:34 pm

Hello Dr

I might not be the best to help out, but from my usage to footbots, there is the Max Speed attribute that then could be used to clip the speed if it exceeds in the setWheelSpeedFromVector function. there is a line that clip the speed to the min of the current speed or the max speed

Code: Select all

Real fBaseAngularWheelSpeed = Min<Real>(fHeadingLength, m_sWheelTurningParams.MaxSpeed);
hope this is what you are looking for, if i were to fix the speed i'd just override the above line and set the speed to the max speed to be like below

Code: Select all

Real fBaseAngularWheelSpeed = m_sWheelTurningParams.MaxSpeed;
the sample is from the flocking example and foraging as well.

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

Re: Limiting Force/Speed of Footbot

Postby pincy » Sat Oct 08, 2016 1:53 am

Hello DrLeopoldStrabismus,
The closest I can find is a FOOTBOT_MAX_FORCE defined in dynamics2d_footbot_model.cpp::25, which is then passed to the m_cDiffSteering CDynamics2DDifferentialSteeringControl object. I can't find anywhere down the chain where this constraint is applied to velocity control.
FOOTBOT_MAX_FORCE is indeed one of the variables that limits the force that the foot-bot can exert. This is enforced internally by the Chipmunk physics library.

The foot-bot is made of an "actual body", which is the body that effectively collides with stuff, and a "control body" managed by the differential steering model component. The two bodies are connected by a Chipmunk joint for translation and one for rotation. When you set the speed on the control body, the joint transforms this into forces applied on the actual body - this way the dynamics of the robot is simulated correctly.

These maximum forces tell you how much force the joint can sustain before "snapping", that is, before exerting no force anymore.
How can I programatically retrieve the maximum velocity of a footbot?
You can't, it's something that is hardcoded in the model. This can obviously change if people need to use this value - it just never occurred that someone would ask :)
If no method exists, what would be a sane constraint?
The maximum speed of a real foot-bot is about 20 cm/s, but for best controllability 10 cm/s is a good upper value.

Cheers,
Carlo
I made ARGoS.

DrLeopoldStrabismus
Posts: 6
Joined: Mon Jun 13, 2016 6:47 pm

Re: Limiting Force/Speed of Footbot

Postby DrLeopoldStrabismus » Thu Oct 13, 2016 9:50 pm

As always, thank you for your help. I wanted to make sure I couldn't exceed a max speed if I ordered the footbots to travel over it.

Also, in case anybody is wondering, I'm not a real Dr. This name is just from a novel I like :)


Return to “How to... ?”