Most of our robots are made from rectangular aluminum tube stock. You may hear this referred to as 2x1, 1x1, 2x2, etc., which simply refers to the dimensions of the tube (measured in inches). If another number precedes this name, it usually refers to the wall thickness of the tube. For example, our drivetrains are usually constructed out of 1/8" 2x1 tube stock.
This is the front rail of our drivetrain, highlighted in blue. There are several ways to CAD a piece of tube stock, but one way is much simpler and more efficient than most other methods, which I will explain here. Firstly, create a new part and start a sketch on a plane (you can choose the plane based on where the part will be oriented in the final assembly, but you can also easily rotate parts within assemblies, so only do this if you really want to).
Then, in the sketch, draw a rectangle and dimension it to the profile of your tube stock - e.g. 2"x1", 1"x1", etc. Don't worry about the interior rectangle yet - that is easier to make after the stock is extruded.
Then exit the sketch, select the sketch, select the Extruded Boss/Base tool, and extrude the profile to the length you want. I will set mine to 12" long for the sake of this example.
Finally, to create the hole in the tube stock, select the Shell tool, then select the front and back faces of the tube stock (in this example, the two sides that are 1"x2"). You will have to pan around the tube to select both faces. Then, set the thickness of the tube to the wall thickness you want. I will set mine to 1/8" (0.125"), which means that each face of the rectangle is 1/8" thick.
Then just confirm the shell, and the tube is done! You will still want to add holes to the bar for mounting, but that varies greatly by what will be mounted to the bar and what the bar will be mounted to.