Posts
Forward kinematics
If we model a robot as multiple links connected all together through rotating joints we get something like the following figure.
For simplicity the robot is represented with only two links but the following equations could be generalized to robot with more links. The robot is connected to the ground in A which we will define as $(0, 0)$. The length of each link will be represented by $l_1$, $l_2$ and so on.
Posts
Optimizing in BQN
In the previous post I describe how I made a collision checking function between multiple line segments and circles. Here is the code:
Dot β +Β΄βΓ # π©β’nβΏ2βΏ2 π¨β’β¨kβΏ2, kβ© ColSegmentsCircles β { [a,b] β 1βπ© β cβΏr β π¨ β r_squared β rβ2 ca β {π© -β1 c}β1 a β cb β {π© -β1 c}β1 b col β {β¨Β΄β1}β2 r_squaredβ₯β1 DotΛβ1 {π© -β1 c}β1 π© n β (-βΎβ)ββ½Λ b-a d_squared β (2βΛ n {π¨ Dotβ1 π©}Λ ca ) Γ· DotΛΛ b-a col β© col β¨Λ β¨Β΄Λ (0 β₯ ca DotΛΛ cb) β§ {r_squared β₯Β¨ π©}Λ d_squared } This code will be used as the base for the path planners and will be the computation bottleneck.
Posts
Collision checking
I made an RRTConnect path planner but only used an obstacle in the configuration space.
It was convenient for testing the planner but usually we do not know where the obstacles are located in the configuration space. Instead, we observe the obstacles in the robot workspace and they implictly define invalid states in the configuration space. In this post we will begin the work to implement a realistic collision checking function.
Posts
BQN functions and factorization
Disclaimer: I am still a beginner and I may write incorrect things.
In BQN you either define a function as tacit or explicitly within blocks. I mostly code using blocks {} because it is easier to program than tacitly. But once I finish writing my functions, I try to factorize them and, even better, to make them tacit.
In BQN you only have a right argument and sometime a left argument, not more.