No history yet

Robot control and trajectory planing

Welcome! I'm excited to dive into the world of robotics with you.

Before we build our roadmap and start mapping out trajectories, I'd love to learn a little bit about what brings you here.

To help me tailor our session, could you tell me a bit about your background? For example, are you a student, a hobbyist, or working in a related engineering field? Also, what is your primary goal for learning about robot control and trajectory planning?

I'm a hobbyist building my own robot and want to make it move smoothly.

It is great to have you here! Building your own robot is an incredibly rewarding challenge, and wanting to make it move smoothly is the perfect goal to guide us. To get that silky-smooth motion, we first need to understand the master brain behind the movement: Robot Control.

At its core, Robot Control is all about execution and correction. Think of the controller as the robot's inner reflexes. Its goal is to take a specific command (like "rotate this arm by exactly 45 degrees") and continuously adjust the electrical signals to the so the physical robot actually achieves that state, even when dealing with real-world issues like friction, gravity, or carrying a heavy object.

Let's continue to Trajectory Planning and how it differs.

Now let's switch gears to the other half of our smooth-motion puzzle: Trajectory Planning.

While the controller behaves like the robot's reflexes, reacting and correcting in real-time, the is the brain and navigator. Its job is to pre-calculate the master map before the robot even starts to move. Instead of just figuring out where to go, the planner calculates exactly how to get there smoothly over time. It doesn't just look at positions; it carefully charts out the robot's target velocity and acceleration for every millisecond of the journey.

Can you show me a diagram of this?

You've hit on the most important part of making a robot move smoothly: how the brain (the planner) and the reflexes (the controller) talk to each other. Think of the as a mapmaker. It calculates a master mathematical path—not just where the robot should go, but the exact speed and acceleration it should have at every millisecond of the trip. It then passes this highly detailed plan as a reference to the .

To visualize how these systems interact to prevent jerky, sudden motions, let's look at the flow of information across the whole loop:

The control loop flow of a robot, showing the relationship from Planner to Controller, Actuators, Robot, Sensors, and back.

I've started generating that diagram to help you visualize the loop!

Notice how the planner sits outside the feedback loop. It creates the perfect reference trajectory ahead of time. The controller then constantly compares the sensor data against this reference, calculating the exact motor commands to keep the physical robot on the planned path.

Continue to joint space vs. task space

Now that we know how the planner and controller cooperate, let's explore how they actually describe the robot's world. To make your robot move smoothly, we have to look at its movement through two entirely different lenses: Task Space and Joint Space.

The Two Spaces of Robotics

When you want your robot to perform a task—like drawing a straight line on a whiteboard, picking up a mug, or navigating around a table—you naturally think in . This is the physical world as we perceive it. For a robot arm, task space is described using coordinates like (x,y,z)(x, y, z) for its position, along with angles like roll, pitch, and yaw to define how its hand is tilted. If you want a wheeled robot to drive in a perfect circle, you plan that circle's path entirely in task space coordinates.
But your robot's motors do not know what xx, yy, or zz mean. Each motor only cares about its own angle or position. This is , which describes the robot's configuration purely in terms of its individual mechanical joints. If you have a robot arm with three rotating joints, its state in joint space is described by three angles: (θ1,θ2,θ3)(\theta_1, \theta_2, \theta_3). To the robot's physical hardware, moving is just a matter of changing these angles.

This sets up the ultimate coordination challenge: we want to plan smooth, logical paths in task space (so the hand moves in a straight line), but we have to control the motors in joint space.

Before we dive into how we map those two spaces together, does this core distinction between the user's world (task space) and the motor's world (joint space) make sense?