Skip to main content

Posts

ROS Turtle Sim | ROS Noetic Tutorial 3

ROS Turtlesim This post shows you how to run turtlesim in ROS Noetic OS. Perform the TurtleSim simulation in ROS and make the circular movement and square movement of the turtle. Instructions: Step 1: Open a Terminal and   start the roscore  $ roscore Step 2:  Open another Terminal To open turtlesim, give the following command. $ rosrun turtlesim turtlesim_node Open another Terminal $ rosrun turtlesim turtle_teleop_key Open the first Terminal and run the command  $ rosrun turtlesim turtlesim_node Open the Second Terminal, go to your workspace $ cd pradeep_ws/  $ source ./devel/setup.bash $ rosrun ros_tutorial1 circular_movement.py Code: circular_movement.py #!/usr/bin/env python3 # license removed for brevity import rospy from geometry_msgs.msg import Twist def circular_movement_node():     pub = rospy.Publisher('/turtle1/cmd_vel', Twist, queue_size=10)     rospy.init_node('tbsim_driver', anonymous=True)    ...

ns3 installation in Mac M1

Installation of NS3 in Mac M1 Installation of ns-3.42 in Mac M1. This should work for M2 and M3 as well. Prerequisites: ns-allinone-3.42.tar.bz2 software Homebrew or Macports(we use homebrew here) Xcode command line tools Find the video here for more instructions: Here is the installation of homebrew, open a terminal % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"z Give the sudo or admin password to continue The above command will install homebrew from GitHub Set the user profile for which the installation is to be done. (In my case my username is pradeepkumar) % (echo; echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”‘) >> /Users/pradeepkumar/.zprofile Installing Xcode On my machine, I have already installed Xcode, but here is the command to install % xcode-select --install (this might take some time if you run it for the first time.) Installation of python3 and clang Download python3 from the website https://www.python.o...

ROS Publisher and Subscribers | ROS Noetic Tutorial 2

Design a ROS code for the following Scenario:  There are two publishers namely Pub1 and Pub2  and there are three subscribers Sub1, sub2 and Sub3. Pub1 Publishes a topic called \CSE3102 and Sub1 subscribed to it.  Pub2 publishes a topic called \cse2034 and, sub2, sub3 are subscribed to it. Design a python script for ROS and submit the following details.  Method of Execution To begin with, open a terminal and run the following command $ roscore Step 1: Create a folder in the /home/lab21 directory using the command $ mkdir -p pradeepkumar/src $ cd pradeepkumar/ $ catkin_make after the above command, two folders namely build/ and devel/ might have been created. Now we need to set the PATH for this file devel/setup.bash One method is to use, the source command when opening a new terminal every time, the command is $ source /home/lab21/pradeepkumar/devel/setup.bash The second method is to include the command in the /home/lab21/.bashrc file, so that the command will run wi...

Installation of ROS1 Noetic Robotic Operating System in Ubuntu 20.04 OS | ROS Noetic Tutorial 1

Step 1: What We Need: This will mainly work on Ubuntu 20.04 OS  Support till 2025 May. Name of the ROS: Noetic  For the complete installation step-by-step, you can watch the video given below Step 2: Commands Here are the commands to be used one after the other.  $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' $ sudo apt install curl # if you haven't already installed curl $ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - The above commands add the ROS to the aptitude manager and we can now install ROS1 with simple commands $ sudo apt update $ sudo apt install build-essential autoconf automake libxmu-dev $ sudo apt install ros-noetic-desktop-full The above command needs 370MB of software to be downloaded. So the complete package of ROS installed.  We need some more packages to be installed that can create our own workspaces and manage our o...

Installation of ns3 in Ubuntu 24.04 | ns-3.42

Installation of NS3 in Ubuntu  #/ns3 recently released ns-3.42, we are going to see how to install that in #ubuntu 24.04 OS Ubuntu OS also recently released in April 2024. Here are the requirements 1. Ubuntu 24.04 LTS 2. ns-allinone-3.42.tar.bz2 (Download the above software from https://www.nsnam.org/releases/ns-allinone-3.42.tar.bz2 and store it in the home folder (In my case it is /home/pradeepkumar/ folder) This #installation will work for ns-3.38, ns-3.39, ns-3.40, and ns-3.41 as well. Open a New Terminal The first command to do is (You can just copy paste the following in your terminal window) $ sudo apt update $ sudo apt install g++ python3 cmake ninja-build git gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 tcpdump wireshark sqlite sqlite3 libsqlite3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools openmpi-bin openmpi-common openmpi-doc libopenmpi-dev doxygen graphviz imagemagick python3-sphinx dia imagemagick texlive dvipng...