ROS Noetic Ninjemys Basics – Part 1 of 2

In this tutorial, we will explore the basics of ROS Noetic Ninjemys (ROS Noetic), the latest distribution of ROS.

ROS has a steep learning curve. I remember when I first started learning ROS, my head was spinning. There was all this new vocabulary you have to learn: nodes, packages, subscribers, publishers, etc. It was like learning some obscure foreign language for the first time.

To get the most out of ROS, I recommend going through Part 1 and Part 2 of this tutorial. My advice to you is to not worry if everything seems complicated and doesn’t make sense. Don’t worry if you can’t understand how any of these abstract concepts connect to a real-world robot. 

ROS is built in such a way that you need to work through the boring basics before you can use it to develop actual robotics projects. You have to walk before you learn how to run.

After you work through the basics of ROS, you’ll start applying those basics to actual robotics applications using ROS. It’s at that point that all that abstract stuff that you will learn below will come together and finally make sense. 

If you start to build robots with ROS without learning the basics of ROS, you’ll get super confused. It would be like trying to go to a foreign country and trying to speak their language without ever having learned basic words and phrases.

ROS doesn’t allow you to skip steps in the learning process. You have to build your knowledge of the basics of ROS, brick by boring brick, in order to use it to build fun robots that solve real-world problems.

So be patient in the learning process, and I assure you that you’ll master ROS and will be building cool robots in no time.

Without further ado, let’s get started!

Prerequisites

ROS Noetic Ninjemys Tutorial – Part 1 of 2

When you’ve finished the tutorials above, go on to Part 2.

How to Install ROS Noetic Ninjemys on Ubuntu Linux

In this post, we will install ROS Noetic Ninjemys. As of the date of this tutorial, ROS Noetic Ninjemys is the latest ROS distribution that has long term support. It will be supported until May 2025.

You Will Need

In order to complete this tutorial, you will need:

Directions

The official steps for installing ROS are at this link at ROS.org, but I will walk you through the process below so that you can see what each step should look like.

Select Noetic Ninjemys on this page.

Next, select your platform. I am using Ubuntu, so I will click on the Ubuntu option.

1-land-on-this-pageJPG

Now we need to configure our repositories to allow “restricted”, “universe,” and “multiverse.

Click the 9 white dots at the bottom left of your screen.

2-click-the-9-white-dotsJPG

Search for Software & Updates. Then click on it.

3-search-for-software-and-updatesJPG

Make sure main, universe, restricted, and multiverse are all checked. Then click Close.

4-all-checkedJPG

Now open up a new terminal window, and type (or copy and paste) the following command:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
5-type-the-following-commandJPG

The command above sets your computer up to accept software from packages.ros.org. 

Now we need to set up the secure keys so that our system accepts what we are going to download. 

Type or copy & paste the following command.

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Now, update the package list. This command makes sure you have the most recent list of software packages that can be installed in your Linux system.

sudo apt update

Now do a full desktop install of ROS. The command below installs all the software, tools, algorithms, and robot simulators for ROS.

sudo apt install ros-noetic-desktop-full

After you type the command and press Enter, press Y and hit Enter when asked if you want to continue. It will take a while to download all this stuff, so feel free to take a break while ROS downloads to your system.

6-press-y-to-continueJPG

Set up the environment variables. These variables are necessary in order for ROS to work.

Type the following commands, one right after the other. We are using Bash, so this is what we type:

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Check that the environment variables are properly set up. Type the following command:

printenv | grep ROS

Here is what you should see:

7-what-you-should-seeJPG

Let’s also check our .bashrc file to see if the “source /opt/ros/noetic/setup.bash” line was added to it successfully.

gedit .bashrc

There it is at the bottom of the .bashrc file.

8-there-it-isJPG

Now, let’s create a ROS workspace.

A workspace is a folder that contains other folders that store related pieces of ROS code.

The official name for workspaces in ROS is catkin workspaces. The word ‘catkin’ comes from the tail-shaped flower cluster found on willow trees (see photo below) — a reference to Willow Garage, the original developers of ROS. 

All the ROS software packages that you create need to reside inside a catkin workspace. The name of this catkin workspace can be anything, but by convention, it is typically called catkin_ws.

Open a new terminal window, and type the following commands, one right after the other.

First create the workspace.

mkdir -p ~/catkin_ws/src

Move inside the workspace.

cd ~/catkin_ws/

Build the workspace.

catkin_make

You should now have a build, devel, and src folder. Type this command to see those:

dir
9-build-devel-srcJPG

Now, source the new setup.*sh file. This is a file that makes sure your workspace is recognized in your ROS environment.

source devel/setup.bash

Let’s add this code to the .bashrc file so that we don’t have to run it everytime we open a new terminal window.

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

We can check to see if that was set up properly by typing this command:

echo $ROS_PACKAGE_PATH
10-setup-properlyJPG

Finally, let’s launch a program to do a final check everything is set up properly. We will launch a simulation of a turtle.

Open a new terminal window, and type this command:

roscore

Open a new terminal tab, and type this command:

rosrun turtlesim turtlesim_node

Here is what you should see:

11-check-the-installationJPG

Congratulations. You have installed ROS!

From here, you can go check out the basics of ROS Noetic Ninjemys. If you’re already familar with ROS, it is often helpful to go through these tutorials to refresh the basics.

Keep building!

Creo Parametric 6.0 Quick Start Guide

If you’re an absolute beginner to Creo Parametric, this tutorial is your guide. We’ll go step-by-step through the most common functions you’ll use again and again as you work with Creo Parametric for your design work. By the end of this tutorial, you’ll know how to create the animated part below.

mechanism_basics_creo_parametric_optimized

Creo Parametric is a powerful 3D modeling CAD software program that is used by engineers all over the world. Without further ado, let’s get started!

Table of Contents

Prerequisites

How to Sketch a Rectangle in 2D

Open Creo Parametric.

Close any pop up windows that might appear.

Select your desired working directory.

2-click-newJPG

Click OK on the window that pops up once you’ve selected your desired working directory.

Click New.

Select Sketch.

3-select-sketchJPG

Click OK.

Go to File -> Options -> Sketcher.

Under “Accuracy and Sensitivity” change the Number of decimal places for dimensions to 3 (I like to use 3 decimal places).

Click OK.

Click No at the prompt.

4-click-no-at-the-promptJPG

Click the small arrow next to Rectangle on the Sketch tab on the top of your screen.

5-small-arrowJPG

Select Center Rectangle.

Click a point anywhere.

Drag to create a rectangle.

Click another point to create the rectangle.

Click the Select button to stop creating rectangles.

6-select-buttonJPG

Double-click on one of the dimensions in order to alter it. In this case, I will make both the length and the width equal to 10.000.

7-my-rectangleJPG
8-length-and-width-equal-to-10JPG

The little green squares indicate the constraints. For example, the green square with the black line indicates that the corresponding side of the square is exactly horizontal. Likewise, the sides are vertical. 

To shift the view on the screen, you hold down the Shift key on your keyboard while holding down the middle mouse button (or pressing the scroll wheel on your mouse). It is a bit awkward, but it is what it is.

Similarly, to rotate the object in your view, hold down the Ctrl key on your keyboard while pressing the middle mouse button (or pressing the scroll wheel on your mouse).

You can move the position of the dimension labels (e.g. the 10.000 markets) but click on them and dragging them to where you want them to be.

To save your rectangle, go to File -> Save and then click OK.

Return to Table of Contents

How to Sketch a Circle in 2D

Let’s add a circle to our sketch.

Click the arrow next to Circle.

9-arrow-next-to-circleJPG

Select Center and Point.

Click where you want the center of the circle to be.

Drag your mouse outward to increase the size of the circle.

Click the Select button when done.

Return to Table of Contents

How to Delete a Segment

In order to make our figure a complete solid, we need to delete a segment. 

Click Delete Segment in the upper right.

10-delete-segmentJPG

Click and drag your mouse over the segments you want to delete. In my case, I deleted one half of the circle we just created.

When you are done, click Select (or hit your scroll wheel button somewhere on the canvas away from the sketch you’re creating).

To modify the radius of the circle we’ve created, click on the radius number that is labeled with an ‘R’.

11-new-sketchJPG

You can choose any number. I’ll select 2.000.

12-radius-of-2JPG

Return to Table of Contents

How to Create a Hole

Let’s create a circle within the circle we created. 

Click the arrow next to the Circle button. 

Hover over the center of the original circle you created and click.

Drag your circle to your desired dimensions then click Select.

The diameter of my inner circle is 1.943.

13-then-click-selectJPG

To save what we have so far, go to File -> Save or click the Save icon at the top-left of the window.

Return to Table of Contents

How to Create a New Part in 3D Using Extrude

To create a new part, click on File -> New.

The default selection for Type is Part and Solid for Sub-type. These are fine.

Uncheck the Use default template checkbox.

14-file-newJPG

Click OK.

Select your units. Creo Parametric enables you to choose a variety of predefined systems of units. 

I’ll select mmns_part_solid. mmns means millimeter Newton second, where all lengths are in millimeters, force will be in Newtons, and time will be in seconds.

16-mmns-part-solidJPG

Click OK.

What you see in front of you are three different planes: RIGHT, TOP, and FRONT. These are the three dimensions that your part design will be limited to.

In Creo Parametric, the defaults are:

  • RIGHT = YZ plane
  • TOP = XZ plane
  • FRONT = XY plane
17-three-different-planesJPG

Let’s select the FRONT plane by clicking on it. This is your standard XY plane in the Cartesian Coordinate system.

18-cartesian-coordinate-system

Click the Extrude button.

18-extrude-buttonJPG

Click the Sketch View button to flatten the sketch. The Sketch View button is on the small toolbar above the sketch. 

19-sketch-view-buttonJPG
20-sketch-viewJPG

Click File System in the upper-left part of the screen.

Select the file we’ve been working on so far and click Open.

Click in the middle of the screen to place the sketch.

21-originJPG

Move it to the center of the x-y reference lines by clicking the circle in the middle and dragging it to the origin.

Up top on the bar, you can scale the image to 1.000. To the left of the green checkmark you should see a white box. Put 1.000 in this box, and then click the green checkmark.

22-scale-imageJPG

Now press OK again.

23-click-okJPG

Hold down the middle mouse button (or scroll wheel) while moving your wrist in order to rotate the object and see it in three dimensions.

24-part-in-3dJPG

Change the Depth to 2.000.

25-change-the-depthJPG

Click OK.

26-now-we-have-our-imageJPG

Save it by going to File -> Save or clicking the Save icon at the top-left of the window.

To examine the dimensions of the part, click on Extrude 1 on the left side of the window.

Press Ctrl + E or click the Edit Definition button.

Click Placement -> Edit.

Click the Sketch View icon on the small toolbar to flatten the sketch. You can see the dimensions.

Now click OK.

Click OK again.

That’s it.

Return to Table of Contents

How to Create Additional Parts

Go to File -> New.

27-additional-partJPG

Select Part, Solid, and uncheck ‘Use default template’. You can enter any File name you would like.

Choose mmns_part_solid and click OK.

Click on Extrude.

Click Placement -> Define.

28-placement-defineJPG

Click on the Right plane.

Click Sketch.

29-click-sketchJPG

Click the Sketch View button to flatten the plane.

Click the arrow next to the Circle button.

30-arrow-next-to-circleJPG

Select Center and Point.

Click in the origin of the plane and spread your circle out to your desired dimensions.

31-spread-circle-outJPG

Click Select.

Change the diameter to 2.000. You do that by double-clicking on the current number and entering in your desired diameter.

Click OK.

Change the Depth to 20.000.

32-change-depth-to-20JPG

Click OK.

33-3d-partJPG

If you’re unable to find your part, you can always put it inside the view using the magnifying glass on the left side of the small toolbar.

34-magnifying-glassJPG

Return to Table of Contents

How to Modify an Extruded Part

Right now, all we have is a cylinder. Let’s make our cylinder a nail. To do that, we need to add a head to the cylinder.

Click Extrude again.

Select a surface. I’ll select the circle.

35-surface-selectionJPG

Click the Sketch View button.

Click the arrow next to the Circle button.

Click Center and Point.

Click your mouse in the center of the circle and spread it out.

Ensure your circle has a diameter of 4.000.

36-diameter-of-4JPG

Click OK.

Change the depth to 2.000.

37-change-depth-to-2JPG

Press OK.

Voila! Rotate the image, and you can see we have created a nail.

38-nailJPG

Let’s save the part. Go to File -> Save, and click OK.

Return to Table of Contents

How to Create an Assembly

Go to File -> New.

Select Assembly -> Design.

Uncheck ‘Use default template’.

Click OK.

39-create-an-assemblyJPG

Select mmns_asm_design.

40-mmns-asm-designJPG

Click Assemble in the upper-left part of the window.

41-click-assembleJPG

Find the part you just created and click Open.

42-find-part-click-openJPG
43-part-we-just-createdJPG

Where it says “Automatic,” select “Default.”

44-select-defaultJPG

Click OK. Here is what you should now see.

45-click-okJPG

Click on Assemble again.

Open the circle-rectangle combination part we created at the start of this tutorial.

46-open-the-partJPG

Change the drop-down from Automatic to Coincident.

47-select-coincidentJPG

Click on a part of the long cylinder.

Drag your mouse to the surface of the hole on the circle-rectangle plate.

You see that the nail is now inside the hole.

48-new-assemblyJPG-1

Let’s make the distance from the circle-rectangle plate to the nail head 5.00.

49-distance-5JPG

Click the surface of the plate.

Rotate the assembly, and click the nail surface.

Change the distance to 5.000.

50-brought-closerJPG

Go to File Save.

Return to Table of Contents

How to Create Drawing Views

Go to File -> New.

51-new-assemblyJPG

Uncheck ‘Use default template’.

Click OK.

52-use-default-templateJPG

Change the paper size to A4.

53-change-paper-size-to-a4JPG

Click OK.

Click on General View -> OK.

Click somewhere within the drawing.

54-click-somewhereJPG

On the pop up window, select Standard Orientation.

Click Apply.

Click OK.

Click the Drawing Model button.

Click Add Model.

Select the circle-rectangle plate part.

Click Open

Click Done/Return.

Click General View.

Select No Combined State.

Click OK.

55-click-general-viewJPG

Change Custom Scale to 2.000.

56-custom-scaleJPG

Click Apply.

Click on the part.

Click on Projection View.

57-projection-viewJPG

Click somewhere outside the part.

To turn the axis off, click on the axis button on the small toolbar, and click “Select All.”

58-turn-off-axisJPG

To delete the scale label, click on it and hit delete.

Click on the part again.

Click Projection View.

Edit the definition.

Click View Display, and change the Display style to ‘Hidden.’

59-apply-hiddenJPG

You can do the same for another of your parts, and select ‘No Hidden’. Here are the results of that.

60-no-hiddenJPG

Return to Table of Contents

How to Annotate Dimensions on a Drawing

To add dimensions to a drawing, click the Annotate tab.

Click Dimensions.

Click on a side of the part, and see the dimensions.

61-check-dimensionsJPG

Here is our drawing so far.

62-here-drawingJPG

Return to Table of Contents

How to Export a Drawing as a PDF File

Go to File -> Save As -> Export.

Select pdf.

63-select-pdfJPG

Click Export.

Click OK.

Your PDF will pop up.

Close Export Set Up.

Return to Table of Contents

How to Use Mechanisms

Mechanisms in Creo Parametric enable cool animations.

At the top-left of your window, there is a small arrow that enables you to change windows. Go to the assembly .ASM file.

64-asm-fileJPG
65-asm-fileJPG

On the left-hand side, select the circle-rectangle plate part, and click the Edit Definition icon (or type Ctrl+E).

67-circle-rectangle-partJPG
68-edit-definitionJPG

Click Placement.

Right-click on Coincident.

Click Delete.

Right Click on Distance.

Click Delete.

69-delete-distanceJPG

Go to User Defined dropdown menu, and Select Pin.

Click the arrow on the circle-rectangle plate that is parallel to the nail and hold down your mouse. 

Slide the plate off the nail.

70-slide-off-nailJPG

Click the interior hole of the circle-plate combination.

71-nail-shaftJPG

Drag the cursor to a point on the nail cylinder (i.e. shaft). We have now connected the two surfaces.

72-connect-surfacesJPG

Now click on the flat part of the circle-rectangle plate, and connect that surface to the surface of the nail head that faces the plate.

In the dropdown menu, select Distance.

Change Distance to 20.000.

Now change to 15.000.

74-change-to-15JPG

Click OK (the green check).

75-click-okJPG

Click the Applications tab.

Click Mechanism.

76-click-mechanismJPG

Click the Servo Motors tab.

77-click-servo-motorJPG

Click Profile Details.

Select Velocity in the dropdown menu.

Change Velocity to 10 mm/sec.

78-change-velocityJPG

Now click on the part.

Press OK.

Click on Mechanism Analysis.

Change End Time to 100.

79-change-endtime-to-100JPG

Click Run to run the animation. Here is what you should see:

mechanism_basics_creo_parametric_optimized-1

You can exit when you want to.

Regenerate the model in order to rebuild the changes you have just made.

Click Save.

You can exit the software.

That’s it!

What I have shown you is a quick taste of some of the things Creo Parametric enables you to do. There is much more functionality than what we’ve gone through, but you now have experience with the basics.

Keep building!

Return to Table of Contents