<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dr. Anubhav Dogra on Medium]]></title>
        <description><![CDATA[Stories by Dr. Anubhav Dogra on Medium]]></description>
        <link>https://medium.com/@anubhavdograa?source=rss-98808a0e6002------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*CCg3op-t4-B5uMXX</url>
            <title>Stories by Dr. Anubhav Dogra on Medium</title>
            <link>https://medium.com/@anubhavdograa?source=rss-98808a0e6002------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:48:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anubhavdograa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ROS2 — ROS1 Differences: Notes!]]></title>
            <link>https://medium.com/@anubhavdograa/ros2-ros1-differences-notes-fee048a5c81a?source=rss-98808a0e6002------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee048a5c81a</guid>
            <category><![CDATA[ros1]]></category>
            <category><![CDATA[ros2]]></category>
            <dc:creator><![CDATA[Dr. Anubhav Dogra]]></dc:creator>
            <pubDate>Tue, 31 Dec 2024 14:52:05 GMT</pubDate>
            <atom:updated>2024-12-31T14:52:05.766Z</atom:updated>
            <content:encoded><![CDATA[<h3>ROS2 — ROS1 Differences: Notes!</h3><p>Notes on ROS2 compared to ROS1, while transitioning from ROS1.</p><p>First of all, I am gonna go through a bunch of commands to be used in ROS2 system for performing different operations. Then I will try to dive in some concepts and major changes from ROS1 to ROS2, and how these are beneficial to us! These document may be updated based on progress. For now, its just a rough note!</p><p><strong>Commands: </strong>All commands in ROS1 was with ‘ros’ prefix with no space, such as rostopic, rosnode, rosservice. But in ROS2 it starts in with ros2 <em>command … … … etc.</em></p><pre># topic related<br>ros2 topic list  # or any other command, in ROS 1 it was just rostopic list;<br>ros2 topic list -t # with topic types.<br>ros2 topic echo &lt;topic_name&gt;<br>ros2 topic info &lt;topic_name&gt;<br><br>ros2 interface show &lt;topic_type&gt;<br><br>ros2 topic pub &lt;topic_name&gt; &lt;msg_type&gt; &#39;&lt;args&gt;&#39;<br>ros2 topic pub --once -w 2 &lt;topic_name&gt; &lt;msg_type&gt; &#39;&lt;args&gt;&#39; # -w 2; waiting for two matching subscriptions<br>ros2 topic pub /pose geometry_msgs/msg/PoseStamped &#39;{header: &quot;auto&quot;, pose: {position: {x: 1.0, y: 2.0, z: 3.0}}}&#39;<br>ros2 topic pub /reference sensor_msgs/msg/TimeReference &#39;{header: &quot;auto&quot;, time_ref: &quot;now&quot;, source: &quot;dumy&quot;}&#39;<br><br>ros2 topic hz &lt;topic_name&gt;<br>ros2 topic bw &lt;topic_name&gt; # bandwidth<br><br>ros2 topic find &lt;topic_type&gt;<br><br># node related<br>ros2 node list<br>ros2 node info &lt;node_name&gt;<br>ros2 run &lt;pkg_name&gt; &lt;executable_name&gt; # instead of rosrun pkg_name executable_name<br><br># Service related<br>ros2 service list<br>ros2 service type &lt;service_name&gt;<br>ros2 service list -t<br>ros2 service find &lt;type_name&gt;<br><br>ros2 interface show &lt;type_name&gt; # ros2 interface show std_srvs/srv/Empty<br><br>ros2 service call &lt;service_name&gt; &lt;service_type&gt; &lt;arguments&gt;<br><br>ros2 topic echo /&lt;service_name&gt;/_service_event<br># https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Services/Understanding-ROS2-Services.html#service-introspection<br><br># parameters related<br>ros2 param list<br>ros2 param get &lt;node_name&gt; &lt;parameter_name&gt;<br>ros2 param set &lt;node_name&gt; &lt;parameter_name&gt; &lt;value&gt;<br>ros2 param dump &lt;node_name&gt; # view all of node&#39;s current params<br>ros2 param load &lt;node_name&gt; &lt;parameter_file&gt;<br><br>ros2 run &lt;package_name&gt; &lt;executable_name&gt; --ros-args --params-file &lt;file_name&gt;<br><br># Action related<br>ros2 action list<br>ros2 action list -t<br>ros2 action info &lt;action_name&gt;<br>ros2 interface show &lt;action_type&gt;<br>ros2 action send_goal &lt;action_name&gt; &lt;action_type&gt; &lt;values&gt;<br><br># rqt_console<br>ros2 run rqt_console rqt_console<br>ros2 run pkg node --ros-args --log-level WARN<br><br># launch<br>ros2 launch &lt;pkg&gt; &lt;launch_file&gt;.launch.py<br><br># bag<br>ros2 bag record &lt;topic_name&gt;<br>ros2 bag record -o &lt;bag_name&gt; &lt;topic1_name&gt; &lt;topic2_name&gt;<br>ros2 bag info &lt;bag_file_name&gt;<br>ros2 bag play &lt;bag_file_name&gt;<br><br><br># create package<br>ros2 pkg create # this is equivalent to catkin_create_package<br>ros2 pkg create --build-type ament_cmake --license Apache-2.0 &lt;package_name&gt; # CMake<br>ros2 pkg create --build-type ament_python --license Apache-2.0 &lt;package_name&gt; # Python<br>ros2 pkg create --build-type ament_cmake --license Apache-2.0 --node-name my_node my_package<br><br># Colcon Commands<br>colcon build --symlink-install<br>colcon build --packages-select my_package<br>colcon test # to run tests for packages we built.<br>colcon test --packages-select YOUR_PKG_NAME --ctest-args -R YOUR_TEST_IN_PKG # to run a single particular test from a package:<br>colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug # or Release<br><br># install dependencies for the package, from workspace folder. <br>rosdep install -i --from-path src --rosdistro iron -y<br><br># ros2doctor<br>ros2 doctor<br>ros2 doctor --report<br><br># ROS Components : This is similar to ROS Nodelets in ROS1<br>ros2 component types<br>ros2 component list<br>ros2 run rclcpp_components component_container<br>ros2 component load /ComponentManager &lt;pkg&gt; &lt;namespace::ClassName&gt;<br>ros2 component unload /ComponentManager &lt;id&gt;<br><br># TF2<br>ros2 run tf2_tools view_frames<br>ros2 run tf2_ros tf2_echo [source_frame] [target_frame]<br></pre><h3>Differences:</h3><p>The major difference I noted is in the build system! and the way ROS2 seperate out the cpp and python based packages.</p><h4><strong>Build System</strong></h4><p>It was, <em>catkin_make</em> or <em>catkin build</em> in ROS1. In ROS2, build system is <em>ament </em>and the <em>colcon </em>is the build tool<em>. <br></em>Now on building the source directory, <em>Build, Install (</em>instead of <em>devel), </em>and <em>log </em>directory. <em><br></em><strong><em>colcon build</em> </strong>now also installs the packages. So, for example, if we want to change python files without building every time and run it (as we used to do in ROS1), this can be performed with additional argument, as mentioned in the commands section. <br><strong><em>CATKIN_IGNORE </em></strong>is replaced with<em> </em><strong><em>COLCON_IGNORE<br></em>Overlaying/Underlaying:</strong><br>Same as ROS 1, Example:</p><pre>source /opt/ros/iron/setup.bash<br>source /your_ws/install.setup.bash</pre><p><strong>ROS packages: </strong>Packages are created seperately for cpp and python in ROS2, where as in ROS1, it was possible to mix up in single package. This is based upon build type we choose while creating a new package. <em>Colcon </em>supports multiple build types: <strong><em>ament_cmake, ament_python, ament_cmake_python, cmake.</em></strong></p><h4><strong>ROS Components</strong></h4><p>Compenents are the similar concept of nodelets in ROS1.<br>It is not in control of the thread, so it shouldn’t perform any long running or blocking tasks in its constructor. <br>It can use timers to get periodic notifications. Additionally, it can create publishers, subscriptions, servers, and clients.<br>What I am thinking about using components is that, it could be a good practice for running a set of nodes which work together to achieve a certian task, which may include set of pub/sub nodes, services etc. {I will highlight this section more once I will check it by creating a custom task.}<br>In ROS1, I used to use nodeletes for using PCL filters like VoxelGrid, CropBox filters etc. I guess, similar and much more things can be performed here by customizing use cases.</p><h4><strong>ROS Launch</strong></h4><p>Launch file is now a python file for more flexibility. Launch can also work via XML, or YAML. <a href="https://docs.ros.org/en/iron/How-To-Guides/Launch-file-different-formats.html#python-xml-or-yaml-which-should-i-use">Which one to Use</a>? <br>&lt;file_name&gt;_launch.py needs to be build as well through CMakeLists. <br><strong>Launch file with Python </strong>have much more flexibility and functionality, such as <strong>Substitutions</strong> and <strong>Event Handling.</strong><br>We can Also have seperate launch files by clustering related nodes and its configurations. A top level launch file can be created just to call other launch files.</p><h4>TF2</h4><p>tf2_echo also spits out Transformation matrix along with tranlsation and rotation in Quaternion, RPY (degree and radians)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fee048a5c81a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Skills I earned while pursuing my Ph.D.]]></title>
            <link>https://medium.com/@anubhavdograa/skills-i-earned-while-pursuing-my-ph-d-5c9fd70a72d7?source=rss-98808a0e6002------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c9fd70a72d7</guid>
            <category><![CDATA[phd]]></category>
            <category><![CDATA[skills]]></category>
            <dc:creator><![CDATA[Dr. Anubhav Dogra]]></dc:creator>
            <pubDate>Wed, 11 Sep 2024 19:40:42 GMT</pubDate>
            <atom:updated>2024-09-11T19:40:42.739Z</atom:updated>
            <content:encoded><![CDATA[<p>Just felt like posting it!</p><p>I always wonder about the things I have done or learned during and after my Ph.D. Would it have been possible in some other professions?</p><p><em>Probably Yes Probably No.</em></p><p>May be the trajectory would be different for others. But here I have noted down my experience and learning journey in very different and unexpected domains. Here I am not writing down the specific scientific skills, but the ones that helped in gaining overall personality and confidence to do multiple things.</p><p>Here are the top Common points…</p><ul><li><strong>Increased patience 😇 </strong>for reading more and more! Until you are stuck in learning one thing again and again. 😜Also, we tend to lose 🤯 and calm our mind simultaneously, eventually calming, of course 😅. And that’s how I learned to keep my cool in all situations.</li><li><strong>Analysis 📊</strong> of the state of the art or the current trends: (doesn’t matter if we are handy with the technology, but we get to know how it’s done!)</li><li>Continuous upgrading of <strong>technical skills 🛠🔩🗜🔬</strong> in the subject and surface level knowledge gaining for other related domains.</li><li><strong>Communication 📢📑</strong>(whether speech presentation or written). Ability to speak out in public more confidently and even professionally. Ability to brainstorm and discuss with colleagues.</li><li><strong>Graphical designers</strong> 🖼 (Image editting for figures, my personel preferences are InkScape, and geoGebra. )</li><li><strong>Video editing</strong> 📽📼🎞 (ofcourse) for articles, conferences or your research showcase. I even made some fancy ones for my friends’s wedding invitation (That was exciting 😃!)</li><li><strong>Programming skills: 💻 </strong>I have learned programming languages such as MATLAB, Python, and C++. I was always keeping myself away from programming, I don’t know why!! I wish I could have learned these tools earlier in my life.<strong> <br></strong>This is actually a rapid and concerning current demands of the market. Getting to know new tools for doing different things, for example, these getting handy with AI!, is path to future, I guess.</li><li><strong>IT experts 🔌🖨💿 </strong>Very common example is troubleshooting your own or others computers.</li><li><strong>Management Duties</strong>:👔💼📈📅 In the academic environment, we also automatically learn about management things such as organizing some small events to a big enough events, such as Club based activities, department/university level lecture series, National level workshops/seminars and Conferences! All you need is just active participation.</li><li>Gaining this skill by practice: Solving <strong>complex problems</strong> ‼️ into simple and ✔️ step-up solutions.</li><li>There is plenty of time to work on my hobbies. Specifically, I enjoyed learning and playing guitar! 🎸</li><li>Health conscious, reading health articles, diet articles, food science etc.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c9fd70a72d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PyQt based GUI for ROS applications: Part 1]]></title>
            <link>https://medium.com/@anubhavdograa/pyqt-based-gui-for-ros-applications-part-1-5096ad536449?source=rss-98808a0e6002------2</link>
            <guid isPermaLink="false">https://medium.com/p/5096ad536449</guid>
            <category><![CDATA[roses]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[gui]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <dc:creator><![CDATA[Dr. Anubhav Dogra]]></dc:creator>
            <pubDate>Wed, 21 Aug 2024 15:45:32 GMT</pubDate>
            <atom:updated>2024-09-11T14:37:48.935Z</atom:updated>
            <content:encoded><![CDATA[<p>A simple and much reliable Graphical User Interface tutorial for ROS based applications using Python.</p><p>A graphical user interface is not really a thing for the programmers as we (if I consider myself a programmer 😜) are fascinated by the characters running on terminal window. Keeping commands on tips of the fingers are our achievements! <br>Anyways, jokes apart!<br>Graphical User Interface is a good option when you want to distribute your application for others to use, who are not an expert in the same domain. Also the robot system will be easy to operate rather than typing each and every command in different terminals. One of the benefit follows that it can be an inclusive platform for all your data monitoring/plotting.</p><p>Creating an efficient GUI for a ROS (Robot Operating System) based robot applications involves several steps, i.e., from choosing the right tools and libraries to ensuring that the GUI is responsive and user-friendly. <br>Here’s a structured approach to achieve this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2cTBLQCqD5cbTG2mEZJUw.png" /></figure><ol><li><strong>Understand the Robot Package</strong>: Determine what functionalities the GUI needs to control or visualize (e.g., sensor data, robot state, commands). How your nodes are planned to be executed.</li><li><strong>User Interaction</strong>: Identify how users will interact with the robot through the GUI (e.g., buttons, checkboxes, sliders, input text box).</li><li><strong>Programming Language</strong>: Python is commonly used due to its simplicity and the availability of ROS tools.</li><li><strong>GUI Frameworks</strong>:</li></ol><ul><li><strong>Qt (PyQt)</strong>: Popular for its robust features and integration with ROS via rqt</li><li><strong>rqt</strong>: ROS-specific GUI framework that integrates well with ROS tools and plugins.</li><li><strong>RViz</strong>: For 3D visualization, often used alongside other GUI elements.</li><li><strong>Web-based GUI</strong>: Using frameworks with ROSBridge for web interfaces.</li></ul><p>5<strong>. Install GUI Libraries</strong>: Install the necessary libraries. For example in our case we will build on PyQt</p><p>6. <strong>Design the GUI: </strong>Layouts: horizontal, vertical, grid etc.; Click actions, Status bars, Color changing, etc.</p><p>7.<strong> Create a ROS Node for the GUI</strong>: This node will handle the interaction between the GUI and the ROS ecosystem.</p><p>In this notebook, I will cover some introductory notes to get started:<br>Make sure you have ROS installed and also install PyQt package.</p><pre>pip install PyQt5</pre><p>The basic code block goes like the following, which can added in a ROS package:</p><pre>#!/usr/bin/env python<br><br>import sys<br>import rospy<br>from std_msgs.msg import String<br>from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QLabel, QVBoxLayout, QWidget<br>from PyQt5.QtCore import QTimer<br><br>class RobotGUI(QMainWindow):<br>    def __init__(self):<br>        super(RobotGUI, self).__init__()<br>        self.setWindowTitle(&quot;ROS Robot GUI&quot;)<br>        self.setGeometry(100, 100, 400, 300)<br><br>        # ROS initialization<br>        rospy.init_node(&#39;robot_gui&#39;, anonymous=True)<br>        self.publisher = rospy.Publisher(&#39;/robot_command&#39;, String, queue_size=10)<br>        self.subscriber = rospy.Subscriber(&#39;/robot_status&#39;, String, self.update_status)<br><br>        # GUI elements<br>        self.layout = QVBoxLayout()<br><br>        self.button_forward = QPushButton(&quot;Move Forward&quot;, self)<br>        self.button_forward.clicked.connect(self.send_command_forward)<br>        self.layout.addWidget(self.button_forward)<br><br>        self.button_stop = QPushButton(&quot;Stop&quot;, self)<br>        self.button_stop.clicked.connect(self.send_command_stop)<br>        self.layout.addWidget(self.button_stop)<br><br>        self.status_label = QLabel(&quot;Status: Unknown&quot;, self)<br>        self.layout.addWidget(self.status_label)<br><br>        # Timer for periodic updates<br>        self.timer = QTimer(self)<br>        # self.timer.timeout.connect(self.update_status)<br>        self.timer.start(100)<br><br>        container = QWidget()<br>        container.setLayout(self.layout)<br>        self.setCentralWidget(container)<br><br>    def send_command_forward(self):<br>        command = &quot;MOVE_FORWARD&quot;<br>        rospy.loginfo(f&quot;Sending command: {command}&quot;)<br>        self.publisher.publish(command)<br>        self.update_status(&quot;MOVING&quot;)<br><br>    def send_command_stop(self):<br>        command = &quot;STOP&quot;<br>        rospy.loginfo(f&quot;Sending command: {command}&quot;)<br>        self.publisher.publish(command)<br>        self.update_status(&quot;Stopped&quot;)<br><br>    def update_status(self, msg):<br>        self.status_label.setText(f&quot;Status: {msg}&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    app = QApplication(sys.argv)<br>    gui = RobotGUI()<br>    gui.show()<br>    sys.exit(app.exec_())</pre><p>After running this file, the GUI which is started is shown below.</p><pre>chmod +x gui.py<br>python3 gui.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*AF-sk5CymigRZmejpjWfPA.png" /></figure><p>When you click Stop, see the status changed to Stopped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*HBaZq7vN5JgXeZdpuoQjFw.png" /></figure><p>Now lets understand the key things!</p><p>windows.SetGeometry(100,100,200,200) is used to fix the size of the GUI.</p><p>Layout is set to define the structure of the GUI, basically how each of the elements are arranged in the GUI. There are multiple options for this, such as you can try:</p><p><strong>QVBoxLayout():</strong> This will stack each of element (buttons or checkbox or anything) in a vertical format, same as shown in figure above.</p><p><strong>QHBoxLayout()</strong>: This will arrange the elements in a horizontal row.</p><p><strong>QGridLayout()</strong>: This will arrange the elements in a grid format.</p><p><strong>QPushButton</strong> <strong>QLabel</strong>are the elements for the GUI to be added. The functionality of clicking the button, and what action to do when the button is clicked is done by self.your_button.clicked.connect(self.what_to_do)</p><p>your_layout.addWidget(self.your_button) finally adds it to the GUI layout.</p><p>You can use additional functions such as self.your_button.setFixedSize(200,80) #Increase button size</p><p>self.your_button.setStyleSheet(&quot;font-size:18px&quot;) # Increase font size</p><p>self.your_layout.addWidget(self.your_button, 0, 1) # Place in grid at row 0 and column 1 if you are using QGridLayout()</p><p>Many functionalities can be added within in the callbacks of the buttons, (when clicked). We can publish or subscribe to the topics, best way to run nodes is through the launch files. You might have noticed that if you run two different nodes in the same terminal (from GUI), it will kill the previous node and launches a new one! or it will crash. Here, launch files really help. I will update about this in the next part of this story!</p><p>Now lets see some Checkboxes in our GUI. Checkboxes are great way to start and stop some things. In the case of buttons, you might have to include two of them (one for START, one for STOP), but this makes easier with checkboxes as it has two options: checked or not checked.</p><pre>from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QLabel, QCheckBox, QVBoxLayout, QHBoxLayout, QPushButton, QGridLayout<br># code code code<br># before self.timer... add <br><br>self.switch_layout = QGridLayout()  # dont forget to add QGridLayout in imports.<br><br>self.my_switch1 = self.create_checkbox(&quot;SWITCH1&quot;, self.switch1_action)<br>self.switch_layout.addWidget(self.my_switch1, 0, 0)<br><br>self.my_switch2 = self.create_checkbox(&quot;SWITCH2&quot;, self.switch2_action)<br>self.switch_layout.addWidget(self.my_switch2, 0, 1)<br><br>self.layout.addLayout(self.switch_layout)<br><br># ...... code code code<br><br>def create_checkbox(self, text, callback):<br>        checkbox = QCheckBox(text, self)<br>        checkbox.stateChanged.connect(callback)<br>        return checkbox<br>    <br>def switch1_action(self):<br>    if self.my_switch1.isChecked():<br>        self.update_status(&quot;SWITCH1: ON&quot;)<br>    else:<br>        self.update_status(&quot;SWITCH1: OFF&quot;)<br><br>def switch2_action(self):<br>    if self.my_switch2.isChecked():<br>        self.update_status(&quot;SWITCH2: ON&quot;)<br>    else:<br>        self.update_status(&quot;SWITCH2: OFF&quot;) <br><br># code code code</pre><p>The output looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*waj9e8qB63edbv7cOpGqHQ.png" /></figure><p>Nice !!!</p><p>In the next part, I will include some other functionalities, such as ProgressBar, InputText, SpinBox, Plotwidget etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5096ad536449" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up PREEMPT_RT for Linux when you are not an expert !!]]></title>
            <link>https://medium.com/@anubhavdograa/setting-up-preempt-rt-for-linux-when-you-are-not-an-expert-45b67bdc3a54?source=rss-98808a0e6002------2</link>
            <guid isPermaLink="false">https://medium.com/p/45b67bdc3a54</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Dr. Anubhav Dogra]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 22:00:36 GMT</pubDate>
            <atom:updated>2024-08-06T16:05:52.615Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting up PREEMPT_RT for Linux when you are not an expert !!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_b38u-8E6oiI73m5NGU6Q.jpeg" /><figcaption>https://deepai.org/machine-learning-model/cyberpunk-generator</figcaption></figure><p>After all the trials and errors from various sources, I finally found a smooth, detailed, reliable, and working source! to perform this task (at least for me).</p><p>SHOUT OUT ! to this repo (below), which has provided scripts to perform installation or compilation of the required PREEMPT_RT kernel automatically without much hassle.</p><p>This is actually beneficial when you don’t know much about compiling or installing kernels.<br>The best thing is that it clearly details the concepts of real time, docker, PREEMPT_RT, and support for Nvidia, which you might need for your applications.</p><p>SO just go to this repo and enjoy !!!!!!!!!</p><p><a href="https://github.com/2b-t/docker-realtime/blob/main/doc/PreemptRt.md">docker-realtime/doc/PreemptRt.md at main · 2b-t/docker-realtime</a></p><p>Here’s a Quick go-through:</p><p>First check your current generic kernal version,</p><pre>uname -r</pre><p>because you need to choose the realtime kernel version closer to the current one! <br>For example if 5.15.XX-generic, we will choose 5.15.XX-rt-XX or something closer.</p><p>To get started:</p><pre>cd your_workspace<br>git clone https://github.com/2b-t/docker-realtime.git<br>cd docker-realtime/src<br>chmod +x install_debian_preemptrt<br>chmod +x compile_kernel_preemptrt<br><br>mkdir tmp<br>cd tmp<br>./../compile_kernel_preemptrt</pre><p>When it will run, you will just have to choose the kernel version, and installation mode as debian. <a href="https://github.com/2b-t/docker-realtime/blob/main/doc/PreemptRt.md">Check here</a>!</p><p>Some comments:</p><p>I had to use src/compile_kernel_preemptrt.sh every time to get the real-time kernel.</p><p>In case compilation fails you might need to perform changes in .config file, for example like <a href="https://askubuntu.com/questions/1327749/error-in-compiling-installing-realtime-kernel-on-ubuntu-20-04-2-lts/1338150#1338150">this</a>,</p><p>and for version 6.1.XX, I also had to do <a href="https://stackoverflow.com/questions/76587960/failed-to-install-kernel-modules">this</a> and make changes for the following commands in the file related to compile_kernel_preemptrt in src folder.</p><pre># if you are building kernel version &gt; 6<br>sudo apt install dbhelper<br>sudo make -j$(nproc) bindeb-pkg</pre><p>Adding real-time permissions.</p><pre>sudo addgroup realtime<br>sudo usermod -a -G realtime $(whoami)</pre><p>and then add the following in the /etc/security/limits.conf file.</p><pre>sudo gedit /etc/security/limits.conf</pre><pre>@realtime     soft    rtprio          99<br>@realtime     soft    priority        99<br>@realtime     soft    memlock     102400<br>@realtime     hard    rtprio          99<br>@realtime     hard    priority        99<br>@realtime     hard    memlock     102400</pre><p>After building and installing, check if you have linux-headers… in /usr/src<br>or if you are getting linux-headers…. not found error;</p><p>go to the directory where you have compiled your kernel and then run</p><pre>sudo dpkg -i linux-header&lt;XXX&gt;  #press tab twice for auto-completion! choose rt one!</pre><p>After this, you can also install the nvidia driver as well for rt Kernel as guided in the repo !</p><pre>export IGNORE_PREEMPT_RT_PRESENCE=1<br>sudo -E apt-get install nvidia-driver-XXX # where XXX is the driver version e.g. 535</pre><p>if you already installed nvidia-driver with this command before rt patching.</p><p>Check the names in /usr/src folder and</p><pre>export IGNORE_PREEMPT_RT_PRESENCE=1<br>sudo -E dkms install nvidia/535.XX.XX -k 5.15.XX-rt</pre><p>For more details, please check this.</p><p>This is my quick look back notes for doing the same.</p><p>Cheers !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45b67bdc3a54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modular Serial Robots: Automatic URDF generation.]]></title>
            <link>https://medium.com/@anubhavdograa/modular-serial-robots-automatic-urdf-generation-af5576c4b89e?source=rss-98808a0e6002------2</link>
            <guid isPermaLink="false">https://medium.com/p/af5576c4b89e</guid>
            <category><![CDATA[modular-robotics]]></category>
            <category><![CDATA[robot-manipulation]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[urdf]]></category>
            <dc:creator><![CDATA[Dr. Anubhav Dogra]]></dc:creator>
            <pubDate>Fri, 05 Jan 2024 11:31:51 GMT</pubDate>
            <atom:updated>2024-01-05T11:31:51.466Z</atom:updated>
            <content:encoded><![CDATA[<p>Understand and implement Modular Serial Robots: Generate URDF automatically, adjust assembly parameters and much more!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSF4D_sEuODt313OThJvAQ.png" /></figure><p>Originally published Article by Dogra et. al (2022) in <a href="https://doi.org/10.1016/j.rcim.2022.102385"><em>Robotics and Computer-Integrated Manufacturing</em></a></p><p>Here you can find the <a href="https://github.com/anubhav-dogra/MOIRs-MARK-2-URDF.git">Codes</a> to generate URDF files for the any customized serial robot you desire and visualize in any platform which supports URDFs such as ROS-RViz, MATLAB, CoppeliaSim, etc.</p><p>What you can do ? <br> — Use different joint modules and link modules to create a chain of modules (representing) a serial chain manipulator (Robotic Arm). It can contain ‘n’ number of modules (joint).<br> — Understand the concept of modular robots, or serial robots. Create URDF configuration using either the modular sequence, or using Denavit Hartenbergh (DH) parameters. <br>— Can adust twist angles between each joint modules varying from -135 degrees to +90 degrees using parameters if alpha1 and aplha2 (<a href="https://github.com/anubhav-dogra/MOIRs-MARK-2-URDF/wiki">Check here</a>).<br> — Use the generated URDFs for further kinematics and dynamics evaluations in which ever platform. <br> — Generate Moveit Configuration from the designed URDF.<br> — Generate and Implement Controllers in Simulation. Specific Modules are designed using Kinova Actuators, hence works without a flaw using joint trajectory controllers with Moveit. <br> — and Much More !</p><p>For Citing:</p><blockquote>Anubhav Dogra, Sakshay Mahna, Srikant Sekhar Padhee, Ekta Singla,<br>Unified modeling of unconventional modular and reconfigurable manipulation system,<br>Robotics and Computer-Integrated Manufacturing,<br>Volume 78,<br>2022,<br>102385,<br>ISSN 0736–5845,<br><a href="https://doi.org/10.1016/j.rcim.2022.102385">https://doi.org/10.1016/j.rcim.2022.102385</a>.<br>(<a href="https://www.sciencedirect.com/science/article/pii/S0736584522000722">https://www.sciencedirect.com/science/article/pii/S0736584522000722</a>)</blockquote><p>Thank you reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af5576c4b89e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>