Comments (5)
Hi Alan,
gotop(l,a) takes a vector in a polar coordinate system and computes a control input that will drive the robot to this desired vector. It is more like a set point that you give the robot and it applies a control input depending on this setpoint. The velocity of the robot is determined by two things: 1. Max velocity that you specify in your argos file (https://github.com/ilpincy/argos3-kheperaiv/blob/master/src/testing/testbuzzexperiment.argos#L38) and 2. the length of the vector that you pass in as the set point. The velocity of the robot increases with the length of the vector that you give the goto function and the velocity is clamped to the max velocity of the robot (meaning, the vectors that requiring the robot to move over the max velocity will cause the robot to move at max velocity). In your case, you are giving the gotop function a vector of magnitude zero and hence the robot should never move, you can notice the robot moving with increasing velocity as you increase the length of this vector.
Furthermore, I noticed that you are referring to 1 step as 1 second, this totally depends on the number of ticks that you have in your .argos file. Ideally, we use the ticks per second to be 10 (https://github.com/ilpincy/argos3-kheperaiv/blob/master/src/testing/testbuzzexperiment.argos#L10), which means that each step is 100ms and you will have 10 ticks per second. if you set this to be 1 then you will have 1 step = 1 second.
I hope this clarifies your doubt.
If you have further questions, feel free to contact me.
-Vivek
from buzzkh4.
Thank you Vivek, I was just trying to rotate the robot, not moving it to any other position. And I did change seconds per tick to 1 because I wanted to know how exactly gotop works.
And I think I understand that first argument of gotop is linear-speed which is limited by a max velocity that I assumed is 20 cm/s. The reason I used 0.0 as linear-speed was to make the robot rotate in the same position. Or is there something I'm still not getting about linear-speed? Maybe the robot won't rotate with zero linear-speed, or would do it erratically.
I still don't understand why the robot didn't rotate as expected, and that was just one of other similar test cases I used that didn't adjust to expected rotation of the khepera-iv.
from buzzkh4.
The way the implementation works is that you provide a vector and this vector is used to compute the wheel actuator commands. A vector with magnitude 0 is a null vector and will obviously result in no movement according to the implementation.
You will have to provide a non-zero value to the first argument to apply your angular speed.
from buzzkh4.
Thank you Vivek, my problem seems to be that I always think of these robots as agents in NetLogo and they can turn left or right without moving, just rotating, that is why I find this api non-intuitive. But I'll have to learn! Thank you for your patience.
from buzzkh4.
You are right, actual robots have limitations, and the more limitations you include in your simulations, the more close it will be to a real setting. The robots that you use in argos do not include all the limitations of a real robot but it is fairly close to reality, if you have something working here, it will most likely work in a real setting.
One more thing, if you feel you are not comfortable with using this goto function, you can always implement your own function that takes in velocities and sets the wheel actuation. You can set the wheel speed using set_wheels(lws,rws).
from buzzkh4.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buzzkh4.