<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tutorials &#8211; Robohub</title>
	<atom:link href="https://robohub.org/category/education/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://robohub.org</link>
	<description>Connecting the robotics community to the world</description>
	<lastBuildDate>Mon, 05 Oct 2026 00:51:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Integrated Task and Motion Planning (TAMP) in robotics</title>
		<link>https://robohub.org/integrated-task-and-motion-planning-tamp-in-robotics/</link>
		
		<dc:creator><![CDATA[Sebastian Castro]]></dc:creator>
		<pubDate>Fri, 16 Sep 2022 16:18:54 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://robohub.org/?p=205525</guid>

					<description><![CDATA[In the previous post, we introduced task planning in robotics. This field broadly involves a set of planning techniques that are domain-independent: That is, we can design a domain which describes the world at some (typically high) level of abstraction, using some modeling language like PDDL. However, the planning algorithms themselves can be applied to [&#8230;]]]></description>
										<content:encoded><![CDATA[<img fetchpriority="high" decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_6-1024x576.jpg" alt="" width="1024" height="576" class="alignnone size-large wp-image-205526" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_6-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_6-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_6-768x432.jpg 768w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_6.jpg 1058w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>In the previous post, we introduced <a href="https://roboticseabass.com/2022/07/19/task-planning-in-robotics/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">task planning in robotics</a>. This field broadly involves a set of planning techniques that are <em>domain-independent</em>: That is, we can design a domain which describes the world at some (typically high) level of abstraction, using some modeling language like <a href="https://planning.wiki/guide/whatis/pddl" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDL</a>. However, the planning algorithms themselves can be applied to <em>any</em> domain that can be modeled in that language, and critically, to solve <em>any</em> valid problem specification within that domain.</p>
<p>The key takeaway of the last post was that task planning is ultimately <em>search</em>. These search problems are often challenging and grow exponentially with the size of the problem, so it is no surprise that task planning is often <em>symbolic</em>: There are relatively few possible actions to choose from, with a relatively small set of finite parameters. Otherwise, search is prohibitively expensive even in the face of clever algorithms and heuristics.</p>
<p>Bridging the gap between this abstract planning space and the real world, which we deeply care about in robotics, is hard. In our example of a mobile robot navigating a household environment, this might look as follows: Given that we know two rooms are connected, a plan that takes our robot from room A to room B is guaranteed to execute successfully. Of course, this is not necessarily true. We might come up with a perfectly valid abstract plan, but then fail to generate a dynamically feasible motion plan through a narrow hallway, or fail to execute a perfectly valid motion plan on our real robot hardware.</p>
<p>This is where <strong>Task and Motion Planning (TAMP)</strong> comes in. What if our planner spends more effort <em>deliberating</em> about more concrete aspects of a plan before executing it? This presents a key tradeoff in more up-front computation, but a lower risk of failing at runtime. In this post we will explore a few things that differentiate TAMP from “plain” task planning, and dive into some detailed examples with the <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim</a> and <a href="https://github.com/caelan/pddlstream" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a> software tools.</p>
<h2>Some motivating examples</h2>
<p>Before we formalize TAMP further, let’s consider some tricky examples you might encounter with purely symbolic planning in robotics applications.</p>
<p>In this first example, our goal is to pick up an apple. In purely symbolic planning where all actions have the same cost, there is no difference in navigating to table0 and table1, both of which have apples. However, you will notice that table0 is in an unreachable location. Furthermore, if we decide to embed navigation actions with a heuristic cost such as straight-line distance from the starting point, our heuristic below will prefer table0 because it’s closer to the robot’s starting position than table1. </p>
<p>It wouldn’t be until we try to <em>refine</em> our plan — for example, using a motion planner to search for a valid path to table0 in the unreachable room — that we would fail, have to update our planning domain to somehow flag that main_room and unreachable are disconnected, and then replan with this new information.</p>
<div id="attachment_205527" style="width: 464px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205527" src="https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_nav.jpg" alt="" width="454" height="545" class="size-full wp-image-205527" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_nav.jpg 454w, https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_nav-354x425.jpg 354w" sizes="(max-width: 454px) 100vw, 454px" /><p id="caption-attachment-205527" class="wp-caption-text">Pathological task planning example for goal-directed navigation.<br />Both table0 and table1 can lead to solving the goal specification of holding an apple, but table0 is completely unreachable.</p></div>
<p>In this second example, we want to place a banana on a desk. As with the previous example, we could choose to place this object on either desk0 or desk1. However, in the absence of more information — and especially if we continue to treat nearby locations as lower cost — we may plan to place banana0 on desk0 and fail to execute at runtime because of the other obstacles.</p>
<p>Here, some alternative solutions would include placing banana0 on desk1, or moving one of the other objects (water0 or water1) out of the way to enable banana0 to fit on desk0. Either way, we need some notion of collision checking to enable our planner to eliminate the seemingly optimal, but in practice infeasible, plan of simply placing the object on desk0.</p>
<div id="attachment_205528" style="width: 649px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205528" src="https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_manip.jpg" alt="" width="639" height="450" class="size-full wp-image-205528" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_manip.jpg 639w, https://robohub.org/wp-content/uploads/2022/09/tamp_motivation_manip-425x299.jpg 425w" sizes="(max-width: 639px) 100vw, 639px" /><p id="caption-attachment-205528" class="wp-caption-text">Pathological task planning example for object manipulation.<br />Placing banana0 on either desk0 or desk1 will satisfy the goal, but desk0 has other objects that would lead to collisions. So, banana0 must either placed on desk1, or the objects need to be rearranged and/or moved elsewhere to allow banana0 to fit on desk0.</p></div>
<p>In both cases, what we’re missing from our purely symbolic task planner is the ability to consider the <em>feasibility</em> of abstract actions before spitting out a plan and hoping for the best. Specifically for embodied agents such as robots, which move in the physical world, symbolic plans need to be made concrete through <em>motion planning</em>. As seen in these two examples, what if our task planner also required the existence of a specific path to move between two locations, or a specific pose for placing objects in a cluttered space?</p>
<h2>What is Task and Motion Planning?</h2>
<p>In our examples, the core issue is that if our task planning domain is too abstract, a seemingly valid plan is likely to fail down the line when we call a completely decoupled motion planner to try execute some portion of that plan. So, task and motion planning is exactly as its name states — jointly thinking about tasks and motion in a single planner. As Garrett et al. put it in their <a href="https://arxiv.org/abs/2010.01083" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">2020 survey paper</a>, “TAMP actually lies between discrete “high-level” task planning and continuous “low-level” motion planning”.</p>
<p>However, there is <a href="https://en.wikipedia.org/wiki/No_free_lunch_theorem" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">no free lunch</a>. When considering all the fine details up front in deliberative planning, search becomes expensive very quickly. In symbolic planning, an action may have a <em>discrete</em>, finite list of possible goals (let’s say somewhere around 5-10), so it may be reasonable to exhaustively search over these and find the one parameter that is optimal according to our model. When we start thinking about detailed motion plans that have a <em>continuous</em> parameter space spanning infinite possible solutions, this becomes intractable. So, several approaches to TAMP will apply <em>sampling-based techniques</em> to make planning work in continuous action spaces.</p>
<p>Another way to ensure TAMP is practical is to leverage <em>hierarchy</em>. One popular technique for breaking down symbolic planning into manageable pieces is <a href="https://arxiv.org/abs/1403.7426" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Hierarchical Task Networks (HTNs)</a>. In these <a href="https://pages.mtu.edu/~nilufer/classes/cs5811/2012-fall/lecture-slides/cs5811-ch11b-htn.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">2012 lecture slides</a>, Nilufer Onder mentions “It would be a waste of time to construct plans from individual operators. Using the built-in hierarchy helps escape from exponential explosion.” An example of hierarchical planning is shown in the diagram below. Using this diagram, you can explore the benefits of hierarchy; for example, this planner would never have to even consider how to open a door if the abstract plan didn’t require going down the hallway.</p>
<div id="attachment_205529" style="width: 616px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205529" src="https://robohub.org/wp-content/uploads/2022/09/hierarchical_planning_diagram.jpg" alt="" width="606" height="636" class="size-full wp-image-205529" srcset="https://robohub.org/wp-content/uploads/2022/09/hierarchical_planning_diagram.jpg 606w, https://robohub.org/wp-content/uploads/2022/09/hierarchical_planning_diagram-405x425.jpg 405w, https://robohub.org/wp-content/uploads/2022/09/hierarchical_planning_diagram-24x24.jpg 24w" sizes="(max-width: 606px) 100vw, 606px" /><p id="caption-attachment-205529" class="wp-caption-text">An example of hierarchical planning for a robot, where high-level, or abstract, plans for a robot could be refined into lower-level, or concrete, actions.<br /><em>Source: <a href="https://projects.laas.fr/planning/book.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Automated Planning and Acting</a> (2016)</em></p></div>
<p>Hierarchical planning is great in that it helps prune infeasible plans before spending time producing detailed, low-level plans. However, in this space the mythical <em>downward refinement property</em> is often cited. To directly quote the <a href="https://www.ijcai.org/Proceedings/91-1/Papers/045.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">1991 paper by Bacchus and Yang</a>, this property states that “given that a concrete-level solution exists, every abstract solution can be refined to a concrete-level solution without backtracking across abstract levels”. This is not always (and I would argue rarely) achievable in robotics, so backtracking in hierarchical planning is largely unavoidable.</p>
<p>To this end, another strategy behind TAMP has to do with commitment in sampling parameters during search. In the literature, you will see many equivalent words thrown around, but I find the main distinction is between the following strategies:</p>
<ul>
<li><strong>Early-commitment (or <em>binding</em>)</strong> strategies will sample action parameters from continuous space before search, effectively converting the problem to a purely discrete task planning problem.</li>
<li><strong>Least-commitment (or <em>optimistic</em>)</strong> strategies will instead come up with a purely symbolic plan skeleton. If that skeleton is feasible, then the necessary parameter placeholders are filled by sampling.</li>
</ul>
<div id="attachment_205530" style="width: 1034px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205530" src="https://robohub.org/wp-content/uploads/2022/09/tamp_sampling_methods-1024x476.jpg" alt="" width="1024" height="476" class="size-large wp-image-205530" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_sampling_methods-1024x476.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_sampling_methods-425x198.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_sampling_methods-768x357.jpg 768w, https://robohub.org/wp-content/uploads/2022/09/tamp_sampling_methods.jpg 1152w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-205530" class="wp-caption-text">Flowcharts representing two extreme varieties of sampling-based TAMP.<br />*H-CSP = hybrid constraint satisfaction problem<br /><em>Source: <a href="https://arxiv.org/abs/2010.01083" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Garrett et al. (2020), Integrated Task and Motion Planning</a></em></p></div>
<p>Both strategies have advantages and disadvantages, and in practice modern TAMP methods will combine them in some way that works for the types of planning domains and problems being considered. Also, note that in the diagram above both strategies have a loop back to the beginning when a solution is not found; so backtracking remains an unavoidable part of planning.</p>
<p>One key paper that demonstrated the balance of symbolic search and sampling was <a href="http://vigir.missouri.edu/~gdesouza/Research/Conference_CDs/IEEE_ICRA_2010/data/papers/1437.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Sampling-based Motion and Symbolic Action Planner (SMAP)</a> by Plaku and Hager in 2010. Around the same time, in 2011, Leslie Kaelbling and Tomás Lozano-Pérez presented <a href="https://people.csail.mit.edu/lpk/papers/hpnICRA11Final.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Hierarchical Planning in the Now (HPN)</a>, which combined hierarchy and sampling-based techniques for TAMP. However, the authors themselves admitted the sampling part left something to be desired. There is a great quote in this paper which foreshadows some of the other work that would come out of their lab:</p>
<blockquote>
<p>&#8220;Because our domains are infinite, we cannot consider all instantiations of the operations. Our current implementation of suggesters only considers a small number of possible instantiations of the operations. We could recover the relatively weak properties of probabilistic completeness by having the suggesters be generators of an infinite stream of samples, and managing the search as a non-deterministic program over those streams.&#8221;</p>
<p>&#8211; Leslie pack kaelbling and Tomás Lozano-Pérez (2011), <a href="https://people.csail.mit.edu/lpk/papers/hpnICRA11Final.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Hierarchical planning in the now</a>.</p>
</blockquote>
<p>Directly following this quote is the work their student Caelan Garrett took on — first in the creation of <a href="https://arxiv.org/abs/1701.00287" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">STRIPStream</a> in 2017 and then PDDLStream in 2018. The astute reader will have noticed that <a href="https://arxiv.org/abs/1802.08705" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a> is the actual software used in these blog posts, so take this “literature review” with this bias in mind, and keep reading if you want to learn more about TAMP with this specific tool.</p>
<p>If you want to know more about TAMP in general, I will refer you to two recent survey papers that I found useful:</p>
<ul>
<li><a href="https://arxiv.org/abs/2010.01083" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Integrated Task and Motion Planning</a>, by Garrett et al. (2020)</li>
<li><a href="https://www.frontiersin.org/articles/10.3389/frobt.2021.637888/full" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Combining task and motion planning: Challenges and Guidelines</a>, by Mansouri et al. (2021)</li>
</ul>
<h2>Mobile robot example, revisited</h2>
<p>To illustrate the benefits of integrated TAMP, we’ll continue the same mobile robotics example from <a href="https://roboticseabass.com/2022/07/19/task-planning-in-robotics/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">the previous post</a>. In this problem,</p>
<ul>
<li>The robot’s goal is to place the apple on the table.</li>
<li>Navigation now requires coming up with a goal pose (which is a continuous parameter), as well the actual path from start to goal. For this example, we are using a <a href="https://en.wikipedia.org/wiki/Rapidly-exploring_random_tree" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Rapidly-exploring Random Tree (RRT)</a>, but you could swap for any other path-finding algorithm.</li>
<li>Placing an object now requires sampling a valid pose that is inside the placement surface polygon and does not collide with other objects on that surface.</li>
</ul>
<p>As you read the following list explaining this problem, make sure you scroll through the slideshow below to get a visual representation.</p>
<p><strong>STEP 1</strong>: Looking at the state of the world, you can see how a purely symbolic task planner would output a relatively simple plan: pick the apple, move to the table, and place the apple on the table. In the context of TAMP, this now represents a plan skeleton which several parameters that are yet to be filled — specifically,</p>
<ul>
<li>?pt is the pose of the robot when navigating to the table</li>
<li>?path is the actual output of our motion planner to get to ?pt</li>
<li>?pa-1 is the new pose of the apple when placed on the table (which follows from its initial pose ?pa-0)</li>
</ul>
<p><strong><br />
STEP 2</strong>: To make the problem a little simpler, we made it such that every location has a discrete, finite set of possible navigation locations corresponding to the edges of its polygon. So looking at the table location, you see there are 4 possible navigation poses pt-T, pt-B, pt-L, and pt-R corresponding to the top, bottom, left, and right sides, respectively. Since this set of locations is relatively small, we can sample these parameters up front (or <em>eagerly</em>) at the start of search.</p>
<p><strong>STEP 3</strong>: Our move action can now have different instantiations for the goal pose ?pt that are enumerated during search. This is in contrast with the ?path argument, which must be sampled by calling our RRT planner. We don’t want to do this eagerly because the space of paths is continuous, so we prefer to <em>defer</em> sampling of this parameter. If our action has a cost associated with the length of a path, we could imagine that the lowest-cost action would be to navigate to the left side of the table (pt-L), and some randomly sampled path (path42) may describe how we get there.</p>
<p><strong>STEP 4</strong>: Next comes the place action, which now must include a valid collision-free pose for the apple on the table. Because of how we set up our problem, our robot cannot find a valid placement pose when approaching from the left side of the table. So, we must backtrack.</p>
<p><strong>STEP 5</strong>: After backtracking, we need to find an alternative navigation pose for the table (?pt). Given our environment, the only other feasible location is the bottom side of the table (pt-b), as the walls block the robot from the top and right sides and it would be impossible to find a valid path with our RRT. However, when the robot is at the bottom side of the table, it can also sample a valid placement pose! In our example, the placeholder ?pa-1 is therefore satisfied with some randomly sampled pose pa29.</p>
<p><strong>STEP 6</strong>: … And there you have it! A valid plan that defines a sequence of symbolic actions (pick, move, place) along with the necessary navigation pose, path to that pose, and placement location for the apple. It’s not optimal, but it is probabilistically complete!</p>
<div id="attachment_205531" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205531" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_1.jpg" alt="" width="1058" height="595" class="size-full wp-image-205531" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_1.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_1-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_1-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_1-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205531" class="wp-caption-text">(1/6) By being optimistic about all the continuous parameters related to motion, we can reach a potential goal state with relative ease.</p></div>
<div id="attachment_205532" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205532" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_2.jpg" alt="" width="1058" height="595" class="size-full wp-image-205532" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_2.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_2-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_2-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_2-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205532" class="wp-caption-text">(2/6) Since the navigation poses around the desk and the table are finite, we can sample them eagerly; that is, we enumerate all options up front in planning.</p></div>
<div id="attachment_205533" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205533" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_3.jpg" alt="" width="1058" height="595" class="size-full wp-image-205533" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_3.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_3-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_3-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_3-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205533" class="wp-caption-text">(3/6) Once we commit to a navigation pose around the table, we can continue filling in our plan by sampling a feasible trajectory from the robot’s current pose to the target pose at the table.</p></div>
<div id="attachment_205534" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205534" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_4.jpg" alt="" width="1058" height="595" class="size-full wp-image-205534" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_4.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_4-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_4-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_4-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205534" class="wp-caption-text">(4/6) Next, we need to sample a placement pose for the apple. Suppose in this case we fail to sample a collision-free solution based on the robot’s current location.</p></div>
<div id="attachment_205535" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205535" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_5.jpg" alt="" width="1058" height="595" class="size-full wp-image-205535" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_5.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_5-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_5-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_5-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205535" class="wp-caption-text">(5/6) This means we need to backtrack and consider a different navigation pose, thereby a different motion plan to this new pose.</p></div>
<div id="attachment_205536" style="width: 1068px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205536" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_61.jpg" alt="" width="1058" height="595" class="size-full wp-image-205536" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_61.jpg 1058w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_61-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_61-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_61-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><p id="caption-attachment-205536" class="wp-caption-text">(6/6) From this new pose, even though the trajectory is longer and therefore higher-cost, we can sample a valid placement pose for the apple and finally complete our task and motion plan.</p></div>
<p>Now, suppose we change our environment such that we can only approach the table from the left side, so there is no way to directly find a valid placement pose for the apple. Using the same planner, we should eventually converge on a task and motion plan that rearranges the objects world — that is, it requires moving one of the other objects on the table to make room for the apple.</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/tamp_example_7.jpg" alt="" width="768" height="432" class="alignnone size-full wp-image-205537" srcset="https://robohub.org/wp-content/uploads/2022/09/tamp_example_7.jpg 768w, https://robohub.org/wp-content/uploads/2022/09/tamp_example_7-425x239.jpg 425w" sizes="(max-width: 768px) 100vw, 768px" />
<h2>Implementing TAMP with PDDLStream</h2>
<p>We will now revisit our pathological examples from the beginning of this post. To do this, we will use <a href="https://arxiv.org/abs/1802.08705" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a> for planning and <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim</a> as a simple simulation platform. For quick background on PDDLStream, you may refer to this video.</p>
<div class="keep-aspect"><iframe title="PDDLStream Presentation" width="500" height="375" src="https://www.youtube-nocookie.com/embed/7xLPogztQss?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>The key idea behind PDDLStream is that it extends PDDL with a notion of <em>streams</em> (remember the earlier quote from the Hierarchical Planning in the Now paper?). Streams are generic, user-defined Python functions that sample continuous parameters such as a valid sample certifies that stream and provides any necessary predicates that (usually) act as preconditions for actions. Also, PDDLStream has an adaptive technique that balances <em>exploration</em> (searching for discrete task plans) vs. <em>exploitation</em> (sampling to fill in continuous parameters).</p>
<h3>Goal-directed navigation</h3>
<p>We can use PDDLStream to augment our move action such that it includes metric details about the world. As we saw in our illustrative example, we now must factor in the start and goal pose of our robot, as well as a concrete path between those poses.</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-56-44.jpeg" alt="" width="760" height="378" class="alignnone size-full wp-image-205541" srcset="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-56-44.jpeg 760w, https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-56-44-425x211.jpeg 425w" sizes="(max-width: 760px) 100vw, 760px" />
<p>As additional preconditions for this action, we must ensure that:</p>
<ul>
<li>The navigation pose is valid given the target location (NavPose)</li>
<li>There must be a valid path from the start to goal pose (Motion)</li>
</ul>
<p>Additionally, we are able to now use more realistic costs for our action by calculating the actual length of our path produced by the RRT! The separate file describing the streams for this action may look as follows. Here, the s-navpose stream certifies the NavPose predicate and the s-motion stream certifies the Motion predicate.</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-58-27.jpeg" alt="" width="763" height="488" class="alignnone size-full wp-image-205542" srcset="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-58-27.jpeg 763w, https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-58-27-425x272.jpeg 425w" sizes="(max-width: 763px) 100vw, 763px" />
<p>The Python implementations for these functions would then look something like this. Notice that the get_nav_poses function returns a finite set of poses, so the output is a simple Python list. On the other hand, sample_motion can continuously spit out paths from our RRT, and it implemented as a <a href="https://realpython.com/introduction-to-python-generators/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">generator</a>:</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-59-01.jpeg" alt="" width="750" height="345" class="alignnone size-full wp-image-205543" srcset="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-59-01.jpeg 750w, https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-17-59-01-425x196.jpeg 425w" sizes="(max-width: 750px) 100vw, 750px" />
<p>Putting this new domain and streams together, we can solve our first pathological example from the introduction. In the plan below, the robot will compute a path to the farther away, but reachable room to pick up an apple and satisfy the goal.</p>
<video src="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_nav.mp4" class=" xVideo" controls autobuffer></video>
<h2>Object manipulation</h2>
<p>Similarly, we can extend our place action to now include the actual poses of objects in the world. Specifically,</p>
<ul>
<li>The ?placepose argument defines the target pose of the object.</li>
<li>The Placeable predicate is certified by a s-place stream.</li>
<li>The IsCollisionFree predicate is actually a derived predicate that checks individual collisions between the target object and all other objects at that location.</li>
<li>Each individual collision check is determined by the CollisionFree predicate, which is certified by a t-collision-free steam.</li>
</ul>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/ImgSC.jpeg" alt="" width="750" height="1261" class="alignnone size-full wp-image-205549" srcset="https://robohub.org/wp-content/uploads/2022/09/ImgSC.jpeg 750w, https://robohub.org/wp-content/uploads/2022/09/ImgSC-253x425.jpeg 253w, https://robohub.org/wp-content/uploads/2022/09/ImgSC-609x1024.jpeg 609w" sizes="(max-width: 750px) 100vw, 750px" />
<p>The Python implementation for sampling placement poses and checking for collisions may look as follows. Here, sample_place_pose is our generator for placement poses, whereas test_collision_free is a simple Boolean (true/false) check.</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-18-04-49.jpeg" alt="" width="734" height="639" class="alignnone size-full wp-image-205545" srcset="https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-18-04-49.jpeg 734w, https://robohub.org/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-18-04-49-425x370.jpeg 425w" sizes="(max-width: 734px) 100vw, 734px" />
<p>By expanding our domain to reason about the feasibility of object placement, we can similarly solve the second pathological example from the introduction. In the first video, we have an alternative location desk1 where the robot can place the banana and satisfy the goal.</p>
<video src="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_manip_1.mp4" class=" xVideo" controls autobuffer></video>
<p>In the second video, we remove the alternative desk1. The same task and motion planner then produces a solution that involves picking up one of the objects on desk0 to make room to later place the banana there.</p>
<video src="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_manip_2.mp4" class=" xVideo" controls autobuffer></video>
<p>You can imagine extending this to a more realistic system — that is, one that is not a point robot and has an actual manipulator — that similarly checks the feasibility of a motion plan for picking and placing objects. While it wasn’t the main focus of the work, our <a href="https://www.youtube.com/watch?v=UF-SjGm20Mw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Active Learning of Abstract Plan Feasibility</a> work did exactly this with PDDLStream. Specifically, we used RRTs to sample configuration-space paths for a <a href="https://www.franka.de/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Franka Emika Panda</a> arm and doing collision-checking using a surrogate model in <a href="https://pybullet.org/wordpress/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PyBullet</a>!</p>
<h2>Conclusion</h2>
<p>In this post we introduced the general concept of task and motion planning (TAMP). In theory, it’s great to deliberate more — that is, really think more about the feasibility of plans down to the metric level — but with that comes more planning complexity. However, this can pay off in that it reduces the risk of failing in the middle of executing a plan and having to stop and replan.</p>
<p>We introduced 3 general principles that can make TAMP work in practice:</p>
<ul>
<li><strong>Hierarchy</strong>, to determine the feasibility of abstract plans before planning at a lower level of refinement.</li>
<li><strong>Continuous parameter spaces</strong>, and techniques like sampling to make this tractable.</li>
<li><strong>Least-commitment strategies</strong>, to come up with symbolic plan skeletons before spending time with expensive sampling of parameters.</li>
</ul>
<p>We then dug into <a href="https://arxiv.org/abs/1802.08705" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a> as one tool for TAMP, which doesn’t do much in the way of hierarchy, but certainly tackles continuous parameter spaces and least-commitment strategies for parameter binding. We went through a few examples using <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim</a>, but you can access the full set of examples in the <a href="https://pyrobosim.readthedocs.io/en/latest/usage/tamp.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim documentation for TAMP</a>.</p>
<p>The <a href="http://github.com/caelan/pddlstream" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream repository</a> has many more examples that you can check out. And, of course, there are many other task and motion planners out there that focus on different things — such as hierarchy without continuous parameters, or factoring in other common objectives such as temporal aspects and resource consumption.</p>
<p>Hope you have enjoyed these posts! If the tools shown here give you any cool ideas, I would love to hear about them, so feel free to reach out.</p>
<hr>
<p><em>You can read the original article at <a href="https://roboticseabass.com/2022/07/30/integrated-task-and-motion-planning-in-robotics/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Roboticseabass.com</a>.</em></p>
]]></content:encoded>
					
		
		<enclosure url="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_nav.mp4" length="758227" type="video/mp4" />
<enclosure url="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_manip_1.mp4" length="1638642" type="video/mp4" />
<enclosure url="https://roboticseabass.com/wp-content/uploads/2022/07/pddlstream_tamp_manip_2.mp4" length="2454000" type="video/mp4" />

			</item>
		<item>
		<title>Task Planning in robotics</title>
		<link>https://robohub.org/task-planning-in-robotics/</link>
		
		<dc:creator><![CDATA[Sebastian Castro]]></dc:creator>
		<pubDate>Wed, 31 Aug 2022 10:34:49 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://robohub.org/?p=205378</guid>

					<description><![CDATA[Suppose we have a robot in a simple world like the one below. Let’s consider commanding our robot to perform a task such as “take the apple from the shelf and put it on the table”. I would argue we humans have pretty good intuition for how a robot could achieve this task. We could [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="alignnone size-full wp-image-205379" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_banner.jpg" alt="" width="1058" height="595" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_banner.jpg 1058w, https://robohub.org/wp-content/uploads/2022/08/task_planning_banner-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2022/08/task_planning_banner-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2022/08/task_planning_banner-768x432.jpg 768w" sizes="(max-width: 1058px) 100vw, 1058px" />
<p>Suppose we have a robot in a simple world like the one below. Let’s consider commanding our robot to perform a task such as <em>“take the apple from the shelf and put it on the table”</em>.</p>
<div id="attachment_205380" style="width: 336px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205380" class="size-full wp-image-205380" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_simple_world.jpg" alt="" width="326" height="423" /><p id="caption-attachment-205380" class="wp-caption-text">Simple task planning example world: A robot can move between a finite set of locations, and can pick and place objects at those locations.</p></div>
<p>I would argue we humans have pretty good intuition for how a robot could achieve this task. We could describe what the robot should do by breaking the solution down into individual <em>actions</em>. For example:</p>
<ul>
<li><strong>Move</strong> to the <em>shelf</em></li>
<li><strong>Pick</strong> up the <em>apple</em></li>
<li><strong>Move</strong> back to the <em>table</em></li>
<li><strong>Place</strong> the <em>apple</em></li>
</ul>
<p>This is fine for our simple example — and in fact, is also fine for many real-world robotics applications — but what if the task gets more complicated? Suppose we add more objects and locations to our simple world, and start describing increasingly complex goals like <em>“make sure all the apples are on the table and everything else is in the garbage bin”</em>? Furthermore, what if we want to achieve this in some optimal manner like minimizing time, or number of total actions? Our reasoning quickly hits its limit as the problem grows, and perhaps we want to consider letting a computer do the work.</p>
<p>This is what we often refer to as <strong><em>task planning</em></strong>: Autonomously reasoning about the state of the world using an internal <em>model</em> and coming up a sequence of <em>actions</em>, or a <em>plan</em>, to achieve a <em>goal</em>.</p>
<p>In my opinion, task planning is not as popular as other areas in robotics you might encounter because… quite frankly, we’re just not that good at robotics yet! What I mean is that robots are complicated, and many commercially available systems are automating simple, repetitive tasks that don’t require this level of high-level planning — it would be overkill! There are many lower-level problems to solve in robotics such as standing up good hardware, robust sensing and actuation, motion planning, and keeping costs down. While task planning skews towards more academic settings for this reason, I eagerly await the not-so-distant future where robots are even more capable and the entire industry is thinking more about planning over longer horizons and increasingly sophisticated tasks.</p>
<p>In this post, I will introduce the basic pieces behind task planning for robotics. I will focus on Planning Domain Definition Language (PDDL) and take you through some basic examples both conceptually and using the <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim</a> tool.</p>
<h2>Defining a planning domain</h2>
<p>Task planning requires a model of the world and how an autonomous agent can interact with the world. This is usually described using <em>state</em> and <em>actions</em>. Given a particular state of the world, our robot can take some action to <em>transition</em> to another state.</p>
<p>Over the years, there have been several languages used to define domains for task planning. The first task planning language was the <a href="https://ai.stanford.edu/users/nilsson/OnlinePubs-Nils/PublishedPapers/strips.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">STanford Research Institute Problem Solver (STRIPS)</a> in 1971, made popular by the <a href="https://www.sri.com/hoi/shakey-the-robot/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Shakey</a> project.</p>
<p>Since then, several related languages for planning have come up, but one of the most popular today is <a href="https://planning.wiki/guide/whatis/pddl" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Planning Domain Definition Language (PDDL)</a>. The first PDDL paper was published in 1998, though there have been several enhancements and variations tacked on over the years. To briefly describe PDDL, it’s hard to beat the <a href="https://www.researchgate.net/publication/2278933_PDDL_-_The_Planning_Domain_Definition_Language" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">original paper</a>.</p>
<blockquote><p>&#8220;PDDL is intended to express the “physics” of a domain, that is, what predicates there are, what actions are possible, what the structure of compound actions is, and what the effects of actions are.&#8221;</p>
<p><a href="https://www.researchgate.net/publication/2278933_PDDL_-_The_Planning_Domain_Definition_Language" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">&#8211; GHALLAB ET AL. (1998), PDDL – THE PLANNING DOMAIN DEFINITION LANGUAGE</a></p></blockquote>
<p>The point of languages like PDDL is that they can describe an entire space of possible problems where a robot can take the same actions, but in different environments and with different goals. As such, the fundamental pieces of task planning with PDDL are a task-agnostic <em>domain</em> and a task-specific <em>problem</em>.</p>
<p>Using our robot example, we can define:</p>
<ul>
<li><strong>Domain: The task-agnostic part</strong>
<ul>
<li><strong>Predicates</strong>: (Robot ?r), (Object ?o), (Location ?loc), (At ?r ?loc), (Holding ?r ?o), etc.</li>
<li><strong>Actions</strong>: move(?r ?loc1 ?loc2), pick(?r ?o ?loc), place(?r ?o ?loc)</li>
</ul>
</li>
<li><strong>Problem: The task-specific part</strong>
<ul>
<li><strong>Objects</strong>: (Robot robot), (Location shelf), (Location table), (Object apple)</li>
<li><strong>Initial state</strong>: (HandEmpty robot), (At robot table), (At apple shelf)</li>
<li><strong>Goal specification</strong>: (At apple table)</li>
</ul>
</li>
</ul>
<p>Since domains describe how the world works, predicates and actions have associated <em>parameters</em>, which are denoted by ?, whereas a specific <em>object</em> does not have any special characters to describe it. Some examples to make this concrete:</p>
<ul>
<li><strong>(Location ?loc) </strong>is a <em>unary</em> predicate, meaning it has one parameter. In our example, shelf and table are specific location instances, so we say that (Location table) and (Location shelf) are part of our initial state and do not change over time.</li>
<li><strong>(At ?r ?loc)</strong> is a <em>binary</em> predicate, meaning it has two parameters. In our example, the robot may begin at the table, so we say that (At robot table) is part of our initial state, though it may be negated as the robot moves to another location.</li>
</ul>
<p>PDDL is an <em>action language</em>, meaning that the bulk of a domain is defined as <em>actions</em> (sometimes referred to as <em>operators</em>) that interact with our predicates above. Specifically, an action contains:</p>
<ul>
<li><strong>Parameters</strong>: Allow the same type of action to be executed for different combinations of objects that may exist in our world.</li>
<li><strong>Preconditions</strong>: Predicates which must be true at a given state to allow taking the action from that state.</li>
<li><strong>Effects</strong>: Changes in state that occur as a result of executing the action.</li>
</ul>
<p>For our robot, we could define a move action as follows:</p>
<p><code>(:action move<br />
:parameters (?r ?loc1 ?loc2)<br />
:precondition (and (Robot ?r)<br />
(Location ?loc1)<br />
(Location ?loc2)<br />
(At ?r ?loc1))<br />
:effect (and (At ?r ?loc2)<br />
(not (At ?r ?loc1)))<br />
)</code></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In our description of move, we have</p>
<ul>
<li>Three parameters ?r ?loc1, and ?loc2.</li>
<li>Unary predicates in the preconditions that narrow down the domain of parameters that make an action feasible — ?r must be a robot and ?loc1 and ?loc2 must be locations, otherwise the action does not make sense.</li>
<li>Another precondition that is state-dependent: (At ?r ?loc1). This means that to perform a move action starting at some location ?loc1, the robot must already be in that location.</li>
</ul>
<p>Note that in some cases, PDDL descriptions allow for <em>typing</em>, which lets you define the domain of actions inline with the parameters rather than explicitly including them as unary predicates — for example, :parameters ?r &#8211; Robot ?loc1 &#8211; Location ?loc2 &#8211; Location … but this is just syntactic sugar.</p>
<p>Similarly, the effects of the action can add new predicates or negate existing ones (in STRIPS these were specified as separate addition and deletion lists). In our example, after performing a move action, the robot is no longer at its previous location ?loc1 and instead is at its intended new location ?loc2.</p>
<p>A similar concept can be applied to other actions, for example pick and place. If you take some time to process the PDDL snippets below, you will hopefully get the gist that our robot can manipulate an object only if it is at the same location as that object, and it is currently not holding something else.</p>
<p><code>(:action pick<br />
:parameters (?r ?o ?loc)<br />
:precondition (and (Robot ?r)<br />
(Obj ?o)<br />
(Location ?loc)<br />
(HandEmpty ?r)<br />
(At ?r ?loc)<br />
(At ?o ?loc))<br />
:effect (and (Holding ?r ?o)<br />
(not (HandEmpty ?r))<br />
(not (At ?o ?loc)))<br />
)</code></p>
<p>(:action place<br />
:parameters (?r ?o ?loc)<br />
:precondition (and (Robot ?r)<br />
(Obj ?o)<br />
(Location ?loc)<br />
(At ?r ?loc)<br />
(not (HandEmpty ?r))<br />
(Holding ?r ?o))<br />
:effect (and (HandEmpty ?r)<br />
(At ?o ?loc)<br />
(not (Holding ?r ?o)))<br />
)</p>
<p>So given a PDDL domain, we can now come up a <em>plan</em>, or sequence of actions, to solve various types of problems within that domain … but how is this done in practice?</p>
<h2>Task planning is search</h2>
<p>There is good reason for all this overhead in defining a planning domain and a good language to express it in: At the end of the day, task planning is solved using <em>search</em> algorithms, and much of the literature is about solving complex problems as efficiently as possible. As task planning problems scale up, computational costs increase at an alarming rate — you will often see <a href="https://en.wikipedia.org/wiki/PSPACE-complete" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PSPACE-Complete</a> and <a href="https://en.wikipedia.org/wiki/NP-completeness" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">NP-Complete</a> thrown around in the literature, which should make planning people run for the hills.</p>
<h3>State-space search</h3>
<p>One way to implement task planning is using our model to perform <strong><em>state-space search</em></strong>. Given our problem statement, this could either be:</p>
<ul>
<li><strong>Forward search</strong>: Start with the initial state and expand a graph until a goal state is reached.</li>
<li><strong>Backward search</strong>: Start with the goal state(s) and work backwards until the initial state is reached.</li>
</ul>
<p>Using our example, let’s see how forward state-space search would work given the goal specification (At apple table):</p>
<div id="attachment_205389" style="width: 658px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205389" class="size-full wp-image-205389" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example-1.jpg" alt="" width="648" height="280" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example-1.jpg 648w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example-1-425x184.jpg 425w" sizes="(max-width: 648px) 100vw, 648px" /><p id="caption-attachment-205389" class="wp-caption-text">(1/6) In our simple world, the robot starts at the table. The only valid action from here is to move to the shelf.</p></div>
<div id="attachment_205390" style="width: 706px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205390" class="size-full wp-image-205390" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_2.jpg" alt="" width="696" height="280" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_2.jpg 696w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example_2-425x171.jpg 425w" sizes="(max-width: 696px) 100vw, 696px" /><p id="caption-attachment-205390" class="wp-caption-text">(2/6) After moving to the shelf, the robot could either pick the apple or move back to the table. Since moving back to the table leads us to a state we have already seen, we can ignore it.</p></div>
<div id="attachment_205391" style="width: 706px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205391" class="size-full wp-image-205391" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_3.jpg" alt="" width="696" height="368" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_3.jpg 696w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example_3-425x225.jpg 425w" sizes="(max-width: 696px) 100vw, 696px" /><p id="caption-attachment-205391" class="wp-caption-text">(3/6) After picking the apple, we could move back to the table or place the apple back on the shelf. Again, placing the apple would lead us to an already visited state.</p></div>
<div id="attachment_205393" style="width: 706px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205393" class="size-full wp-image-205393" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_4.jpg" alt="" width="696" height="464" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_4.jpg 696w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example_4-425x283.jpg 425w" sizes="(max-width: 696px) 100vw, 696px" /><p id="caption-attachment-205393" class="wp-caption-text">(4/6) Once the robot is at the table while holding the apple, we can place the apple on the table or move back to the shelf.</p></div>
<div id="attachment_205394" style="width: 706px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205394" class="size-full wp-image-205394" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_5.jpg" alt="" width="696" height="480" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_5.jpg 696w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example_5-425x293.jpg 425w" sizes="(max-width: 696px) 100vw, 696px" /><p id="caption-attachment-205394" class="wp-caption-text">(5/6) At this point, if we place the apple on the table we reach a goal state! The sequence of actions leading to the state is our resulting plan.</p></div>
<div id="attachment_205395" style="width: 770px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205395" class="size-full wp-image-205395" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_6.jpg" alt="" width="760" height="456" srcset="https://robohub.org/wp-content/uploads/2022/08/task_planning_example_6.jpg 760w, https://robohub.org/wp-content/uploads/2022/08/task_planning_example_6-425x255.jpg 425w" sizes="(max-width: 760px) 100vw, 760px" /><p id="caption-attachment-205395" class="wp-caption-text">(6/6) As the number of variables increases, the search problem (and time to find a solution) grows exponentially.</p></div>
<p>Deciding which states to expand during search could be purely based on a predetermined traversal strategy, using standard approaches like <em>breadth-first search (BFS)</em>,<em> depth-first search (DFS)</em>, and the like. Whether we decide to add costs to actions or treat them all as unit cost (that is, an optimal plan simply minimizes the total number of actions), we could instead decide to use greedy or <em>hill-climbing</em> algorithms to expand the next state based on minimum cost. And finally, regardless of which algorithm we use, we probably want to keep track of states we have already previously visited and prune our search graph to prevent infinite cycles and expanding unnecessary actions.</p>
<p>In motion planning, we often use <em>heuristics</em> during search; one common example is the use of <a href="https://en.wikipedia.org/wiki/A*_search_algorithm" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">A*</a> with the straight-line distance to a goal as an admissible heuristic. But what <em>is</em> a good heuristic in the context of task planning? How would you define the distance to a goal state without a handy metric like distance? Indeed, a great portion of the literature focuses on just this. Methods like <a href="https://bonetblai.github.io/reports/aips98-competition.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Heuristic Search Planning (HSP)</a> and <a href="http://www.cs.toronto.edu/~sheila/2542/w06/readings/ffplan01.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Fast-Forward (FF)</a> seek to define heuristics by solving relaxed versions of the problem, which includes removing preconditions or negative effects of actions. The de facto standard for state-space search today is a variant of these methods named <a href="https://arxiv.org/abs/1109.6051" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Fast Downward</a>, whose heuristic relies on building a causal graph to decompose the problem hierarchically — effectively taking the computational hit up front to transform the problem into a handful of approximate but smaller problems that proves itself worthwhile in practice.</p>
<p>Below is an example using <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim</a> and the <a href="https://github.com/caelan/pddlstream" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a> planning framework, which specifies a more complex goal that uses the predicates we described above. Compared to our example in this post, the video below has a few subtle differences in that there is a separate class of objects to represent the rooms that the robot can navigate, and locations can have multiple placement areas (for example, the counter has separate left and right areas).</p>
<ul>
<li>(At robot bedroom)</li>
<li>(At apple0 table0_tabletop)</li>
<li>(At banana0 counter0_left)</li>
<li>(Holding robot water0)</li>
</ul>
<p><video src="https://roboticseabass.com/wp-content/uploads/2022/07/pyrobosim_tamp_01_simple.mp4" class=" xVideo" controls autobuffer></video><br />
<em>pyrobosim example showing a plan that sequences navigation, pick, and place actions.</em></p>
<h3>Alternative search methods</h3>
<p>While forward state-space search is one of the most common ways to plan, it is not the only one. There are many alternative search methods that seek to build alternate data structures whose goal is to avoid the computational complexity of expanding a full state-transition model as above. Some common methods and terms you will see include:</p>
<ul>
<li><strong>Plan-space planning (PSP)</strong>: see <a href="http://www.dia.fi.upm.es/~ocorcho/Asignaturas/ModelosRazonamiento/PresentacionesClases/planning05.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">these slides</a> for a good example</li>
<li><strong>Planning graphs</strong>: most notably the <a href="https://www.cs.cmu.edu/~avrim/Papers/graphplan.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Graphplan</a> algorithm</li>
<li><strong>Partial-order planning</strong>: most notably the <a href="https://planning.wiki/_citedpapers/popf2010.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Partial Order Planning Forwards (POPF)</a> algorithm.</li>
</ul>
<p>In general, these search methods tend to outperform state-space search in tasks where there are several actions that can be performed in any order relative to each other because they depend on, and affect, mutually exclusive parts of the world. One of the canonical simple examples is the “dinner date example” which is used to demonstrate Graphplan. While <a href="https://pages.mtu.edu/~nilufer/classes/cs5811/2012-fall/lecture-slides/cs5811-ch10b-graphplan.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">these slides</a> describe the problem in more detail, the idea is that a person is preparing a dinner date where the end goal is that dinner and a present be ready while the house is clean — or (dinner present ¬garb). By thinking about the problem in this planning graph structure, we can gain the following insights:</p>
<ol>
<li>Planning seeks to find actions that can be executed independently because they are <em>mutually exclusive (mutex)</em>. This where the notion of partial ordering comes in, and why there are computational gains compared to explicit state-space search: Instead of separately searching through alternate paths where one action occurs before the other, here we simply say that the actions are mutex and we can figure out which to execute first after planning is complete.</li>
<li>This problem cannot be solved at one level because cooking requires clean hands (cleanH) and wrapping the present requires quiet, whereas the two methods of taking out the garbage (carry and dolly) negate these predicates, respectively. So in the solution below, we must expand two levels of the planning graph and then backtrack to get a concrete plan. We first execute cook to remove the requirement on cleanH, and then perform the other two actions in any order — it does not matter.</li>
<li>There is an alternative solution where at the first level we execute the wrap action, and at the second level we can execute cook and dolly (in either order) to achieve the goal. You can imagine this solution would be favored if we additionally required our dinner date hero to have clean hands before starting their date — gross!</li>
</ol>
<p><div id="attachment_205398" style="width: 914px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205398" class="size-full wp-image-205398" src="https://robohub.org/wp-content/uploads/2022/08/dinner_date_planning_graph-1.jpg" alt="" width="904" height="700" srcset="https://robohub.org/wp-content/uploads/2022/08/dinner_date_planning_graph-1.jpg 904w, https://robohub.org/wp-content/uploads/2022/08/dinner_date_planning_graph-1-425x329.jpg 425w, https://robohub.org/wp-content/uploads/2022/08/dinner_date_planning_graph-1-768x595.jpg 768w" sizes="(max-width: 904px) 100vw, 904px" /><p id="caption-attachment-205398" class="wp-caption-text">Planning graph for the dinner date problem <a href="http://www.cs.umd.edu/~nau/planning/slides/chapter06.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">[Source]</a>.<br />Straight lines are preconditions and effects, lines with boxes are no-operation (no-op) links, and curved lines are mutual exclusion (mutex) links.<br />One solution to the problem is highlighted in blue by backtracking from the goal state.</p></div>To bring this all full-circle, you will sometimes find state-space search implementations that use methods like Graphplan on a relaxed version of the problem to estimate the cost to goal as a heuristic. If you want to dig into the details, I would recommend <a href="https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.429.5366&amp;rep=rep1&amp;type=pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">A Tutorial on Planning Graph-Based Reachability Heuristics</a>, by Daniel Bryce and Subbarao Kambhampati.</p>
<h2>Towards more complex tasks</h2>
<p>Let’s get back to our mobile robot example. What if we want to describe more complex action preconditions and/or goal specifications? After all, we established at the start of this post that simple tasks probably don’t need the giant hammer that is a task planner. For example, instead of requesting that a specific object be placed at a specific location, we could move towards something more general like <em>“all apples should be on the table”</em>.</p>
<div id="attachment_205399" style="width: 416px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-205399" class="size-full wp-image-205399" src="https://robohub.org/wp-content/uploads/2022/08/task_planning_derived_world.jpg" alt="" width="406" height="346" /><p id="caption-attachment-205399" class="wp-caption-text">New example world containing objects, apple0 and apple1, which belong to the same object type (apple).</p></div>
<p>To explore this, let’s add predicates denoting objects belonging to categories. For example, (Type ?t) can define a specific type and (Is ?o ?t) to denote that an object belongs to such a type. Concretely, we could say that (Type apple), (Is apple0 apple), and (Is apple1 apple).</p>
<p>We can then add a new <em>derived predicate</em> (Has ?loc ?entity) to complete this. Derived predicates are just syntactic sugar — in this case, it helps us to succinctly define an entire space of possible states from our library of existing predicates. However, it lets us express more elaborate ideas in less text. For example:</p>
<ul>
<li>(Has table apple0) is true if the object apple0 is at the location table.</li>
<li>(Has table apple) is true if at least one object of type apple is at the location table.</li>
</ul>
<p>If we choose the goal state (Has table apple) for our example, a solution could involve placing either apple0 or apple1 on the table. One implementation of this derived predicate could look as follows, which makes use of the exists keyword in PDDL.</p>
<p><code>(:derived (Has ?loc ?entity)<br />
(or<br />
; CASE 1: Entity is a specific object instance, e.g.,<br />
; (Has table apple0)<br />
(and (Location ?loc)<br />
(Obj ?entity)<br />
(At ?entity ?loc)<br />
)<br />
; CASE 2: Entity is a specific object category, e.g.,<br />
; (Has table apple)<br />
(exists (?o)<br />
(and (Obj ?o)<br />
(Location ?loc)<br />
(Type ?entity)<br />
(Is ?o ?entity)<br />
(At ?o ?loc)<br />
)<br />
)<br />
)<br />
)</code></p>
<p>Another example would be a HasAll derived predicate, which is true if and only if a particular location contains every object of a specific category. In other words, if you planned for (HasAll table apple), you would need both apple0 and apple1 to be relocated. This could look as follows, this time making use of the imply keyword in PDDL.</p>
<p><code>(:derived (HasAll ?loc ?objtype)<br />
(imply<br />
(and (Obj ?o)<br />
(Type ?objtype)<br />
(Is ?o ?objtype))<br />
(and (Location ?loc)<br />
(At ?o ?loc))<br />
)<br />
)</code></p>
<p>You could imagine also using derived predicates as preconditions for actions, to similarly add abstraction in other parts of the planning pipeline. Imagine a robot that can take out your trash and recycling. A derived predicate could be useful to allow dumping a container into recycling only if all the objects inside the container are made of recyclable material; if there is any non-recyclable object, then the robot can either pick out the violating object(s) or simply toss the container in the trash.</p>
<p>Below is an example from pyrobosim where we command our robot to achieve the following goal, which now uses derived predicates to express locations and objects either as specific instance, or through their types:</p>
<ul>
<li>(Has desk0_desktop banana0)</li>
<li>(Has counter apple1)</li>
<li>(HasNone bathroom banana)</li>
<li>(HasAll table water)</li>
</ul>
<p><video src="https://roboticseabass.com/wp-content/uploads/2022/07/pyrobosim_tamp_02_derived.mp4" class=" xVideo" controls autobuffer></video><br />
<em>pyrobosim example showing task planning with derived predicates.</em></p>
<h2>Conclusion</h2>
<p>This post barely scratched the surface of task planning, but also introduced several resources where you can find out more. One central resource I would recommend is the <a href="https://projects.laas.fr/planning/book.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Automated Planning and Acting</a> textbook by Malik Ghallab, Dana Nau, and Paolo Traverso.</p>
<p>Some key takeaways are:</p>
<ol>
<li>Task planning requires a good <strong>model</strong> and <strong>modeling language</strong> to let us describe a task-agnostic planning framework that can be applied to several tasks.</li>
<li><strong>Task planning is search</strong>, where the output is a <strong>plan</strong>, or a sequence of actions.</li>
<li><strong>State-space search</strong> relies on clever <strong>heuristics</strong> to work in practice, but there are alternative <strong>partial-order methods</strong> that aim to make search tractable in a different way.</li>
<li><strong>PDDL</strong> is one of the most common languages used in task planning, where a <strong>domain</strong> is defined as the tool to solve several <strong>problems</strong> comprising a set of <strong>objects</strong>, <strong>initial state</strong>, and <strong>goal specification</strong>.</li>
<li><strong>PDDL is not the only way to formalize task planning</strong>. Here are a few papers I enjoyed:
<ul>
<li><a href="https://arxiv.org/abs/1804.08229" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Task Planning in Robotics: an Empirical Comparison of PDDL-based and ASP-based Systems by Jiang et al. (2018)</a> discusses Answer Set Programming (ASP) in addition to PDDL, but also is a fantastic introduction to task planning in general.</li>
<li><a href="https://www.cs.rice.edu/~vardi/papers/icra15.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Towards Manipulation Planning with Temporal Logic Specifications by He et al. (2015)</a> introduces problems similar to our examples, but search is based on automata synthesized from Linear Temporal Logic (LTL) specifications.</li>
</ul>
</li>
</ol>
<p>After reading this post, the following should now make a little more sense: Some of the more recent task planning systems geared towards robotics, such as the <a href="https://github.com/PlanSys2/ros2_planning_system" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS2 Planning System (PlanSys2)</a> and <a href="https://github.com/caelan/pddlstream" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">PDDLStream</a>, leverage some of these planners mentioned above. Specifically, these use Fast Downward and POPF.</p>
<p>One key pitfall of task planning — at least in how we’ve seen it so far — is that we are operating at a level of abstraction that is not necessarily ideal for real-world tasks. Let’s consider these hypothetical scenarios:</p>
<ul>
<li>If a plan involves navigating between two rooms, but the rooms are not connected or the robot is too large to pass through, how we do know this before we’re actually executing the plan?</li>
<li>If a plan involves placing 3 objects on a table, but the objects physically will not fit on that table, how do we account for this? And what if there is some other combination of objects that <em>does</em> fit and <em>does</em> satisfy our goal?</li>
</ul>
<p>To address these scenarios, there possibly is a way to introduce more expert knowledge to our domain as new predicates to use in action preconditions. Another is to consider a richer space of action parameters that reasons about metric details (e.g., specific poses or paths to a goal) more so than a purely symbolic domain would. In both cases, we are thinking more about <em>action feasibility</em> in task planning. This leads us to the field commonly known as <strong>task and motion planning (TAMP)</strong>, and will be the focus of the next post — so stay tuned!</p>
<p>In the meantime, if you want to explore the mobile robot examples in this post, check out my <a href="https://github.com/sea-bass/pyrobosim" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">pyrobosim repository</a> and take a look at the <a href="https://pyrobosim.readthedocs.io/en/latest/usage/tamp.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">task and motion planning documentation</a>.</p>
<hr>
<p><em>You can read the original article at <a href="https://roboticseabass.com/2022/07/19/task-planning-in-robotics/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Roboticseabass.com</a>.</em></p>
]]></content:encoded>
					
		
		<enclosure url="https://roboticseabass.com/wp-content/uploads/2022/07/pyrobosim_tamp_01_simple.mp4" length="1090585" type="video/mp4" />
<enclosure url="https://roboticseabass.com/wp-content/uploads/2022/07/pyrobosim_tamp_02_derived.mp4" length="1662392" type="video/mp4" />

			</item>
		<item>
		<title>UBR-1 on ROS2 Humble</title>
		<link>https://robohub.org/ubr-1-on-ros2-humble/</link>
		
		<dc:creator><![CDATA[Michael Ferguson]]></dc:creator>
		<pubDate>Thu, 04 Aug 2022 11:06:23 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://robohub.org/?p=205157</guid>

					<description><![CDATA[It has been a while since I’ve posted to the blog, but lately I’ve actually been working on the UBR-1 again after a somewhat long hiatus. In case you missed the earlier posts in this series: Part 1: Getting started with ROS2 Part 2: Porting robot_controllers Part 3: Porting the head camera ROS2 Humble The [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>It has been a while since I’ve posted to the blog, but lately I’ve actually been working on the UBR-1 again after a somewhat long hiatus. In case you missed the earlier posts in this series:</p>
<ul>
<li><a href="http://www.robotandchisel.com/2020/06/08/ubr1-on-ros2/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Part 1: Getting started with ROS2</a></li>
<li><a href="http://www.robotandchisel.com/2020/06/11/ubr1-on-ros2/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Part 2: Porting robot_controllers</a></li>
<li><a href="http://www.robotandchisel.com/2020/06/16/ubr1-on-ros2/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Part 3: Porting the head camera</a></li>
</ul>
<h2>ROS2 Humble</h2>
<p>The latest ROS2 release came out just a few weeks ago. ROS2 Humble targets Ubuntu 22.04 and is also a long term support (LTS) release, meaning that both the underlying Ubuntu operating system and the ROS2 release get a full 5 years of support.</p>
<p>Since installing operating systems on robots is often a pain, I only use the LTS releases and so I had to migrate from the previous LTS, ROS2 Foxy (on Ubuntu 20.04). Overall, there aren’t many changes to the low-level ROS2 APIs as things are getting more stable and mature. For some higher level packages, such as MoveIt2 and Navigation2, the story is a bit different.</p>
<h2>Visualization</h2>
<p>One of the nice things about the ROS2 Foxy release was that it targeted the same operating system as the final ROS1 release, Noetic. This allowed users to have both ROS1 and ROS2 installed side-by-side. If you’re still developing in ROS1, that means you probably don’t want to upgrade all your computers quite yet. While my robot now runs Ubuntu 22.04, my desktop is still running 18.04.</p>
<p>Therefore, I had to find a way to visualize ROS2 data on a computer that did not have the latest ROS2 installed. Initially I tried the Foxglove Studio, but didn’t have any luck with things actually connecting using the native ROS2 interface (the rosbridge-based interface did work). Foxglove is certainly interesting, but so far it’s not really an RVIZ replacement &#8211; they appear to be more focused on offline data visualization.</p>
<p>I then moved onto running <code>rviz2</code> inside a docker environment &#8211; which works well when using the <a href="https://github.com/osrf/rocker" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">rocker tool</a>:</p>
<p><code>sudo apt-get install python3-rocker<br />
sudo rocker --net=host --x11 osrf/ros:humble-desktop rviz2<br />
</code></p>
<p>If you are using an NVIDIA card, you’ll need to add <code>--nvidia</code> along with <code>--x11</code>.</p>
<p>In order to properly visualize and interact with my UBR-1 robot, I needed to add the <code>ubr1_description</code> package to my workspace in order to get the meshes and also my rviz configurations. To accomplish this, I needed to create my own docker image. I largely based it off the underlying ROS docker images:</p>
<p><code><span class="k">ARG</span><span class="s"> WORKSPACE=/opt/workspace</span></p>
<p><span class="k">FROM</span><span class="s"> osrf/ros:humble-desktop</span></p>
<p><span class="c"># install build tools</span><br />
<span class="k">RUN </span>apt-get update <span class="o">&amp;&amp;</span> apt-get <span class="nb">install</span> <span class="nt">-q</span> <span class="nt">-y</span> <span class="nt">--no-install-recommends</span> <span class="se">\<br />
</span>    python3-colcon-common-extensions <span class="se">\<br />
</span>    git-core <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">rm</span> <span class="nt">-rf</span> /var/lib/apt/lists/<span class="k">*</span></p>
<p><span class="c"># get ubr code</span><br />
<span class="k">ARG</span><span class="s"> WORKSPACE</span><br />
<span class="k">WORKDIR</span><span class="s"> $WORKSPACE/src</span><br />
<span class="k">RUN </span>git clone https://github.com/mikeferguson/ubr_reloaded.git <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr1_bringup/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr1_calibration/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr1_gazebo/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr1_moveit/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr1_navigation/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr_msgs/COLCON_IGNORE <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">touch </span>ubr_reloaded/ubr_teleop/COLCON_IGNORE</p>
<p><span class="c"># install dependencies</span><br />
<span class="k">ARG</span><span class="s"> WORKSPACE</span><br />
<span class="k">WORKDIR</span><span class="s"> $WORKSPACE</span><br />
<span class="k">RUN </span><span class="nb">.</span> /opt/ros/<span class="nv">$ROS_DISTRO</span>/setup.sh <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> apt-get update <span class="o">&amp;&amp;</span> rosdep <span class="nb">install</span> <span class="nt">-q</span> <span class="nt">-y</span> <span class="se">\<br />
</span>      <span class="nt">--from-paths</span> src <span class="se">\<br />
</span>      <span class="nt">--ignore-src</span> <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> <span class="nb">rm</span> <span class="nt">-rf</span> /var/lib/apt/lists/<span class="k">*</span></p>
<p><span class="c"># build ubr code</span><br />
<span class="k">ARG</span><span class="s"> WORKSPACE</span><br />
<span class="k">WORKDIR</span><span class="s"> $WORKSPACE</span><br />
<span class="k">RUN </span><span class="nb">.</span> /opt/ros/<span class="nv">$ROS_DISTRO</span>/setup.sh <span class="se">\<br />
</span>    <span class="o">&amp;&amp;</span> colcon build</p>
<p><span class="c"># setup entrypoint</span><br />
<span class="k">COPY</span><span class="s"> ./ros_entrypoint.sh /</span></p>
<p><span class="k">ENTRYPOINT</span><span class="s"> ["/ros_entrypoint.sh"]</span><br />
<span class="k">CMD</span><span class="s"> ["bash"]</span><br />
</code></p>
<p>The image derives from humble-desktop and then adds the build tools and clones my repository. I then ignore the majority of packages, install dependencies and then build the workspace. The <code>ros_entrypoint.sh</code> script handles sourcing the workspace configuration.</p>
<p><code><span class="c">#!/bin/bash</span><br />
<span class="nb">set</span> <span class="nt">-e</span></p>
<p><span class="c"># setup ros2 environment</span><br />
<span class="nb">source</span> <span class="s2">"/opt/workspace/install/setup.bash"</span><br />
<span class="nb">exec</span> <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span><br />
</code></p>
<p>I could then create the docker image and run rviz inside it:</p>
<p><code>docker build -t ubr:main<br />
sudo rocker --net=host --x11 ubr:main rviz2<br />
</code></p>
<p>The full source of these docker configs is in the <a href="https://github.com/mikeferguson/ubr_reloaded/tree/ros2/docker" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">docker folder</a> of my <code>ubr_reloaded</code> repository. NOTE: The updated code in the repository also adds a late-breaking change to use CycloneDDS as I’ve had numerous connectivity issues with FastDDS that I have not been able to debug.</p>
<h2>Visualization on MacOSX</h2>
<p>I also frequently want to be able to interact with my robot from my Macbook. While I previously <a href="http://www.robotandchisel.com/2020/06/08/ubr1-on-ros2/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">installed ROS2 Foxy on my Intel-based Macbook</a>, the situation is quite changed now with MacOSX being downgraded to Tier 3 support and the new Apple M1 silicon (and Apple’s various other locking mechanisms) making it harder and harder to setup ROS2 directly on the Macbook.</p>
<p>As with the Linux desktop, I tried out Foxglove &#8211; however it is a bit limited on Mac. The MacOSX environment does not allow opening the required ports, so the direct ROS2 topic streaming does not work and you have to use rosbridge. I found I was able to visualize certain topics, but that switching between topics frequently broke.</p>
<p>At this point, I was about to give up, until I noticed that Ubuntu 22.04 arm64 is a Tier 1 platform for ROS2 Humble. I proceeded to install the arm64 version of Ubuntu inside Parallels (Note: I was cheap and initially tried to use the VMWare technology preview, but was unable to get the installer to even boot). There are a few tricks here as there is no arm64 desktop  installer, so you have to install the server edition and then upgrade it to a desktop. There is a <a href="https://askubuntu.com/questions/1405124/install-ubuntu-desktop-22-04-arm64-on-macos-apple-silicon-m1-pro-max-in-parall" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">detailed description of this workflow on askubuntu.com</a>. Installing <code>ros-humble-desktop</code> from arm64 Debians was perfectly easy.</p>
<p><code>rviz2</code> runs relatively quick inside the Parallels VM, but overall it was not quite as quick or stable as using <code>rocker</code> on Ubuntu. However, it is really nice to be able to do some ROS2 development when traveling with only my Macbook.</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels.png" alt="" width="3024" height="1964" class="alignnone size-full wp-image-205160" srcset="https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels.png 3024w, https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels-425x276.png 425w, https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels-1024x665.png 1024w, https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels-768x499.png 768w, https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels-1536x998.png 1536w, https://robohub.org/wp-content/uploads/2022/07/2022-06-21-parallels-2048x1330.png 2048w" sizes="(max-width: 3024px) 100vw, 3024px" />
<h2>Migration Notes</h2>
<p><em>Note: each of the links in this section is to a commit or PR that implements the discussed changes.</em></p>
<p>In the core ROS API, there are only a handful of changes &#8211; and most of them are actually simply fixing potential bugs. The logging macros have been updated for security purposes and require c-strings like the old ROS1 macros did. Additionally the macros are now better at detecting invalid substitution strings. Ament has also gotten better at detecting missing dependencies. The updates I made to <a href="https://github.com/fetchrobotics/robot_controllers/pull/75" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">robot_controllers</a> show just how many bugs were caught by this more strict checking.</p>
<p><code>image_pipeline</code> has had some minor updates since Foxy, mainly to improve consistency between plugins and so I needed to <a href="https://github.com/mikeferguson/ubr_reloaded/commit/f38abff4e3327b0b2dd00f1bf8c026f5cc86d1ad" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">update some topic remappings</a>.</p>
<p>Navigation has the most updates. <code>amcl</code> model type names have been <a href="https://github.com/mikeferguson/ubr_reloaded/commit/139383c460c4bb0bce8d75a7175aa1853e1f1ceb" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">changed</a> since the models are now plugins. The API of costmap layers has changed significantly, and so a number of <a href="https://github.com/mikeferguson/ubr_reloaded/commit/efa29eca53e3c779e61660bf5f6a73104a14a722" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">updates were required</a> just to get the system started. I then made a more detailed pass through the documentation and <a href="https://github.com/mikeferguson/ubr_reloaded/commit/d30da0584df4e521baa2d4e64eee5ab18621d3f7" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">found a few more issues and improvements with my config</a>, especially around the behavior tree configuration.</p>
<p>I also decided to do a proper port of <a href="https://github.com/mikeferguson/graceful_controller" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">graceful_controller</a> to ROS2, starting from the latest ROS1 code since a number of improvements have happened in the past year since I had originally ported to ROS2.</p>
<h2>Next steps</h2>
<p>There are still a number of new features to explore with Navigation2, but my immediate focus is going to shift towards getting MoveIt2 setup on the robot, since I can’t easily swap between ROS1 and ROS2 anymore after upgrading the operating system.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>A newcomer&#8217;s guide to #ICRA2022: Tutorials</title>
		<link>https://robohub.org/a-millennials-guide-to-icra-2022_tutorials/</link>
		
		<dc:creator><![CDATA[AJung Moon]]></dc:creator>
		<pubDate>Mon, 02 May 2022 10:09:43 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[icra2022]]></category>
		<guid isPermaLink="false">https://robohub.org/?p=204227</guid>

					<description><![CDATA[I believe that one of the best ways to get the training you need for a job market in robotics is to attend tutorials at conferences like ICRA. Unlike workshops where you might listen to some work-in-progress, other workshop paper presentations and panel discussions, tutorials are exactly what they sound like. They aim to give [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-large wp-image-204276" src="https://robohub.org/wp-content/uploads/2022/04/Robohub-and-ICRA-template-1024x683.jpeg" alt="" width="1024" height="683" srcset="https://robohub.org/wp-content/uploads/2022/04/Robohub-and-ICRA-template-1024x683.jpeg 1024w, https://robohub.org/wp-content/uploads/2022/04/Robohub-and-ICRA-template-425x283.jpeg 425w, https://robohub.org/wp-content/uploads/2022/04/Robohub-and-ICRA-template-768x512.jpeg 768w, https://robohub.org/wp-content/uploads/2022/04/Robohub-and-ICRA-template.jpeg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>I believe that one of the best ways to get the training you need for a job market in robotics is to attend tutorials at conferences like <a href="https://icra2022.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ICRA</a>. Unlike workshops where you might listen to some work-in-progress, other workshop paper presentations and panel discussions, tutorials are exactly what they sound like. They aim to give you some hands-on learning sessions on technical tools/skills with specific learning objectives.</p>
<p>As such, most tutorials would expect you to come prepared to actively participate and follow along. For instance, the &#8220;Tools for Robotic Reinforcement Learning&#8221; tutorial expects you to come knowing how to code in python and have basic knowledge of reinforcement learning because you&#8217;ll be expected to use those skills/knowledge in the hands-on sessions.</p>
<p>There are seven tutorials this year.</p>
<p>Those interested in the <strong>intersection of machine learning and robotics</strong> (yes, yes, robotics and AI don&#8217;t refer to the same things, even if many people think they are the same) might find the following tutorials interesting.</p>
<ul>
<li><a href="https://araffin.github.io/tools-for-robotic-rl-icra2022/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Tools for Robotic Reinforcement Learning</a></li>
<li><a href="https://www.icra2022av.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Data-driven revolution in autonomous driving</a></li>
<li><a href="https://sites.google.com/utexas.edu/learningfornavigation/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Learning Motion Control for Mobile Robot Navigation &#8211; A Tutorial</a></li>
</ul>
<p>For those who are more into<strong> robots that navigate around our environment</strong>, the <a href="https://www.navability.io/icra-2022-non-gaussian-slam-workshop/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">NavAbility Tutorial Workshop on Non-Gaussian SLAM and Computation</a> is a series of hands-on tutorials that would be highly interesting for you. Be prepared to come with your own laptop to go from getting to know non-gaussian SLAM to solve your SLAM problems.</p>
<p>Meanwhile, roboticists who are more <strong>hardware and design-oriented</strong> might find the <a href="https://projects.iq.harvard.edu/jamming-tutorial" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Jamming in Robotics: From Fundamental Building Blocks to Robotic Applications</a> tutorial useful. By &#8220;jamming&#8221;, they don&#8217;t mean musicians coming together to create cool music together &#8212; I only found this out through the tutorial website. It refers to the way robots can grab items without needing to have traditional, fingered grippers.</p>
<p>The <a href="https://darbelofflab.mit.edu/2022-icra-tutorial/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Tutorial on Koopman Operator and Lifting Linearization: Emerging Theory and Applications of Exact Global Linearization</a> would be interesting for anyone interested in mathy/control/theory side of robotics. Koopman operators have been the buzz in the robotics community recently, and the tutorial is sure to give you the in-depth look at what the buzz is all about.</p>
<p>Lastly, the <a href="http://www.reproducibleroboticsresearch.org/ICRA2022Tutorial" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">How to write an R-article and benchmark your results</a> tutorial is one to watch for. It will tell you all about publishing reproducibility-friendly articles, and emphasize the usefulness of doing research in reproducible ways.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Hands on ground robot &#038; drone design series part I: mechanical &#038; wheels</title>
		<link>https://robohub.org/hands-on-ground-robot-drone-design-series-part-i-mechanical-wheels/</link>
		
		<dc:creator><![CDATA[Robots for Roboticists]]></dc:creator>
		<pubDate>Tue, 01 Mar 2022 09:57:58 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://robohub.org/?p=203673</guid>

					<description><![CDATA[This is a new series looking at the detailed design of various robots. To start with we will be looking at the design of two different robots that were used for the DARPA Subterranean Challenge. Both of these robots were designed for operating in complex subterranean environments, including Caves, Mines &#038; Urban environments. Both of [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_203674" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-203674" src="https://robohub.org/wp-content/uploads/2022/03/subt_robots-1024x554.jpg" alt="" width="1024" height="554" class="size-large wp-image-203674" srcset="https://robohub.org/wp-content/uploads/2022/03/subt_robots-1024x554.jpg 1024w, https://robohub.org/wp-content/uploads/2022/03/subt_robots-425x230.jpg 425w, https://robohub.org/wp-content/uploads/2022/03/subt_robots-768x415.jpg 768w, https://robohub.org/wp-content/uploads/2022/03/subt_robots.jpg 1313w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-203674" class="wp-caption-text">Source: <a href="https://www.subt-explorer.com/post/fall-2020-update" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.subt-explorer.com/post/fall-2020-update</a></p></div>
<p>This is a new series looking at the detailed design of various robots. To start with we will be looking at the design of two different robots that were used for the <a href="https://www.subtchallenge.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">DARPA Subterranean Challenge</a>. Both of these robots were designed for operating in complex subterranean environments, including Caves, Mines &#038; Urban environments. Both of these robots presented are from the Carnegie Mellon University <a href="https://www.subt-explorer.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Explorer team</a>. While I am writing these posts, this was a team effort that required many people to be successful. (If anyone on Team Explorer is reading this, thank you for everything, you are all awesome.)</p>
<p>These posts are skipping the system requirements step of the design process. <a href="http://robotsforroboticists.com/systems-engineering/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">See here for more details on defining system requirements</a>.</p>
<div id="attachment_203675" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-203675" src="https://robohub.org/wp-content/uploads/2022/03/SubT_UGV_Drone-1024x633.jpg" alt="" width="1024" height="633" class="size-large wp-image-203675" srcset="https://robohub.org/wp-content/uploads/2022/03/SubT_UGV_Drone-1024x633.jpg 1024w, https://robohub.org/wp-content/uploads/2022/03/SubT_UGV_Drone-425x263.jpg 425w, https://robohub.org/wp-content/uploads/2022/03/SubT_UGV_Drone-768x475.jpg 768w, https://robohub.org/wp-content/uploads/2022/03/SubT_UGV_Drone.jpg 1098w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-203675" class="wp-caption-text">SubT Ground UGV and DS Drone ImageTeam Explorer R1 Ground Robot and DS Drone <a href="https://www.subt-explorer.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"><em>[Source]</em></a></p></div>
<h3>R3 Ground robot (UGV)</h3>
<p>For the SubT challenge three ground vehicles were developed all of a similiar design. The ground robots were known with the moniker of R#, where # is the order we built them in. The primary difference between the three versions are</p>
<p><strong>R1</strong> – Static Chassis, so the chassis has minimal ground compliance when driving over obstacles and uneven surfaces. R1 was initially supposed to have a differencing mechanism for compliance, however due to time constraints it was left out from this first version. R1 is pictured above.</p>
<p><strong>R2</strong> – Has the differencing mechanism and was designed as initially planned.</p>
<p><strong>R3</strong> – Is almost identical to R2, but smaller. This robot was built for navigating smaller areas and also to be able to climb up and down steps. It also uses different motors for the driving the wheels.</p>
<h3>DS drone</h3>
<p>The original drone design used by Team Explorer called their drones <em>D1</em>, <em>D2</em>, etc.. This let a combination of UGV +Drone go by joint designations such as <em>R2D2</em>. Early on, the team switched to a smaller drone design that was referred to as <em>DS1</em>, <em>DS2</em>, etc.. Where <em>DS</em> is short for <em>Drone Small</em>.</p>
<p>The drone design post are split into two sections. The first is about the actual drone platform, and the second is about the payload that sat on top of the drone. </p>
<h2>Mechanical &#038; wheels</h2>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/03/modular_robot_design.jpg" alt="" width="577" height="430" class="aligncenter size-full wp-image-203676" srcset="https://robohub.org/wp-content/uploads/2022/03/modular_robot_design.jpg 577w, https://robohub.org/wp-content/uploads/2022/03/modular_robot_design-425x317.jpg 425w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>Robot size decision</h3>
<p>After we have the list of <a href="http://robotsforroboticists.com/systems-engineering/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">system requirements</a> we start with the design of the mechanical structure of the robot. In this case we decided that a wheeled robot would be best. We wanted to have the largest wheels possible to help climb over obstacles, however, we also needed to keep our sensors at the top of the vehicle above the wheels and be able to fit in openings 1 x 1 meters. These requirements set the maximum size of the robot as well as the maximum size of the wheels. </p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/03/pastedImage0-1024x569.jpeg" alt="" width="1024" height="569" class="aligncenter size-large wp-image-203677" srcset="https://robohub.org/wp-content/uploads/2022/03/pastedImage0-1024x569.jpeg 1024w, https://robohub.org/wp-content/uploads/2022/03/pastedImage0-425x236.jpeg 425w, https://robohub.org/wp-content/uploads/2022/03/pastedImage0-768x427.jpeg 768w, https://robohub.org/wp-content/uploads/2022/03/pastedImage0-1536x853.jpeg 1536w, https://robohub.org/wp-content/uploads/2022/03/pastedImage0.jpeg 1600w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>The final dimensions of the first two vehicles (R1 and R2) were around (L x W x H) 1.2 x 0.8 x 0.8 meters (3.9 x 2.6 x 2.6 ft). The third smaller vehicle was around 1 x 0.6 m (3.2 x 1.9 ft) and designed to fit through 0.7×0.7 m openings.</p>
<h3>Steering approach</h3>
<p>Early on we also needed to determine the method of driving. Do we want wheels or tracks? Do we want to steer with ackerman steering, rocker-bogie, skid steer, etc.?</p>
<p><a href="http://robotsforroboticists.com/drive-selection/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">See here for more details on steering selection.</a></p>
<p>We chose to use a skid steer four wheeled drive approach for the simplicity of control and the ability to turn in place (point turns). At the start of the competition we were not focused on stair climbing, which might have changed some of our design decisions.</p>
<h3>Suspension</h3>
<p>The next step was to determine the suspension type. A suspension is needed so that all four of the wheels make contact with the ground. If the robot had a static fixed frame only three of the wheels might make contact with the ground when on uneven surfaces. This would reduce our stability and traction.</p>
<p>We decided early on that we wanted a passive suspension for the simplicity of not having active components. With a passive suspension we were looking at different type of body averaging. We roughly had two choices, front-pivot or side-to-side.</p>
<div id="attachment_203678" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-203678" src="https://robohub.org/wp-content/uploads/2022/03/body_averaging_methods-1024x361.jpg" alt="" width="1024" height="361" class="size-large wp-image-203678" srcset="https://robohub.org/wp-content/uploads/2022/03/body_averaging_methods-1024x361.jpg 1024w, https://robohub.org/wp-content/uploads/2022/03/body_averaging_methods-425x150.jpg 425w, https://robohub.org/wp-content/uploads/2022/03/body_averaging_methods-768x271.jpg 768w, https://robohub.org/wp-content/uploads/2022/03/body_averaging_methods.jpg 1217w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-203678" class="wp-caption-text">Left image shows a front-pivot approach. Right image shows a side-to-side differencing method.</p></div>
<p>We decided to choose the front-pivot method, however we decided to make the pivot be roughly centered in the vehicle. This allowed us to put all of the electronics in the front and the batteries in the rear. The front-pivot method we felt would be better for climbing up stairs and for climbing over obstacles on level’ish terrain. Also importantly this approach made it easier to carry a drone on the ground vehicle.</p>
<h3>Chassis design</h3>
<p>At this point we started designing the chassis. This was an important step so that we could estimate the total weight in order to spec the drive-train. Ideas for the chassis were everything from building with 80/20 to building an aluminum frame and populating it with components, to a solid welded chassis. We selected to use a welded steel tube chassis for the strength. We needed a robot that could survive anything we did to it. This proved to be a wise decision when the robot crashed or fell over cliffs. The downside of the steel was increased mass.</p>
<p>For the pivot we found a large <a href="https://www.mcmaster.com/2010N26/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">crossed roller bearing</a> that we were able to use to attach the two steel boxes together. The large bore in the middle was useful for passing wires/cables through for batteries, motors, etc&#8230;</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/03/jpgbase64c08692f2dfef3d84.jpg" alt="" width="277" height="406" class="aligncenter size-full wp-image-203681" />
<p>Part of the chassis design was also determining where all of the components should mount. Having the batteries (green boxes in image above) in the rear helps us climb obstacles. Other goals were to keep the ground clearance as high as possible while keeping the center of gravity (CG) as low as possible. Since those are competing goals, part of the design process was to develop a happy medium.</p>
<p>In order to maintain modularity for service, each wheel module had the motor controller, motor, gear box, and bearing block as a solid unit that could be swapped between robots if there was any issues. This also allowed most of the wiring to be part of that block. The only cables that needed to be connected to each of the modules from the robot were power, CAN communications, and the emergency stop line; all of which were connectorized.</p>
<p>For electronics on R1 and R2 we built an electronics box that was separate from the robot and could be removed from the robot as needed. On R3 we built the electronics into the robot itself. This modular approach was very useful when we had to do some welding to the chassis post-build for modifications. The downside of the modular approach for electronics was that working in the electronics box was more difficult then in the open R3. Also the time for fabricating and wiring the R1/R2 electronics boxes was considerably more than the open R3 electronics. We also had several failures during testing related to the connectors from the electronics boxes.</p>
<h3>Wheel design</h3>
<p>We debated a lot about what type of wheel to use, ultimately we used motorcycle wheels due to the simplicity of obtaining them and mounting them. The wheel diameter we desired also lined up very well with motorcycle wheels. In order to get better traction and ability to climb over obstacles we liked the wider tires.</p>
<p>R1 and R2 had a wheel diameter of 0.55m, R3 had a wheel diameter of 0.38m. This gave R1 and R2 a ground clearance of 0.2m, and R3 a ground clearance of 0.12m.</p>
<p>The wheel hubs ended up being a different story. We found solid metal rims that we had to machine large amounts of metal out of in order to balance the strength and the weight.</p>
<p>The R1 and R2 robots were around 180kg (400lb)*, the wheels were for a vehicle significantly heavier. As such we put a small amount of pressure in the wheels to keep them from falling off, however we tried to keep the pressure low to increase the ground compliance of the wheels. This method added a very small amount of compliance, we tried removing some of the rubber from the sidewalls, but was not able to get a happy medium between limiting the wheel deforming during point turns and increasing ground compliance.</p>
<p>We were also concerned how the motorcycle tires would do when point turning and if we would rip the wheels from the rims. To counter this we installed a beadlock system into each of the wheels. The beadlock was a curved segment installed in multiple places to sandwich the tire to the rim. We never had a wheel separate from the rim, so our approach definitely worked, however it was a pain to install.</p>
<p><em>*R3 was around 90 kg (200 lbs). We tried using different wheels and tracks to get R3 to climb stairs well. However that story is for another post&#8230;</em></p>
<div id="attachment_203682" style="width: 889px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-203682" src="https://robohub.org/wp-content/uploads/2022/03/image-4.jpg" alt="" width="879" height="437" class="size-full wp-image-203682" srcset="https://robohub.org/wp-content/uploads/2022/03/image-4.jpg 879w, https://robohub.org/wp-content/uploads/2022/03/image-4-425x211.jpg 425w, https://robohub.org/wp-content/uploads/2022/03/image-4-768x382.jpg 768w" sizes="(max-width: 879px) 100vw, 879px" /><p id="caption-attachment-203682" class="wp-caption-text">The black rims were solid metal that we machined the wedges into in order to lightweight them. The 3 metal posts in those wedges are the beadlock tensioning bolts. You can also see the castle nut and pin that holds the wheel to the axle. This image is from R2, you can see the gap between the front and rear sections of the robot where the pivot is.</p></div>
<h3>Drive-train selection</h3>
<p>Now that we had a mass estimate and system requirements for speed and obstacle clearance we can start to spec the drive-train. The other piece of information that we needed and had to discuss with the electrical team was the voltage of the battery. Different bus voltages greatly affects the motors available for a given speed and torque. We decided on a 51.2v nominal bus voltage. This presented a problem since it was very hard to find the speed/torques we wanted at that voltage. We ended up selecting a 400W 1/2HP motor+gearbox from <a href="http://robotsforroboticists.com/wiring-oriental-motor-series-motors/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Oriental Motors</a> with a parallel 100:1 gearbox that allows us to drive at a maximum speed of 2.5m/s. </p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2022/03/pngbase6469cfbeba6593c292.png" alt="" width="190" height="207" class="aligncenter size-full wp-image-203683" />
<p>The part numbers of the motors and gearbox on R1 and R2 were <a href="https://catalog.orientalmotor.com/item/all-categories-components/ponents-pinion-shaft-motors-for-use-with-gearheads/blvm640n-gfs" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">BLVM640N-GFS</a> + <a href="https://catalog.orientalmotor.com/item/all-categories-components/gearheads-2/gfs6g100fr" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">GFS6G100FR</a>.</p>
<p>The part numbers of the motors and gearbox on the smaller R3 were Maxon EC 90 Flat + GP81A.</p>
<h2>Next steps</h2>
<p>Now that we know the mechanics of the robot we can start building it. In the next post we will start looking at the electronics and motor controls. While the nature of the blog makes it seem that this design is a serial process, in reality lots of things are happening in parallel. While the mechanical team is designing the chassis, the electrical team is finding the electrical components needed in order for the mechanical person to know what needs mounted.</p>
<p>It is also important to work with the electrical team to figure out wire routing while the chassis is being developed.</p>
<hr>
<p><strong>Note of the editor:</strong> This post has been merged from the posts &#8220;<a href="http://robotsforroboticists.com/hands-on-ground-robot-drone-design-series/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Hands On Ground Robot &#038; Drone Design Series</a>&#8221; and &#8220;<a href="http://robotsforroboticists.com/mechanical-wheels-hands-on-ground-robot-design/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Mechanical &#038; Wheels – Hands On Ground Robot Design</a>&#8220;.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exploring ROS2 with a wheeled robot – #4 – Obstacle avoidance</title>
		<link>https://robohub.org/exploring-ros2-with-a-wheeled-robot-4-obstacle-avoidance/</link>
		
		<dc:creator><![CDATA[The Construct Blog]]></dc:creator>
		<pubDate>Mon, 06 Dec 2021 10:28:30 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://www.theconstructsim.com/?p=26498</guid>

					<description><![CDATA[In this post you&#8217;ll learn how to program a robot to avoid obstacles using ROS2 and C++. Up to the end of the post, the Dolly robot moves autonomously in a scene with many obstacles, simulated using Gazebo 11. You&#8217;ll learn: How to publish AN...]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/11/cover-4.jpeg" alt="" width="589" height="220" class="aligncenter size-full wp-image-202623" srcset="https://robohub.org/wp-content/uploads/2021/11/cover-4.jpeg 589w, https://robohub.org/wp-content/uploads/2021/11/cover-4-425x159.jpeg 425w" sizes="(max-width: 589px) 100vw, 589px" />
<p><strong>By Marco Arruda</strong></p>
<p>In this post you’ll learn how to program a robot to avoid obstacles using ROS2 and C++. Up to the end of the post, the Dolly robot moves autonomously in a scene with many obstacles, simulated using Gazebo 11.</p>
<p>You’ll learn:</p>
<ul>
<li>How to publish AND subscribe topics in the same ROS2 Node</li>
<li>How to avoid obstacles</li>
<li>How to implement your own algorithm in ROS2 and C++</li>
</ul>
<h2>1 – Setup environment – Launch simulation</h2>
<p>Before anything else, make sure you have the rosject from the previous post, you can copy it <a href="https://www.theconstructsim.com/exploring-ros2-using-wheeled-robot-3-moving-the-robot/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">from here</a>.</p>
<p>Launch the simulation in one webshell and in a different tab, checkout the topics we have available. You must get something similar to the image below:</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg" alt="" width="1024" height="331" class="aligncenter size-large wp-image-202432" srcset="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg 1024w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-425x137.jpeg 425w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-768x248.jpeg 768w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics.jpeg 1315w" sizes="(max-width: 1024px) 100vw, 1024px" />
<h2>2 – Create the node</h2>
<p>In order to have our obstacle avoidance algorithm, let’s create a new executable in the file <strong>~/ros2_ws/src/my_package/obstacle_avoidance.cpp</strong>:</p>
<pre style="padding: 20px; background: #333; color: #ddd;">#include "geometry_msgs/msg/twist.hpp"    // Twist
#include "rclcpp/rclcpp.hpp"              // ROS Core Libraries
#include "sensor_msgs/msg/laser_scan.hpp" // Laser Scan

using std::placeholders::_1;

class ObstacleAvoidance : public rclcpp::Node {
public:
  ObstacleAvoidance() : Node("ObstacleAvoidance") {

    auto default_qos = rclcpp::QoS(rclcpp::SystemDefaultsQoS());
    subscription_ = this-&gt;create_subscription(
        "laser_scan", default_qos,
        std::bind(&amp;ObstacleAvoidance::topic_callback, this, _1));
    publisher_ =
        this-&gt;create_publisher("cmd_vel", 10);
  }

private:
  void topic_callback(const sensor_msgs::msg::LaserScan::SharedPtr _msg) {
    // 200 readings, from right to left, from -57 to 57 degress
    // calculate new velocity cmd
    float min = 10;
    for (int i = 0; i &lt; 200; i++) { float current = _msg-&gt;ranges[i];
      if (current &lt; min) { min = current; } } 
    auto message = this-&gt;calculateVelMsg(min);
    publisher_-&gt;publish(message);
  }
  geometry_msgs::msg::Twist calculateVelMsg(float distance) {
    auto msg = geometry_msgs::msg::Twist();
    // logic
    RCLCPP_INFO(this-&gt;get_logger(), "Distance is: '%f'", distance);
    if (distance &lt; 1) {
      // turn around
      msg.linear.x = 0;
      msg.angular.z = 0.3;
    } else {
      // go straight ahead
      msg.linear.x = 0.3;
      msg.angular.z = 0;
    }
    return msg;
  }
  rclcpp::Publisher::SharedPtr publisher_;
  rclcpp::Subscription::SharedPtr subscription_;
};

int main(int argc, char *argv[]) {
  rclcpp::init(argc, argv);
  rclcpp::spin(std::make_shared());
  rclcpp::shutdown();
  return 0;
}
</pre>
<p>In the <strong>main</strong> function we have:</p>
<ul>
<li>Initialize node <strong>rclcpp::init</strong></li>
<li>Keep it running <strong>rclcpp::spin</strong></li>
</ul>
<p>Inside the class constructor:</p>
<ul>
<li>Subcribe to the laser scan messages: <strong>subscription_</strong></li>
<li>Publish to the robot diff driver: <strong>publisher_</strong></li>
</ul>
<p>The obstacle avoidance intelligence goes inside the method <strong>calculateVelMsg</strong>. This is where decisions are made based on the laser readings. Notice that is depends purely on the minimum distance read from the message.</p>
<p>If you want to customize it, for example, consider only the readings in front of the robot, or even check if it is better to turn left or right, this is the place you need to work on! Remember to adjust the parameters, because the way it is, only the minimum value comes to this method.</p>
<h2>3 – Compile the node</h2>
<p>This executable depends on both <strong>geometry_msgs</strong> and <strong>sensor_msgs</strong>, that we have added in the two previous posts of this series. Make sure you have them at the beginning of the <strong>~/ros2_ws/src/my_package/CMakeLists.txt</strong> file:</p>
<pre style="padding: 20px; background: #333; color: #ddd;"># find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
</pre>
<p>And finally, add the executable and install it:</p>
<pre style="padding: 20px; background: #333; color: #ddd;"># obstacle avoidance
add_executable(obstacle_avoidance src/obstacle_avoidance.cpp)
ament_target_dependencies(obstacle_avoidance rclcpp sensor_msgs geometry_msgs)

...

install(TARGETS
  reading_laser
  moving_robot
  obstacle_avoidance
  DESTINATION lib/${PROJECT_NAME}/
)
</pre>
<p>Compile the package:<br />
<code>colcon build --symlink-install --packages-select my_package</code></p>
<h2>4 – Run the node</h2>
<p>In order to run, use the following command:<br />
<code>ros2 run my_package obstacle_avoidance</code></p>
<p>It will not work for this robot! Why is that? We are subscribing and publishing to generic topics: <strong>cmd_vel</strong> and <strong>laser_scan</strong>.</p>
<p>We need a launch file to remap these topics, let’s create one at <strong>~/ros2_ws/src/my_package/launch/obstacle_avoidance.launch.py</strong>:</p>
<pre style="padding: 20px; background: #333; color: #ddd;">from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    obstacle_avoidance = Node(
        package='my_package',
        executable='obstacle_avoidance',
        output='screen',
        remappings=[
            ('laser_scan', '/dolly/laser_scan'),
            ('cmd_vel', '/dolly/cmd_vel'),
        ]
    )

    return LaunchDescription([obstacle_avoidance])

</pre>
<p>Recompile the package, source the workspace once more and launch it:<br />
<code>colcon build --symlink-install --packages-select my_package<br />
source ~/ros2_ws/install/setup.bash<br />
ros2 launch my_package obstacle_avoidance.launch.py</code></p>
<img decoding="async" src="https://www.theconstructsim.com/wp-content/uploads/2021/11/obstacle-avoidance.gif" alt="" width="1024" height="331" class="aligncenter size-large wp-image-202432" />
<h3>Related courses &amp; extra links:</h3>
<ul>
<li><a href="https://bit.ly/3mTKXqg" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS2 Basics for C++</a></li>
<li><a href="http://rosject.io/l/c97a829/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Copy my rosject here</a></li>
<li><a href="https://github.com/chapulina/dolly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Dolly robot – Official repo</a></li>
</ul>
<p><em>The post <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/exploring-ros2-with-a-wheeled-robot-4-obstacle-avoidance/" data-wpel-link="external" target="_blank">Exploring ROS2 with a wheeled robot – #4 – Obstacle Avoidance</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/" data-wpel-link="external" target="_blank">The Construct</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exploring ROS2 using wheeled Robot – #3 – Moving the robot</title>
		<link>https://robohub.org/exploring-ros2-using-wheeled-robot-3-moving-the-robot/</link>
		
		<dc:creator><![CDATA[The Construct Blog]]></dc:creator>
		<pubDate>Tue, 30 Nov 2021 16:21:19 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://www.theconstructsim.com/?p=26493</guid>

					<description><![CDATA[In this post you&#8217;ll learn how to publish to a ROS2 topic using ROS2 C++. Up to the end of the video, we are moving the robot Dolly robot, simulated using Gazebo 11. You&#8217;ll learn: How to create a node with ROS2 and C++ How to public to a top...]]></description>
										<content:encoded><![CDATA[<p><strong>By Marco Arruda</strong></p>
<p>In this post you’ll learn how to publish to a ROS2 topic using ROS2 C++. Up to the end of the video, we are moving the robot Dolly robot, simulated using Gazebo 11.</p>
<p>You’ll learn:</p>
<ul>
<li>How to create a node with ROS2 and C++</li>
<li>How to public to a topic with ROS2 and C++</li>
</ul>
<h2>1 – Setup environment – Launch simulation</h2>
<p>Before anything else, make sure you have the rosject from the previous post, you can copy it <a href="https://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">from here</a>.</p>
<p>Launch the simulation in one webshell and in a different tab, checkout the topics we have available. You must get something similar to the image below:</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg" alt="" width="1024" height="331" class="aligncenter size-large wp-image-202432" srcset="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg 1024w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-425x137.jpeg 425w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-768x248.jpeg 768w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics.jpeg 1315w" sizes="(max-width: 1024px) 100vw, 1024px" />
<h2>2 – Create a topic publisher</h2>
<p>Create a new file to container the publisher node: <strong>moving_robot.cpp</strong> and paste the following content:</p>
<pre style="padding: 20px; background-color: #333; color: #ddd;">#include &lt;chrono&gt;
#include &lt;functional&gt;
#include &lt;memory&gt;

#include "rclcpp/rclcpp.hpp"
#include "geometry_msgs/msg/twist.hpp"

using namespace std::chrono_literals;

/* This example creates a subclass of Node and uses std::bind() to register a
 * member function as a callback from the timer. */

class MovingRobot : public rclcpp::Node {
public:
  MovingRobot() : Node("moving_robot"), count_(0) {
    publisher_ =
        this-&gt;create_publisher("/dolly/cmd_vel", 10);
    timer_ = this-&gt;create_wall_timer(
        500ms, std::bind(&amp;MovingRobot::timer_callback, this));
  }

private:
  void timer_callback() {
    auto message = geometry_msgs::msg::Twist();
    message.linear.x = 0.5;
    message.angular.z = 0.3;
    RCLCPP_INFO(this-&gt;get_logger(), "Publishing: '%f.2' and %f.2",
                message.linear.x, message.angular.z);
    publisher_-&gt;publish(message);
  }
  rclcpp::TimerBase::SharedPtr timer_;
  rclcpp::Publisher::SharedPtr publisher_;
  size_t count_;
};

int main(int argc, char *argv[]) {
  rclcpp::init(argc, argv);
  rclcpp::spin(std::make_shared());
  rclcpp::shutdown();
  return 0;
}QoS (Quality of Service)
</pre>
<p>Similar to the subscriber it is created a class that inherits <strong>Node</strong>. A <strong>publisher_</strong> is setup and also a callback, although this time is not a callback that receives messages, but a <strong>timer_callback</strong> called in a frequency defined by the <strong>timer_</strong> variable. This callback is used to publish messages to the robot.</p>
<p>The <strong>create_publisher</strong> method needs two arguments:</p>
<ul>
<li>topic name</li>
<li><a href="https://docs.ros2.org/foxy/api/rclcpp/classrclcpp_1_1QoS.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">QoS (Quality of Service)</a> – This is the policy of data saved in the queue. You can make use of different middlewares or even use some provided by default. We are just setting up a queue of 10. By default, it keeps the last 10 messages sent to the topic.</li>
</ul>
<p>The message published must be created using the class imported:</p>
<p><code>message = geometry_msgs::msg::Twist();</code></p>
<p>We ensure the callback methods on the subscribers side will always recognize the message. This is the way it has to be published by using the publisher method <strong>publish</strong>.</p>
<h2>3 – Compile and run the node</h2>
<p>In order to compile we need to adjust some things in the <strong>~/ros2_ws/src/my_package/CMakeLists.txt</strong>. So add the following to the file:</p>
<ul>
<li>Add the <strong>geometry_msgs</strong> dependency</li>
<li>Append the executable <strong>moving_robot</strong></li>
<li>Add install instruction for <strong>moving_robot</strong></li>
</ul>
<pre style="padding: 20px; background: #333; color: #ddd;">find_package(geometry_msgs REQUIRED)
...
# moving robot
add_executable(moving_robot src/moving_robot.cpp)
ament_target_dependencies(moving_robot rclcpp geometry_msgs)
...
install(TARGETS
  moving_robot
  reading_laser
  DESTINATION lib/${PROJECT_NAME}/
)
</pre>
<p>We can run the node like below:</p>
<p><code>source ~/ros2_ws/install/setup.bash<br />
ros2 run my_package</code></p>
<img decoding="async" src="https://www.theconstructsim.com/wp-content/uploads/2021/11/moving-robot.gif" alt="" width="1024" height="331" class="aligncenter size-large wp-image-202432" />
<h3>Related courses &amp; extra links:</h3>
<ul>
<li><a href="https://bit.ly/3mTKXqg" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS2 Basics for C++</a></li>
<li><a href="http://rosject.io/l/c97a829/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Copy my rosject here</a></li>
<li><a href="https://github.com/chapulina/dolly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Dolly robot – Official repo</a></li>
</ul>
<p><em>The post <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/exploring-ros2-using-wheeled-robot-3-moving-the-robot/" data-wpel-link="external" target="_blank">Exploring ROS2 using wheeled Robot – #3 – Moving the Robot<br />
</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/" data-wpel-link="external" target="_blank">The Construct</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exploring ROS2 with wheeled robot – #2 – How to subscribe to ROS2 laser scan topic</title>
		<link>https://robohub.org/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/</link>
		
		<dc:creator><![CDATA[The Construct Blog]]></dc:creator>
		<pubDate>Thu, 11 Nov 2021 16:39:13 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://www.theconstructsim.com/?p=26483</guid>

					<description><![CDATA[This is the 1st chapter of the series “Exploring ROS2 with a wheeled robot” In this episode, you&#8217;ll learn how to subscribe to a ROS2 topic using ROS2 C++. You&#8217;ll learn: How to create a node with ROS2 and C++ How to subscribe to a topic with...]]></description>
										<content:encoded><![CDATA[<p><strong>By Marco Arruda</strong></p>
<p>This is the second chapter of the series “Exploring ROS2 with a wheeled robot”. In this episode, you’ll learn how to subscribe to a ROS2 topic using ROS2 C++.</p>
<p>You’ll learn:</p>
<ul>
<li>How to create a node with ROS2 and C++</li>
<li>How to subscribe to a topic with ROS2 and C++</li>
<li>How to launch a ROS2 node using a launch file</li>
</ul>
<h2>1 – Setup environment – Launch simulation</h2>
<p>Before anything else, make sure you have the rosject from the previous post, you can copy it <a href="https://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-1-launch-ros2-simulation/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">from here</a>.</p>
<p>Launch the simulation in one webshell and in a different tab, checkout the topics we have available. You must get something similar to the image below:</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg" alt="" width="1024" height="331" class="aligncenter size-large wp-image-202432" srcset="https://robohub.org/wp-content/uploads/2021/11/dolly-topics-1024x331.jpeg 1024w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-425x137.jpeg 425w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics-768x248.jpeg 768w, https://robohub.org/wp-content/uploads/2021/11/dolly-topics.jpeg 1315w" sizes="(max-width: 1024px) 100vw, 1024px" />
<h2>2 – Create a ROS2 node</h2>
<p>Our goal is to read the laser data, so create a new file called <strong>reading_laser.cpp</strong>:</p>
<p><code>touch ~/ros2_ws/src/my_package/reading_laser.cpp</code></p>
<p>And paste the content below:</p>
<pre style="padding: 20px; background-color: #333; color: #ddd;">#include "rclcpp/rclcpp.hpp"
#include "sensor_msgs/msg/laser_scan.hpp"

using std::placeholders::_1;

class ReadingLaser : public rclcpphttps://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/::Node {

public:
  ReadingLaser() : Node("reading_laser") {

    auto default_qos = rclcpp::QoS(rclcpp::SystemDefaultsQoS());

    subscription_ = this-&gt;create_subscription(
        "laser_scan", default_qos,
        std::bind(&amp;ReadingLaser::topic_callback, this, _1));
  }

private:
  void topic_callback(const sensor_msgs::msg::LaserScan::SharedPtr _msg) {
    RCLCPP_INFO(this-&gt;get_logger(), "I heard: '%f' '%f'", _msg-&gt;ranges[0],
                _msg-&gt;ranges[100]);
  }
  rclcpp::Subscription::SharedPtr subscription_;
};

int main(int argc, char *argv[]) {
  rclcpp::init(argc, argv);
  auto node = std::make_shared();
  RCLCPP_INFO(node-&gt;get_logger(), "Hello my friends");
  rclcpp::spin(node);
  rclcpp::shutdown();
  return 0;
}</pre>
<p>We are creating a new class <strong>ReadingLaser</strong> that represents the node (it inherits <strong>rclcpp::Node</strong>). The most important about that class are the subscriber attribute and the method callback. In the <strong>main</strong> function we are initializing the node and keep it alive (<strong>spin</strong>) while its ROS connection is valid.</p>
<p>The subscriber constructor expects to get a QoS, that stands for the middleware used for the <a href="https://docs.ros2.org/dashing/api/rclcpp/classrclcpp_1_1QoS.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">quality of service</a>. You can have more information about it in the reference attached, but in this post we are just using the default QoS provided. Keep in mind the following parameters:</p>
<ul>
<li>topic name</li>
<li>callback method</li>
</ul>
<p>The callback method needs to be binded, which means it will not be execute at the subscriber declaration, but when the callback is called. So we pass the reference of the method and setup the <strong>this</strong> reference for the current object to be used as callback, afterall the method itself is a generic implementationhttps://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/ of a class.</p>
<h2>3 – Compile and run</h2>
<p>In order to compile the <strong>cpp</strong> file, we must add some instructions to the <strong>~/ros2_ws/src/my_package/src/CMakeLists.txt</strong>:</p>
<ul>
<li>Look for find dependencies and include the sensor_msgs library</li>
<li>Just before the install instruction add the executable and target its dependencies</li>
<li>Append another install instruction for the new executable we’ve just created</li>
</ul>
<pre style="padding: 20px; background-color: #333; color: #ddd;"># find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
...

...
add_executable(reading_laser src/reading_laser.cpp)
ament_target_dependencies(reading_laser rclcpp std_msgs sensor_msgs)
...

...
install(TARGETS
  reading_laser
  DESTINATION lib/${PROJECT_NAME}/
)</pre>
<p>Compile it:</p>
<p><code>colcon build --symlink-install --packages-select my_package</code></p>
<h2>4 – Run the node and mapping the topic</h2>
<p>In order to run the executable created, you can use:</p>
<p><code>ros2 run my_package reading_laser</code></p>
<p>Although the the laser values won’t show up. That’s because we have a “hard coded” topic name <strong>laser_scan</strong>. No problem at all, when we can map topics using launch files. Create a new launch file <strong>~/ros2_ws/src/my_package/launch/reading_laser.py</strong>:</p>
<pre style="padding: 20px; background-color: #333; color: #ddd;">from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    reading_laser = Node(
        package='my_package',
        executable='reading_laser',https://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/
        output='screen',
        remappings=[
            ('laser_scan', '/dolly/laser_scan')
        ]
    )

    return LaunchDescription([
        reading_laser
    ])</pre>
<p>In this launch file there is an instance of a node getting the executable as argument and it is setup the <strong>remappings</strong> attribute in order to remap from <strong>laser_scan</strong> to <strong>/dolly/laser_scan</strong>.</p>
<p>Run the same node using the launch file this time:</p>
<p><code>ros2 launch my_package reading_laser.launch.py</code></p>
<p>Add some obstacles to the world and the result must be similar to:</p>
<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/11/launch-reading-laser-1024x396.jpeg" alt="" width="1024" height="396" class="aligncenter size-large wp-image-202433" srcset="https://robohub.org/wp-content/uploads/2021/11/launch-reading-laser-1024x396.jpeg 1024w, https://robohub.org/wp-content/uploads/2021/11/launch-reading-laser-425x164.jpeg 425w, https://robohub.org/wp-content/uploads/2021/11/launch-reading-laser-768x297.jpeg 768w, https://robohub.org/wp-content/uploads/2021/11/launch-reading-laser.jpeg 1389w" sizes="(max-width: 1024px) 100vw, 1024px" />
<h3>Related courses &amp; extra links:</h3>
<ul>
<li><a href="https://bit.ly/3mTKXqg" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS2 Basics for C++</a></li>
<li><a href="http://rosject.io/l/c97a829/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Copy my rosject here</a></li>
<li><a href="https://github.com/chapulina/dolly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Dolly robot – Official repo</a></li>
</ul>
<p><em>The post <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-2-how-to-subscribe-to-ros2-laser-scan-topic/" data-wpel-link="external" target="_blank">Exploring ROS2 with wheeled robot – #2 – How to subscribe to ROS2 laser scan topic</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/" data-wpel-link="external" target="_blank">The Construct</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exploring ROS2 with wheeled robot – #1 – Launch ROS2 Simulation</title>
		<link>https://robohub.org/exploring-ros2-with-wheeled-robot-1-launch-ros2-simulation/</link>
		
		<dc:creator><![CDATA[The Construct Blog]]></dc:creator>
		<pubDate>Fri, 05 Nov 2021 13:11:11 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://www.theconstructsim.com/?p=26461</guid>

					<description><![CDATA[This is the 1st chapter of the series &#8220;Exploring ROS2 with a wheeled robot&#8221;In this episode, we setup our first ROS2 simulation using Gazebo 11.From cloning, compiling and creating a package + launch file to start the simulation! &#160; You&#38;...]]></description>
										<content:encoded><![CDATA[<p><strong>By Marco Arruda</strong></p>
<p>This is the first chapter of the series “Exploring ROS2 with a wheeled robot”. In this episode, we setup our first ROS2 simulation using Gazebo 11. From cloning, compiling and creating a package + launch file to start the simulation!</p>
<p>You’ll learn:</p>
<ul>
<li>How to Launch a simulation using ROS2</li>
<li>How to Compile ROS2 packages</li>
<li>How to Create launch files with ROS2</li>
</ul>
<h2>1 – Start the environment</h2>
<p>In this series we are using ROS2 foxy, go to <a href="https://app.theconstructsim.com/#/RosjectCreate" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">this page</a>, create a new rosject selecting ROS2 Foxy distro and and run it.</p>
<img decoding="async" class="aligncenter size-full wp-image-2023722327" src="https://www.theconstructsim.com/wp-content/uploads/2021/11/create-run.gif" alt="" width="900" height="353" />
<h2>2 – Clone and compile the simulation</h2>
<p>The first step is to clone the <a href="https://github.com/chapulina/dolly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">dolly robot</a> package. Open a web shell and execute the following:<br />
<code><br />
cd ~/ros2_ws/src/<br />
git clone https://github.com/chapulina/dolly.git<br />
</code></p>
<p>Source the ROS 2 installation folder and compile the workspace:<br />
<code><br />
source /opt/ros/foxy/setup.bash<br />
cd ~/ros2_ws<br />
colcon build --symlink-install --packages-ignore dolly_ignition<br />
</code></p>
<p>Notice we are ignoring the ignition related package, that’s because we will work only with gazebo simulator.</p>
<h2>3 – Create a new package and launch file</h2>
<p>In order to launch the simulation, we will create the launch file from the scratch. It goes like:<br />
<code><br />
cd ~/ros2_ws/src<br />
ros2 pkg create my_package --build-type ament_cmake --dependencies rclcpp<br />
</code></p>
<p>After that, you must have the new folder <strong>my_package</strong> in your workspace. Create a new folder to contain launch files and the new launch file as well:<br />
<code><br />
mkdir -p ~/ros2_ws/src/my_package/launch<br />
touch ~/ros2_ws/src/my_package/launch/dolly.launch.py<br />
</code></p>
<p>Copy and paste the following to the new launch file:</p>
<pre style="padding: 20px; background-color: #333; color: #ddd;">
import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource

def generate_launch_description():

    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')
    pkg_dolly_gazebo = get_package_share_directory('dolly_gazebo')

    gazebo = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(pkg_gazebo_ros, 'launch', 'gazebo.launch.py')
        )
    )

    return LaunchDescription([
        DeclareLaunchArgument(
            'world',
            default_value=[
                os.path.join(pkg_dolly_gazebo, 'worlds', 'dolly_empty.world'), ''
            ],
            description='SDF world file',
        ),
        gazebo
    ])
</pre>
<p>Notice that a launch file returns a <strong>LaunchDescription</strong> that contains nodes or other launch files.</p>
<p>In this case, we have just included another launch file <strong>gazebo.launch.py</strong> and changed one of its arguments, the one that stands for the world name: <strong>world</strong>.</p>
<p>The robot, in that case, is included in the world file, so there is no need to have an extra <strong>spawn</strong> node, for example.</p>
<p>And append to the end of the file <strong>~/ros2_ws/src/my_package/CMakeLists.tx</strong>t the following instruction to install the new launch file into the ROS 2 environment:</p>
<pre style="padding: 20px; background-color: #333; color: #ddd;">
install(DIRECTORY
	launch
	DESTINATION share/${PROJECT_NAME}/
)
ament_package()
</pre>
<h2>4 – Compile and launch the simulation</h2>
<p>Use the command below to compile only the created package:<br />
<code><br />
cd ~/ros2_ws/<br />
colcon build --symlink-install --packages-select my_package<br />
source ~/ros2_ws/install/setup.bash<br />
ros2 launch my_package dolly.launch.py<br />
</code></p>
<img decoding="async" class="aligncenter size-full wp-image-20232322377" src="https://www.theconstructsim.com/wp-content/uploads/2021/11/launch-sim.gif" alt="" width="900" height="353" />
<h2>5 – Conclusion</h2>
<p>This is how you can launch a simulation in ROS2. It is important to notice that:</p>
<ul>
<li>We are using a pre-made simulation: world + robot</li>
<li>This is how a launch file is created: A python script</li>
<li>In ROS2, you still have the same freedom of including other files or running executables inside a custom launch file</li>
</ul>
<h3>Related courses &amp; extra links:</h3>
<ul>
<li><a href="https://bit.ly/3mTKXqg" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS2 Basics for C++</a></li>
<li><a href="http://rosject.io/l/c97a829/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Copy my rosject here</a></li>
<li><a href="https://github.com/chapulina/dolly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Dolly robot – Official repo</a></li>
</ul>
<p><em>The post <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/exploring-ros2-with-wheeled-robot-1-launch-ros2-simulation/" data-wpel-link="external" target="_blank">Exploring ROS2 with wheeled robot – #1 – Launch ROS2 Simulation</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.theconstructsim.com/" data-wpel-link="external" target="_blank">The Construct</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Building a 7 axis robot from scratch</title>
		<link>https://robohub.org/building-a-7-axis-robot-from-scratch/</link>
		
		<dc:creator><![CDATA[Daniel Carrillo-Zapata]]></dc:creator>
		<pubDate>Sun, 11 Apr 2021 08:50:53 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[industrial]]></category>
		<guid isPermaLink="false">https://robohub.org/building-a-7-axis-robot-from-scratch/</guid>

					<description><![CDATA[Do you fancy making yourself an industrial robot to enjoy at home? Jeremy Fielding, a passionate fan of mechanical engineering, did. So he built one. Good news is: he&#8217;s preparing a series of videos to teach you the whole process from scratch. How much power do you need to run 7 motors at one time? [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/04/IMG_20210410_120129.jpg" alt="" width="1200" height="750" class="alignnone size-full wp-image-199614" srcset="https://robohub.org/wp-content/uploads/2021/04/IMG_20210410_120129.jpg 1200w, https://robohub.org/wp-content/uploads/2021/04/IMG_20210410_120129-425x266.jpg 425w, https://robohub.org/wp-content/uploads/2021/04/IMG_20210410_120129-1024x640.jpg 1024w, https://robohub.org/wp-content/uploads/2021/04/IMG_20210410_120129-768x480.jpg 768w" sizes="(max-width: 1200px) 100vw, 1200px" />
<p>Do you fancy making yourself an industrial robot to enjoy at home? Jeremy Fielding, a passionate fan of mechanical engineering, did. So he built one. Good news is: he&#8217;s preparing a series of videos to teach you the whole process from scratch. How much power do you need to run 7 motors at one time? If you lose power, how do you prevent the arm from collapsing on you or dropping the load? How do you keep the cost down? He&#8217;s recorded over 100 hours of video, and he&#8217;s planning to teach you how he used the servo motors, how you can use them for your projects and how he designed his 7 axis, articulated robot. <span id="more-199612"></span></p>
<p>Jeremy&#8217;s aim (<a href="http://jeremyfielding.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">website</a>, <a href="https://youtube.com/c/JeremyFieldingSr" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">YouTube</a>, <a href="https://twitter.com/jeremy_fielding" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Twitter</a>, <a href="https://www.instagram.com/jeremy_fielding/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Instagram</a>) is simple: draw people to engineering with amazing projects, inspire them with ideas, then teach them how to do it. And for this video series, <strong>he&#8217;s also looking for your collaboration</strong>. So if you&#8217;ve got experience and knowledge on building this type of robots and you&#8217;d like to share it, maybe you end up being part of the series!</p>
<p>We&#8217;d like to thank <a href="https://mobile.twitter.com/BlackInRobotics" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Black in Robotics</a> for making it possible for us to discover Jeremy. Here&#8217;s the video Jeremy has released to introduce his project:</p>
<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">We had to go find this guy on YouTube because he looked very cool! <a href="https://t.co/xomix1TZXo" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://t.co/xomix1TZXo</a> <a href="https://twitter.com/jeremy_fielding?ref_src=twsrc%5Etfw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">@jeremy_fielding</a> <a href="https://twitter.com/hashtag/BlackInRobotics?src=hash&amp;ref_src=twsrc%5Etfw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">#BlackInRobotics</a> <a href="https://twitter.com/hashtag/NationalRoboticsWeek?src=hash&amp;ref_src=twsrc%5Etfw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">#NationalRoboticsWeek</a> <a href="https://twitter.com/RoboWeek?ref_src=twsrc%5Etfw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">@RoboWeek</a></p>
<p>&mdash; Black in Robotics (@BlackInRobotics) <a href="https://twitter.com/BlackInRobotics/status/1380637151457595400?ref_src=twsrc%5Etfw" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">April 9, 2021</a></p></blockquote>
<p> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>Check out <a href="https://youtube.com/c/JeremyFieldingSr" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Jeremy&#8217;s YouTube channel</a> to discover many more instructional videos. You can also support his work on <a href="https://www.patreon.com/jeremyfieldingsr" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Patreon</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>RoMi-H: Bringing robot traffic control to healthcare</title>
		<link>https://robohub.org/romi-h-bringing-robot-traffic-control-to-healthcare/</link>
		
		<dc:creator><![CDATA[Open Robotics]]></dc:creator>
		<pubDate>Mon, 15 Feb 2021 08:51:27 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[healthcare]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[research]]></category>
		<guid isPermaLink="false">https://robohub.org/romi-h-bringing-robot-traffic-control-to-healthcare/</guid>

					<description><![CDATA[Imagine for a moment that a road is used only for a single car and driver. Everything is smooth and wonderful. Then you wake up from that utopian dream and remember that our road networks have multiple cars of varying sizes, from different manufacturers, each with a driver with unique behaviors behind the wheel. We [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="https://robohub.org/wp-content/uploads/2021/02/mir-trolley-bed.jpeg" alt="RoMi-H robot with hospital bed behind" width="750" height="396" class="alignnone size-full wp-image-199088" srcset="https://robohub.org/wp-content/uploads/2021/02/mir-trolley-bed.jpeg 750w, https://robohub.org/wp-content/uploads/2021/02/mir-trolley-bed-425x224.jpeg 425w" sizes="(max-width: 750px) 100vw, 750px" />
<p>Imagine for a moment that a road is used only for a single car and driver. Everything is smooth and wonderful. Then you wake up from that utopian dream and remember that our road networks have multiple cars of varying sizes, from different manufacturers, each with a driver with unique behaviors behind the wheel. We quickly realize that traffic conventions and rules are in place to avoid complete and utter chaos. We believe with increasing robotic use cases in the public domain as we all do see, a similar parallel reality needs to be realized and we propose that <strong>RoMi-H</strong>, an open-source robot and infrastructure framework that simplifies cross fleet robot collaboration, is the way to achieve this coming reality! <span id="more-199093"></span></p>
<p>Even before the onset of COVID-19, the number of robots and automation technologies introduced and tested in the healthcare industry has been skyrocketing. Service robots perform an ever increasing and diverse set of tasks; taking on smaller and more sensitive deliveries in some cases and relying more heavily on shared infrastructure such as elevators (lifts), doors, and passageways. No single robotics or automation provider can supply the breadth of solutions required in a modern healthcare facility and no facility can afford to operate siloed systems requiring dedicated infrastructure and operating unique user interfaces. Therein lies the challenge.</p>
<div id="attachment_199073" style="width: 660px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-199073" class="thumb-image loaded" data-src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014706116-VT36NTAK34D8UK9Y1YH8/ke17ZwdGBToddI8pDm48kE-wpQQ3Omt30mO7_21Vg9lZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwUxeIUeUlZd68rWug3y0GoIvFh1kr3-RU3QZIEHFwrG7sLG1wJ1gDx9hy3792rL1Q/rmf_test.gif" data-image="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014706116-VT36NTAK34D8UK9Y1YH8/ke17ZwdGBToddI8pDm48kE-wpQQ3Omt30mO7_21Vg9lZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwUxeIUeUlZd68rWug3y0GoIvFh1kr3-RU3QZIEHFwrG7sLG1wJ1gDx9hy3792rL1Q/rmf_test.gif" data-image-dimensions="589x340" data-image-focal-point="0.5,0.5" data-load="false" data-image-id="6024a6a99a63bc2171a19dc3" data-type="image" style="left: 0%; top: 0%; width: 100%; height: 100%;" alt="GIF showing RoMi-H moving around a hospital" data-image-resolution="750w" src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014706116-VT36NTAK34D8UK9Y1YH8/ke17ZwdGBToddI8pDm48kE-wpQQ3Omt30mO7_21Vg9lZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwUxeIUeUlZd68rWug3y0GoIvFh1kr3-RU3QZIEHFwrG7sLG1wJ1gDx9hy3792rL1Q/rmf_test.gif?format=750w"><p id="caption-attachment-199073" class="wp-caption-text">ROMI-H allows robots from different vendors to interact with each other as well physical assets in the hospital like elevators. The robots can even avoid gurneys and people.</p></div>
<p>First announced in <a href="https://www.openrobotics.org/blog/2018/7/18/taking-ros-and-gazebo-into-healthcare" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">July 2018</a>, Robotic Middleware for Healthcare (RoMi-H) is a unique open-source system built on ROS 2 and simulated using the Gazebo simulator. It allows for uniform communication and monitoring across robot platforms, sensors, and enterprise information systems. A brief explanation of this initiative can be found in WIRED Magazine: <a href="https://www.wired.com/story/robots-fill-workplace-must-learn-get-along" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">As Robots Fill the Workplace, They Must Learn to Get Along</a>. In tomorrow’s reality, interoperability must be front and center for every developer, manufacturer, systems integrator, and end-user.</p>
<p>As we have written before:</p>
<blockquote><p>We need food-delivery robots from one vendor to communicate with drug-delivery robots from another vendor. We need a unified approach to command and control for all the robots in a facility. We need a reliable way to develop and test multi-vendor systems in software simulation prior to deployment. And for it to succeed we need this critical interoperability infrastructure to be open source.</p></blockquote>
<p>Under the leadership of Singapore’s <a href="https://www.edb.gov.sg/en/our-industries/company-highlights/centre-for-healthcare-assistive-and-robotics-technologies.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Centre for Healthcare Assistive and Robotics Technology (CHART)</a> and with collaborators such as <a href="https://www.ihis.com.sg/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">IHiS</a>, <a href="https://www.hopetechnik.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Hope Technik</a>, GovTech and other solution providers, Open Robotics has been working since 2018 to develop an open-source software solution. Its goal is to realize the potential of a vendor agnostic and interoperable communication system for heterogeneous robots, sensors, and information systems in the healthcare space. To accelerate its development we are encouraging contributions to the open-source codebase to accelerate the development of a robust and sustainable system.</p>
<div id="attachment_199073w4234u" style="width: 660px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-199073w4234u" class="thumb-image loaded" data-src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014774926-D04X66K0IPW4OG1BG7F8/ke17ZwdGBToddI8pDm48kGf0O7A_HxGrMqr2EO-9n7xZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpx8TPFrKUn2Pvks6SewwsQh3HIgKnR3VWxhNUPm0bNdGM6t62dpViNssh1QePmzLzw/rmf_map.gif" data-image="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014774926-D04X66K0IPW4OG1BG7F8/ke17ZwdGBToddI8pDm48kGf0O7A_HxGrMqr2EO-9n7xZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpx8TPFrKUn2Pvks6SewwsQh3HIgKnR3VWxhNUPm0bNdGM6t62dpViNssh1QePmzLzw/rmf_map.gif" data-image-dimensions="657x302" data-image-focal-point="0.5,0.5" data-load="false" data-image-id="6024a6f50eaaac6d418fdea5" data-type="image" style="left: 0%; top: 0%; width: 100%; height: 100%;" alt="RVIZ Shows each robot’s planned path as well as keep out areas for other robots with ROMI-H" data-image-resolution="750w" src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613014774926-D04X66K0IPW4OG1BG7F8/ke17ZwdGBToddI8pDm48kGf0O7A_HxGrMqr2EO-9n7xZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpx8TPFrKUn2Pvks6SewwsQh3HIgKnR3VWxhNUPm0bNdGM6t62dpViNssh1QePmzLzw/rmf_map.gif?format=750w"><p id="caption-attachment-199073w4234u" class="wp-caption-text">RVIZ Shows each robot’s planned path as well as keep out areas for other robots with ROMI-H</p></div>
<p>In order to understand the underlying mechanics of RoMi-H, we encourage you to take a look at <a href="https://osrf.github.io/ros2multirobotbook/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Programming Multiple Robots with ROS 2</a>. It is being continuously updated and will provide you with a thorough explanation of ROS 2 &#8212; upon which RoMi-H is built &#8212; and the core <a href="https://github.com/osrf/rmf_core" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Robotics Middleware Framework (RMF)</a> that serves to power RoMi-H. The book also features a tutorial on how one might build a web application that can interface with RoMi-H to create useful applications for robot operators or user-facing tools for the robotics industry.</p>
<p>RoMi-H is able to apply the same software across the different robotic systems while ROS 2 manages the communication and data routing from machine to machine; allowing for real-time, dependable and high-performance data exchanges via a publish-subscribe pattern. Publishers group their messages into different classes and subscribers receive information from the classes of messages they have indicated an interest in. This allows RMF to provide a common platform for integrating heterogeneous robotic systems.</p>
<p>We see the RoMi-H project as a significant step, encouraging an open and integrated approach to robotics development and digitising healthcare. We are looking forward to receiving feedback and contributions from interested parties.</p>
<div id="attachment_199073w4233234u" style="width: 660px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-199073w4233234u" class="thumb-image loaded" data-src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613015411518-AQ0AFBW7PAQNWIR7YMCT/ke17ZwdGBToddI8pDm48kDwUjZgD5-p5wPSer_CNclVZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpyxcRmg89VRQ8wenWD0VBP_dsK9Faa8Er15pXkLPTXo7hLA4Gbmbzm9RZXboaVSVSM/rmf_sim.gif" data-image="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613015411518-AQ0AFBW7PAQNWIR7YMCT/ke17ZwdGBToddI8pDm48kDwUjZgD5-p5wPSer_CNclVZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpyxcRmg89VRQ8wenWD0VBP_dsK9Faa8Er15pXkLPTXo7hLA4Gbmbzm9RZXboaVSVSM/rmf_sim.gif" data-image-dimensions="707x378" data-image-focal-point="0.5,0.5" data-load="false" data-image-id="6024a96b79acc7282e491af1" data-type="image" style="left: 0%; top: -0.0344152%; width: 100%; height: 100.069%;" alt="RMF can take a simple map and translate it into a Gazebo simulation. The entire system is powered by ROS 2." data-image-resolution="750w" src="https://images.squarespace-cdn.com/content/v1/57daacd7f7e0ab084d5efbf0/1613015411518-AQ0AFBW7PAQNWIR7YMCT/ke17ZwdGBToddI8pDm48kDwUjZgD5-p5wPSer_CNclVZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpyxcRmg89VRQ8wenWD0VBP_dsK9Faa8Er15pXkLPTXo7hLA4Gbmbzm9RZXboaVSVSM/rmf_sim.gif?format=750w"><p id="caption-attachment-199073w4233234u" class="wp-caption-text">RMF can take a simple map and translate it into a Gazebo simulation. The entire system is powered by ROS 2.</p></div>
<p><strong>Learn More</strong></p>
<p>A public webinar that introduced RMF and featured a live demonstration took place on 18 August 2020 in the CHART Lab. The presentations and recordings can be viewed <a href="https://www.cgh.com.sg/chart/sharp/romi-h" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>. At the same time, if you are interested in finding out more and viewing the source code, do check out the ROS 2 book and the following repositories: </p>
<p>ROS 2 Book: </p>
<ul>
<li><a href="https://osrf.github.io/ros2multirobotbook" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://osrf.github.io/ros2multirobotbook</a></li>
</ul>
<p>Github Repositories:</p>
<ul>
<li>RMF: <a href="https://github.com/osrf/rmf_core" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://github.com/osrf/rmf_core</a>
<li>Traffic Editor: <a href="https://github.com/osrf/traffic_editor" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://github.com/osrf/traffic_editor</a></li>
<li>Free Fleet Management: <a href="https://github.com/osrf/free_fleet" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://github.com/osrf/free_fleet</a></li>
<li>Demo Worlds: <a href="https://github.com/osrf/rmf_demos" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://github.com/osrf/rmf_demos</a></li>
</ul>
<p>We would like to acknowledge the Singapore government for their vision and support to start this ambitious research and development project, &#8220;Development of Standardised Robotics Middleware Framework &#8211; RMF detailed design and common services, large-scale virtual test farm infrastructure, and simulation modelling&#8221;. The project is supported by the Ministry of Health (MOH) and the National Robotics Program (NRP).</p>
<p><em>Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the NR2PO, MOH or other parties.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>James Bruton focus series #3: Virtual Reality combat with a real robot</title>
		<link>https://robohub.org/james-bruton-focus-series-3-virtual-reality-combat-with-a-real-robot/</link>
		
		<dc:creator><![CDATA[Daniel Carrillo-Zapata]]></dc:creator>
		<pubDate>Sat, 26 Dec 2020 09:12:44 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[arts & entertainment]]></category>
		<guid isPermaLink="false">https://robohub.org/james-bruton-focus-series-3-virtual-reality-combat-with-a-real-robot/</guid>

					<description><![CDATA[It&#8217;s Saturday, it&#8217;s the turn of another post of the James Bruton focus series, and it&#8217;s Boxing Day in the UK and most of the Commonwealth countries. Even if this holiday has nothing to do with boxing, I didn&#8217;t want to miss the opportunity to take it literally and bring you a project in which [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="https://robohub.org/wp-content/uploads/2020/12/jb1.jpeg" alt="James Bruton and the students" width="1366" height="768" class="alignnone size-full wp-image-198517" srcset="https://robohub.org/wp-content/uploads/2020/12/jb1.jpeg 1366w, https://robohub.org/wp-content/uploads/2020/12/jb1-425x239.jpeg 425w, https://robohub.org/wp-content/uploads/2020/12/jb1-1024x576.jpeg 1024w, https://robohub.org/wp-content/uploads/2020/12/jb1-768x432.jpeg 768w" sizes="(max-width: 1366px) 100vw, 1366px" />
<p>It&#8217;s Saturday, it&#8217;s the turn of another post of the <a href="https://robohub.org/index.php?s=james+bruton" data-wpel-link="internal">James Bruton focus series</a>, and it&#8217;s Boxing Day in the UK and most of the Commonwealth countries. Even if this holiday has <a href="https://www.history.com/news/why-is-the-day-after-christmas-called-boxing-day" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">nothing to do with boxing</a>, I didn&#8217;t want to miss the opportunity to take it literally and bring you a project in which James teamed up with final year degree students in Computer Games Technology at <a href="https://www.port.ac.uk/about-us/structure-and-governance/organisational-structure/our-academic-structure/faculty-of-creative-and-cultural-industries" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Portsmouth University</a> to build a robot that fights a human in a Virtual Reality (VR) game.<span id="more-198465"></span></p>
<p>For this project, the students Michael (Coding &#038; VR Hardware), Stephen (Character Design &#038; Animation), George (Environment Art) and Boyan (Character Design &#038; Animation) designed a VR combat game in which you fight another character. James&#8217; addition was to design a real robot that fights the player, so that when they get hit in the game, they also get hit in real life by the robot. The robot and the player&#8217;s costume are tracked using Vive trackers so the VR system knows where to position each of them in the 3D virtual environment. You can see some artwork and more details about the project <a href="https://www.artstation.com/stephenramkhelawon" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a> and <a href="https://mcwest300.wixsite.com/portfolio" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>. Without further ado, here&#8217;s James&#8217; video:</p>
<div class="keep-aspect"><iframe title="Robot vs Human Combat | James Bruton" width="500" height="281" src="https://www.youtube-nocookie.com/embed/OYfzaAWIBpc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Happy holidays!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>James Bruton focus series #2: Barcode scanner guitar synths</title>
		<link>https://robohub.org/james-bruton-focus-series-2-barcode-scanner-guitar-synths/</link>
		
		<dc:creator><![CDATA[Daniel Carrillo-Zapata]]></dc:creator>
		<pubDate>Sat, 12 Dec 2020 10:09:35 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[open source]]></category>
		<guid isPermaLink="false">https://robohub.org/james-bruton-focus-series-2-barcode-scanner-guitar-synths/</guid>

					<description><![CDATA[As every other Saturday, I&#8217;m bringing you another cool open-source project from James Bruton. Today, how about becoming an experimental musician with your own barcode scanner synthesizer? I introduced James Bruton in the first post of this focus series on him, where I showed you the Boston Dynamics-inspired open robot dogs projects that consolidated him [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_198148" style="width: 1045px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-198148" src="https://robohub.org/wp-content/uploads/2020/12/featured.jpeg" alt="James Bruton playing his barcode synths" width="1035" height="689" class="size-full wp-image-198148" srcset="https://robohub.org/wp-content/uploads/2020/12/featured.jpeg 1035w, https://robohub.org/wp-content/uploads/2020/12/featured-425x283.jpeg 425w, https://robohub.org/wp-content/uploads/2020/12/featured-1024x682.jpeg 1024w, https://robohub.org/wp-content/uploads/2020/12/featured-768x511.jpeg 768w" sizes="(max-width: 1035px) 100vw, 1035px" /><p id="caption-attachment-198148" class="wp-caption-text">James Bruton playing his barcode synths</p></div>
<p>As every other Saturday, I&#8217;m bringing you another cool open-source project from James Bruton. Today, how about becoming an experimental musician with your own barcode scanner synthesizer? <span id="more-198139"></span></p>
<p>I introduced <a href="http://www.xrobots.tech/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">James Bruton</a>  in the <a href="https://robohub.org/james-bruton-focus-series-1-opendog-mini-robot-dog-opendog-v2/" data-wpel-link="internal">first post</a> of this focus series on him, where I showed you the Boston Dynamics-inspired open robot dogs projects that consolidated him as one of the top maker on <a href="https://www.youtube.com/channel/UCUbDcUPed50Y_7KmfCXKohA" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">YouTube</a>. As a sort of musician, the barcode synth project I&#8217;ve picked for this second post grabbed my attention among the countless videos he&#8217;s got on his channel. </p>
<p>To be more specific, the barcode synth consists of two projects. A bit more than a year ago, James showed how to build a four-neck guitar synth with the frets (the place where you put your fingers to play a note on the guitar) being barcodes instead of strings. To play this guitar, you only need a barcode reader connected to an Arduino that converts the data read from the barcodes into a number that represents a MIDI note &#8211; which is a digital representation of a musical note based on the <a href="https://en.wikipedia.org/wiki/MIDI" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">MIDI standard</a>. You can then plug the Arduino into a synth or your computer (if you love <a href="https://www.nicolastiteux.com/en/blog/virtual-instrument/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">virtual instruments</a> as much as I do!) to transform the MIDI output into actual sound. Extra features of this guitar included pitch bending and octave shifting buttons. You can access the open-source code of this type of guitar <a href="https://github.com/XRobots/ScannerGuitar" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>, and enjoy James&#8217; explanation (and performance) in the following video:</p>
<div class="keep-aspect"><iframe title="This GUITAR only has Barcodes!" width="500" height="281" src="https://www.youtube-nocookie.com/embed/OctazO-VxBw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>A couple of months ago, James made an improved version of the previous guitar synth. Instead of using the number given by the barcode, for this improved synth he hacked the barcode reader to interpret the barcodes as images so that the output is the raw square wave that it sees. With he help of a Teensy microcontroller to do the digital signal processing and a Raspberry Pi to display barcode images on a screen fitted to a 3D-printed guitar, he could produce a richer range of sounds compared to the previous version. If you want to build you own barcode synth, check out the <a href="https://github.com/XRobots/BarcodeSynth" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">open-source files</a> and his video (you&#8217;ll be impressed to find out how a zebra sounds like!):</p>
<div class="keep-aspect"><iframe title="Barcode Scanner Synth Build" width="500" height="281" src="https://www.youtube-nocookie.com/embed/ywpl4en4MI0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Make tech, make music, and stay tuned!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>James Bruton focus series #1: openDog, Mini Robot Dog &#038; openDog V2</title>
		<link>https://robohub.org/james-bruton-focus-series-1-opendog-mini-robot-dog-opendog-v2/</link>
		
		<dc:creator><![CDATA[Daniel Carrillo-Zapata]]></dc:creator>
		<pubDate>Sat, 28 Nov 2020 10:35:28 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[open source]]></category>
		<guid isPermaLink="false">https://robohub.org/james-bruton-focus-series-1-opendog-mini-robot-dog-opendog-v2/</guid>

					<description><![CDATA[What if you could ride your own giant LEGO electric skateboard, make a synthesizer that you can play with a barcode reader, or build a strong robot dog based on the Boston Dynamics dog robot? Today sees the start of a new series of videos that focuses on James Bruton&#8217;s open source robot projects. James [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_197923" style="width: 1210px" class="wp-caption alignnone"><img decoding="async" aria-describedby="caption-attachment-197923" src="https://robohub.org/wp-content/uploads/2020/11/P1022582.jpg" alt="James Bruton with openDog V2" width="1200" height="900" class="size-full wp-image-197923" srcset="https://robohub.org/wp-content/uploads/2020/11/P1022582.jpg 1200w, https://robohub.org/wp-content/uploads/2020/11/P1022582-425x319.jpg 425w, https://robohub.org/wp-content/uploads/2020/11/P1022582-1024x768.jpg 1024w, https://robohub.org/wp-content/uploads/2020/11/P1022582-768x576.jpg 768w" sizes="(max-width: 1200px) 100vw, 1200px" /><p id="caption-attachment-197923" class="wp-caption-text">James Bruton with openDog V2</p></div>
<p>What if you could ride your own giant LEGO electric skateboard, make a synthesizer that you can play with a barcode reader, or build a strong robot dog based on the Boston Dynamics dog robot? Today sees the start of a new series of videos that focuses on James Bruton&#8217;s open source robot projects. <span id="more-197922"></span></p>
<p><a href="http://www.xrobots.tech" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">James Bruton</a> is a former toy designer, current <a href="https://www.youtube.com/channel/UCUbDcUPed50Y_7KmfCXKohA" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">YouTube maker</a> and general robotics, electrical and mechanical engineer. He has a reputation for building robot dogs and building <a href="https://www.youtube.com/watch?v=8dy9tAhweeU" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Iron Man inspired cosplays</a>. He uses 3D printing, CNC and sometimes welding to build all sorts of robotics related creations. Highlights include building <a href="https://www.youtube.com/watch?v=eI33iAXcEYA" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Mark Rober&#8217;s auto-strike bowling ball</a> and working with Colin Furze to build a <a href="https://www.youtube.com/watch?v=kSuaykdvl4I&#038;list=PLq--SchxwWuVGA9EIQhUCzbWlTaORfd_r" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">life-sized Iron Man Hulkbuster</a> for an official eBay and Marvel promo. He also built a <a href="https://www.youtube.com/watch?v=YyoUcRJpVHc&#038;list=PLpwJoq86vov8FRXKsVMWWVBwBXZW1WzMb" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">life-sized Bumblebee Transformer</a> for Paramount to promote the release of the Bumblebee movie.</p>
<p>I discovered James&#8217; impressive work in <a href="https://www.theconstructsim.com/77-building-robotics-projects-on-youtube-with-james-bruton/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">this episode</a> of Ricardo Tellez&#8217;s <a href="https://open.spotify.com/show/0FQqQaqHmhO37iVd0BklOx" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS Developers Podcast</a> on <a href="https://www.theconstructsim.com/blog/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">The Construct</a>, which I highly recommend. Whether you enjoy getting your hands dirty with CAD files, 3D-printed parts, arduinos, motors and code, or you like learning about the full research &#038; development (R&#038;D) process of a robotics project, you will have loads of hours of fun following this series. </p>
<p>Today I brought one of James&#8217; coolest and most successful open source projects: openDog and its different versions. In James&#8217; own words, &#8220;if you want your very own four-legged friend to play fetch with and go on long walks then this is the perfect project for you.&#8221; You can access all the CAD files and code <a href="https://github.com/XRobots/openDog" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>. And without further ado, here&#8217;s the full YouTube playlist of the first version of openDog: </p>
<div class="keep-aspect"><iframe title="openDog Dog Robot #1 | Planning &amp; Explanation | James Bruton" width="500" height="281" src="https://www.youtube-nocookie.com/embed/0BoPoWF_FwY?list=PLpwJoq86vov_PkA0bla0eiUTsCAPi_mZf" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>James also released another series of videos developing an affordable version of openDog: Mini Robot Dog. This robot is half the size of openDog and its mechanical components and 3D-printed parts are much more cheaper than the former robot without sacrificing compliance. You can see the full development in the playlist below, and access the open source files of <a href="https://github.com/XRobots/miniDog" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">version 1</a> and <a href="https://github.com/XRobots/miniDogV2" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">version 2</a>.</p>
<div class="keep-aspect"><iframe title="Mini Robot Dog - The Affordable Quadruped #1" width="500" height="281" src="https://www.youtube-nocookie.com/embed/DfBF26DaT-M?list=PLpwJoq86vov_qzmadB1zj6aVKObH3WbeH" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Based on the insight gained through the R&#038;D of openDog, Mini Robot Dog and <a href="https://www.youtube.com/watch?v=qVrPx665NzI&#038;list=PLpwJoq86vov9Aogc6PseW8BUe2nQyZESZ" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">these test dogs</a>, James built the ultimate robot dog: openDog V2. For this improved version of openDog, he used brushless motors which can be back-driven to increase compliance. And by adding an Inertial Measurements Unit, he improved the balance of the robot. CAD files and code are available <a href="https://github.com/XRobots/openDogV2" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>. If you want to find out whether the robot is able to walk, check out the openDog V2 video series:</p>
<div class="keep-aspect"><iframe title="openDog V2 Part 1 - Robotics R&amp;D Design Process" width="500" height="281" src="https://www.youtube-nocookie.com/embed/nwqSjMttcSg?list=PLpwJoq86vov9CcmrLGyM2XyyYDAYG0-Iu" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>If you like James Bruton&#8217;s project, you can check out <a href="http://www.xrobots.tech/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">his website</a> for more resources, updates and support options. See you in the next post of our focus series!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Rapid prototyping of the strider robot &#8211; smoother, stronger, faster</title>
		<link>https://robohub.org/rapid-prototyping-of-the-strider-robot-smoother-stronger-faster/</link>
		
		<dc:creator><![CDATA[Wade Vagle]]></dc:creator>
		<pubDate>Wed, 29 Aug 2018 20:16:24 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://robohub.org/rapid-prototyping-of-the-strider-robot-smoother-stronger-faster/</guid>

					<description><![CDATA[This summer we used our Strider optimizer coupled with rapid prototyping in LEGO to refine its 10-bar linkage. In a tiny fraction of the time it took us to refine TrotBot&#8217;s linkage in our garage, we explored numerous variations of Strider&#8217;s linkage and their trade-offs, and were able to significantly improve its performance in these [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://robohub.org/wp-content/uploads/2018/08/Lego.png" alt="" width="892" height="664" class="aligncenter size-full wp-image-107343" srcset="https://robohub.org/wp-content/uploads/2018/08/Lego.png 892w, https://robohub.org/wp-content/uploads/2018/08/Lego-425x316.png 425w, https://robohub.org/wp-content/uploads/2018/08/Lego-768x572.png 768w" sizes="(max-width: 892px) 100vw, 892px" />This summer we used our Strider <a href="https://www.diywalkers.com/strider-linkage-optimizer.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">optimizer</a> coupled with rapid prototyping in LEGO to refine its <a href="https://www.diywalkers.com/strider-linkage-plans.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">10-bar linkage</a>.  <span id="more-107340"></span></p>
<p>In a tiny fraction of the time it took us to refine TrotBot&#8217;s linkage in our garage, we explored numerous variations of Strider&#8217;s linkage and their trade-offs, and were able to significantly improve its performance in these categories:</p>
<p>Gait Efficiency.  To be energy efficient, walking gaits should be smooth and not cause the robot to rise and fall &#8211; think how much more tiring it is to do lunges than it is to simply walk.  The feet should also move at constant speed &#8211; try walking while changing how quickly your feet sweep across the ground and your leg muscles will quickly complain!  Strider Ver 3 was optimized for both of these features, and it&#8217;s the only mechanism that we&#8217;ve tested which can walk with a 1:1 gear ratio without the LEGO motors stalling:</p>
<div class="keep-aspect"><iframe title="Strider Linkage Robot v3 Geared Up to a 1:1 Ratio" width="500" height="281" src="https://www.youtube-nocookie.com/embed/SuytdYuyz2w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p> Rugged Terrain.   Like with TrotBot, we wanted Strider to be able to walk on rugged terrain, otherwise why not just use wheels?   But, mechanical walkers are blind and dumb, and they can&#8217;t lift their feet to avoid tripping on obstacles.  So we designed Strider&#8217;s foot-path to mimic how you would walk blindfolded on a path crisscrossed by roots: lift your feet high and keep them high until stepping back down to the ground, like this:</p>
<div class="keep-aspect"><iframe title="Strider Linkage Ver 3 (in motion)" width="500" height="281" src="https://www.youtube-nocookie.com/embed/1tbc5Jm5Hcg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Here&#8217;s a rugged terrain test an 8-leg build:</p>
<div class="keep-aspect"><iframe title="Strider&#039;s Playpit" width="500" height="281" src="https://www.youtube-nocookie.com/embed/npwnqK2JbiM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Strength.  Walkers stress frames more than wheeled vehicles, so we increased the frame&#8217;s rigidity with more triangles.  Also, the leverage of long legs can put a tremendous amount of force on the leg&#8217;s joints, especially when turning them tank-style.  We strengthened Strider&#8217;s leg joints by sandwiching them between beams like in the image below, which also reduces how quickly friction wears down the lips of the frictionless pins.</p>
<p>Here&#8217;s a test of Strider&#8217;s strength with a 10 pound load:</p>
<div class="keep-aspect"><iframe title="Strider Robot v3 Carrying 10 pounds" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Ys_4JVaZb_o?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>We made these changes while keeping Strider simple &#8211; it&#8217;s still our easiest walker to build.  We also (hopefully) made our building instructions more clear.  We learned how bad we are at creating building instructions from Ben&#8217;s experience teaching his walking robots class last spring.  In the past when users would email us about something confusing in the instructions, we&#8217;d simply add more pictures to clarify things.  This backfired in Ben&#8217;s class, since more build pictures resulted in the students getting more confused, and caused them to skim thru the pictures more quickly, and to make more mistakes.  As we learned, less is more!</p>
<p>We also separated the leg and frame instructions to make it easier to build different versions of Strider, and we designed the frame to make it easy to swap between the battery box/IR controller, or the EV3 brick.  You can find the instructions <a href="https://www.diywalkers.com/strider-builds.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>.  Here&#8217;s an example build with the EV3 brick mounted underneath &#8211; but it would probably work with the brick mounted on top as well.</p>
<div class="keep-aspect"><iframe title="Mindstorms Strider Robot v3" width="500" height="281" src="https://www.youtube-nocookie.com/embed/gUUru9hleao?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>For the bold, we also posted a half dozen new variations of the Strider linkage for you to try building <a href="https://www.diywalkers.com/strider-linkage-optimizer.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>, along with an online optimizer for the even bolder to create their own versions of the Strider linkage.  We&#8217;ve also optimized Klann&#8217;s and Strandbeest&#8217;s linkages for LEGO, and you can find their online optimizers <a href="https://www.diywalkers.com/customize.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>.  (jeez, I guess we&#8217;ve been busy)</p>
<p>Here&#8217;s a final teaser to encourage you (or your students) to take on the challenging task of replacing wheels with mechanical legs:</p>
<div class="keep-aspect"><iframe title="The Good, the Bad, and the Ugly LEGO Walkers" width="500" height="281" src="https://www.youtube-nocookie.com/embed/rCSJS8GrT1Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Robotbenchmark lets you program simulated robots from your browser</title>
		<link>https://robohub.org/robotbenchmark-lets-you-program-simulated-robots-from-your-browser/</link>
		
		<dc:creator><![CDATA[Olivier Michel]]></dc:creator>
		<pubDate>Tue, 22 Aug 2017 15:56:31 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">http://robohub.org/robotbenchmark-lets-you-program-simulated-robots-from-your-browser/</guid>

					<description><![CDATA[Cyberbotics Ltd. is launching https://robotbenchmark.net to allow everyone to program simulated robots online for free. Robotbenchmark offers a series of robot programming challenges that address various topics across a wide range of difficulty levels, from middle school to PhD. Users don&#8217;t need to install any software on their computer, cloud-based 3D robotics simulations run on [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="http://robohub.org/wp-content/uploads/2017/08/RobotBenchMark.png" alt="" width="1000" height="444" class="aligncenter size-full wp-image-83975" srcset="https://robohub.org/wp-content/uploads/2017/08/RobotBenchMark.png 1000w, https://robohub.org/wp-content/uploads/2017/08/RobotBenchMark-425x189.png 425w, https://robohub.org/wp-content/uploads/2017/08/RobotBenchMark-768x341.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" />
<p>Cyberbotics Ltd. is launching<a href="https://robotbenchmark.net" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"> https://robotbenchmark.net</a> to allow everyone to program simulated robots online for free.<span id="more-83961"></span></p>
<div class="keep-aspect"><iframe title="robotbenchmark: online robot programming" width="500" height="281" src="https://www.youtube-nocookie.com/embed/S0k0cJb_Mus?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Robotbenchmark offers a series of robot programming challenges that address various topics across a wide range of difficulty levels, from middle school to PhD. Users don&#8217;t need to install any software on their computer, cloud-based 3D robotics simulations run on a web page. They can learn programming by writing Python code to control robot behavior. The performance achieved by users is recorded and displayed online, so that they can challenge their friends and show off their skills at robot programming on social networks. Everything is designed to be extremely easy-to-use, runs on any computer, any web browser, and is totally free of charge.</p>
<p>This project is funded by Cyberbotics Ltd. and the Human Brain Project.</p>
<p><strong>About Cyberbotics Ltd.</strong>: <a href="https://cyberbotics.com" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Cyberbotics</a> is a Swiss-based company, spin-off from the École Polytechnique Fédérale de Lausanne, specialized in the development of robotics simulation software. It has been developing and selling the Webots software for more than 19 years. Webots is a reference software in robotics simulation being used in more than 1200 companies and universities across the world. Cyberbotics is also involved in industrial and research projects, such as the Human Brain Project. </p>
<p><strong>About the Human Brain Project</strong>: <a href="https://humanbrainproject.eu" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">The Human Brain Project</a> is a large ten-year scientific research project that aims to build a collaborative ICT-based scientific research infrastructure to allow researchers across the globe to advance knowledge in the fields of neuroscience, computing, neurorobotics, and brain-related medicine. The Project, which started on 1 October 2013, is a European Commission Future and Emerging Technologies Flagship. Based in Geneva, Switzerland, it is coordinated by the École Polytechnique Fédérale de Lausanne and is largely funded by the European Union.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Rapid outdoor/indoor 3D mapping with a Husky UGV</title>
		<link>https://robohub.org/rapid-outdoorindoor-3d-mapping-with-a-husky-ugv/</link>
		
		<dc:creator><![CDATA[Clearpath Robotics]]></dc:creator>
		<pubDate>Sun, 09 Jul 2017 21:16:21 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[exploration & mining]]></category>
		<category><![CDATA[mapping & surveillance]]></category>
		<category><![CDATA[SLAM]]></category>
		<guid isPermaLink="false">http://robohub.org/rapid-outdoorindoor-3d-mapping-with-a-husky-ugv/</guid>

					<description><![CDATA[<p>The need for fast, accurate 3D mapping solutions has quickly become a reality for many industries wanting to adopt new technologies in AI and automation. New applications requiring these 3D mapping platforms include surveillance, mining, automated measurement &#38; inspection, construction management &#38; decommissioning, and photo-realistic rendering. Here at Clearpath Robotics, we decided to team up [&#8230;]</p>
<p>The post <a rel="nofollow external noopener noreferrer" href="https://www.clearpathrobotics.com/2017/07/rapid-outdoorindoor-3d-mapping-husky-ugv/" data-wpel-link="external" target="_blank">Rapid Outdoor/Indoor 3D Mapping with a Husky UGV</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.clearpathrobotics.com/" data-wpel-link="external" target="_blank">Clearpath Robotics</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="http://robohub.org/wp-content/uploads/2017/07/ClearpathSLAM.jpg" alt="" width="1080" height="675" class="alignnone size-full wp-image-81386" srcset="https://robohub.org/wp-content/uploads/2017/07/ClearpathSLAM.jpg 1080w, https://robohub.org/wp-content/uploads/2017/07/ClearpathSLAM-425x266.jpg 425w, https://robohub.org/wp-content/uploads/2017/07/ClearpathSLAM-768x480.jpg 768w, https://robohub.org/wp-content/uploads/2017/07/ClearpathSLAM-1024x640.jpg 1024w" sizes="(max-width: 1080px) 100vw, 1080px" /><strong>by Nicholas Charron</strong></p>
<p>The need for fast, accurate 3D mapping solutions has quickly become a reality for many industries wanting to adopt new technologies in AI and automation. New applications requiring these 3D mapping platforms include surveillance, mining, automated measurement &amp; inspection, construction management &amp; decommissioning, and photo-realistic rendering. Here at Clearpath Robotics, we decided to team up with <a href="http://mandalarobotics.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Mandala Robotics</a> to show how easily you can implement 3D mapping on a Clearpath robot.</p>
<p><span id="more-81346"></span></p>
<h2>3D Mapping Overview</h2>
<p>3D mapping on a mobile robot requires Simultaneous Localization and Mapping (SLAM), for which there are many different solutions available. Localization can be achieved by fusing many different types of pose estimates. Pose estimation can be done using combinations of GPS measurements, wheel encoders, inertial measurement units, 2D or 3D scan registration, optical flow, visual feature tracking and others techniques. Mapping can be done simultaneously using the lidars and cameras that are used for scan registration and for visual position tracking, respectively. This allows a mobile robot to track its position while creating a map of the environment. Choosing which SLAM solution to use is highly dependent on the application and the environment to be mapped. Although many 3D SLAM software packages exist and cannot all be discussed here, there are few 3D mapping hardware platforms that offer full end-to-end 3D reconstruction on a mobile platform.</p>
<h2>Existing 3D Mapping Platforms</h2>
<p>We will briefly highlight some more popular alternatives of commercialized 3D mapping platforms that have one or many lidars, and in some cases optical cameras, for point cloud data collection. It is important to note that there are two ways to collect a 3D point cloud using lidars:</p>
<p>1. Use a 3D lidar which consists of one device with multiple stacked horizontally laser beams<br />
2. Tilt or rotate a 2D lidar to get 3D coverage</p>
<p>Tilting of a 2D lidar typically refers to back-and-forth rotating of the lidar about its horizontal plane, while rotating usually refers to continuous 360 degree rotation of a vertically or horizontally mounted lidar.</p>
<table>
<tbody>
<tr>
<td width="33%"><img decoding="async" src="https://s3.amazonaws.com/assets.clearpathrobotics.com/wp-content/uploads/2017/07/07131148/MultiSense_SL.jpg" /></td>
<td width="33%"><img decoding="async" src="https://s3.amazonaws.com/assets.clearpathrobotics.com/wp-content/uploads/2017/07/07131138/3DLS-K2-L.jpg" /></td>
<td width="33%"><img decoding="async" src="https://s3.amazonaws.com/assets.clearpathrobotics.com/wp-content/uploads/2017/07/07131244/Cartographerbackpack.jpg" /></td>
</tr>
</tbody>
</table>
<p>Example 3D Mapping Platforms: 1. MultiSense SL (Left) by Carnegie Robotics, 2. 3DLS-K (Middle) by Fraunhofer IAIS Institute, 3. Cartographer Backpack (Right) by Google.</p>
<p><strong>1. MultiSense SL</strong></p>
<p>The <a href="http://files.carnegierobotics.com/products/MultiSense_SL/MultiSense_SL_brochure.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">MultiSense SL</a> was developed by Carnegie Robotics and provides a compact and lightweight 3D data collection unit for researchers. The unit has a tilting Hokuyo 2D lidar, a stereo camera, LED lights, and is pre-calibrated for the user. This allows for the generation of coloured point clouds. This platform comes with a full software development kit (SDK), open source ROS software, and is the sensor of choice for the DARPA Robotics Challenge for humanoid robots.</p>
<p><strong>2. 3DLS-K</strong></p>
<p>The <a href="http://www.3d-scanner.net/datasheet/3DLS_Flyer_kont_eng.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">3DLS-K</a> is a dual-tilting unit made by Fraunhofer IAIS Institute with the option of using SICK LMS-200 or LMS-291 lidars. Fraunhofer IAIS also offers <a href="http://www.3d-scanner.net/index.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">other configurations</a> with continuously rotating 2D SICK or Hokuyo lidars. These systems allow for the collection of non-coloured point clouds. With the purchase of these units, a full application program interface (API) is available for configuring the system and collecting data.</p>
<p><strong>3. Cartographer Backpack</strong></p>
<p>The <a href="https://opensource.googleblog.com/2016/10/introducing-cartographer.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Cartographer Backpack</a> is a mapping unit with two static Hokuyo lidars (one horizontal and one vertical) and an on-board computer. Google released <a href="https://github.com/googlecartographer" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">cartographer software</a> as an open source library for performing 3D mapping with multiple possible sensor configurations. The Cartographer Backpack is an example of a possible configuration to map with this software. Cartographer allows for integration of multiple 2D lidars, 3D lidars, IMU and cameras, and is also fully supported in ROS. <a href="https://google-cartographer-ros.readthedocs.io/en/latest/data.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Datasets</a> are also publicly available for those who want to see mapping results in ROS.</p>
<h2>Mandala Mapping – System Overview</h2>
<img decoding="async" src="https://s3.amazonaws.com/assets.clearpathrobotics.com/wp-content/uploads/2017/07/07130441/nicks_robot_close_web.png" />
<p>Thanks to the team at Mandala Robotics, we got our hands on one of their 3D mapping units to try some mapping on our own. This unit consists of a mount for a rotating vertical lidar, a fixed horizontal lidar, as well as an onboard computer with an Nvidia GeForce GTX 1050 Ti GPU. The horizontal lidar allows for the implementation of 2D scan registration as well as 2D mapping and obstacle avoidance. The vertical rotating lidar is used for acquiring the 3D point cloud data. In our implementation, real-time SLAM was performed solely using 3D scan registration (more on this later) specifically programmed for full utilization of the onboard GPU. The software used to implement this mapping can be found on the <a href="https://github.com/mandalarobotics/mandala-mapping" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">mandala-mapping github repository</a>.</p>
<p>Scan registration is the process of combining (or stitching) together two subsequent point clouds (either in 2D or 3D) to estimate the change in pose between the scans. This results in motion estimates to be used in SLAM and also allows a new point cloud to be added to an existing in order to build a map. This process is achieved by running iterative closest point (ICP) between the two subsequent scans. ICP performs a closest neighbour search to match all points from the reference scan to a point on the new scan. Subsequently, optimization is performed to find rotation and translation matrices that minimise the distance between the closest neighbours. By iterating this process, the result converges to the true rotation and translation that the robot underwent between the two scans. This is the process that was used for 3D mapping in the following demo.</p>
<p>Mandala Robotics has also released additional examples of GPU computing tasks useful for robotics and SLAM. These examples can be found <a href="https://github.com/JanuszBedkowski/gpu_computing_in_robotics" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>.</p>
<h2>Mandala Mapping Results</h2>
<p>The following video shows some of our results from mapping areas within the Clearpath office, lab and parking lot. The datasets collected for this video can be downloaded <a href="https://s3.amazonaws.com/CPR_PUBLIC/datasets.tar.gz" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">here</a>.</p>
<p><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/gpJlrqSyIJo" frameborder="0" allowfullscreen></iframe></p>
<p>The Mandala Mapping software was very easy to get up and running for someone with basic knowledge in ROS. There is one launch file which runs the Husky base software as well as the 3D mapping. Initiating each scan can be done by sending a simple scan request message to the mapping node, or by pressing one button on the joystick used to drive the Husky. Furthermore, with a little more ROS knowledge, it is easy to incorporate autonomy into the 3D mapping. <a href="https://github.com/nickcharron/mandala-mapping" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Our forked repository</a> shows how a short C++ script can be written to enable constant scan intervals while navigating in a straight line. Alternatively, one could easily incorporate 2D SLAM such as <a href="http://wiki.ros.org/gmapping" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">gmapping</a> together with the <a href="http://wiki.ros.org/move_base" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">move_base package</a> in order to give specific scanning goals within a map.</p>
<h2>Why use Mandala Mapping on your robot?</h2>
<p>If you are looking for a quick and easy way to collect 3D point clouds, with the versatility to use multiple lidar types, then this system is a great choice. The hardware work involved with setting up the unit is minimal and well documented, and it is preconfigured to work with your Clearpath Husky. Therefore, you can be up and running with ROS in a few days! The mapping is done in real time, with only a little lag time as your point cloud size grows, and it allows you to visualize your map as you drive.</p>
<p>The downside to this system, compared to the MultiSense SL for example, is that you cannot yet get a coloured point cloud since no cameras have been integrated into this system. However, Mandala Robotics is currently in the beta testing stage for a similar system with an additional 360 degree camera. This system uses the <a href="https://www.ptgrey.com/ladybug5-360-degree-usb3-spherical-camera-systems" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Ladybug5</a> and will allow RGB colour to be mapped to each of the point cloud elements. Keep an eye out for a future Clearpath blogs in case we get our hands on one of these systems! All things considered, the Mandala Mapping kit offers a great alternative to the other units aforementioned and fills many of the gaps in functionality of these systems.</p>
<p>The post <a rel="nofollow external noopener noreferrer" href="https://www.clearpathrobotics.com/2017/07/rapid-outdoorindoor-3d-mapping-husky-ugv/" data-wpel-link="external" target="_blank">Rapid Outdoor/Indoor 3D Mapping with a Husky UGV</a> appeared first on <a rel="nofollow external noopener noreferrer" href="https://www.clearpathrobotics.com/" data-wpel-link="external" target="_blank">Clearpath Robotics</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Simulated car demo using ROS Kinetic and Gazebo 8</title>
		<link>https://robohub.org/simulated-car-demo-using-ros-kinetic-and-gazebo-8/</link>
		
		<dc:creator><![CDATA[Open Source Robotics Foundation]]></dc:creator>
		<pubDate>Tue, 04 Jul 2017 09:00:37 +0000</pubDate>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[automotive]]></category>
		<guid isPermaLink="false">http://robohub.org/simulated-car-demo-using-ros-kinetic-and-gazebo-8/</guid>

					<description><![CDATA[We are excited to show off a simulation of a Prius in Mcity using ROS Kinetic and Gazebo 8. ROS enabled the simulation to be developed faster by using existing...&#160;<a href="https://www.osrfoundation.org/simulated-car-demo/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">[Read&#160;More]</a>]]></description>
										<content:encoded><![CDATA[<p><strong>By Tully Foote</strong></p>
<p>We are excited to show off a simulation of a Prius in Mcity using ROS Kinetic and Gazebo 8. ROS enabled the simulation to be developed faster by using existing software and libraries. The vehicle&#8217;s throttle, brake, steering, and transmission are controlled by publishing to a ROS topic. All sensor data is published using ROS, and can be visualized with RViz.</p>
<p><img decoding="async" src="http://robohub.org/wp-content/uploads/2017/06/prius_roundabout_exit.png" alt="" width="956" height="612" class="alignnone size-full wp-image-81145" srcset="https://robohub.org/wp-content/uploads/2017/06/prius_roundabout_exit.png 956w, https://robohub.org/wp-content/uploads/2017/06/prius_roundabout_exit-425x272.png 425w, https://robohub.org/wp-content/uploads/2017/06/prius_roundabout_exit-768x492.png 768w" sizes="(max-width: 956px) 100vw, 956px" /><span id="more-81093"></span></p>
<p>We leveraged Gazebo&#8217;s capabilities to incorporate existing models and sensors.<br />
The world contains a new model of Mcity and a freeway interchange. There are also models from the gazebo models repository including dumpsters, traffic cones, and a gas station. On the vehicle itself there is a 16 beam lidar on the roof, 8 ultrasonic sensors, 4 cameras, and 2 planar lidar.</p>
<img decoding="async" src="http://robohub.org/wp-content/uploads/2017/06/rviz_angle_2.png" alt="" width="849" height="564" class="alignnone size-full wp-image-81147" srcset="https://robohub.org/wp-content/uploads/2017/06/rviz_angle_2.png 849w, https://robohub.org/wp-content/uploads/2017/06/rviz_angle_2-425x282.png 425w, https://robohub.org/wp-content/uploads/2017/06/rviz_angle_2-768x510.png 768w" sizes="(max-width: 849px) 100vw, 849px" />
<p>The simulation is open source and available at <a href="https://github.com/osrf/car_demo" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">on GitHub at osrf/car_demo</a>. Try it out by installing nvidia-docker and pulling &#8220;osrf/car_demo&#8221; from Docker Hub. More information about building and running is available in the README in the source repository.</p>
<p><iframe class="youtube-player" src="https://player.vimeo.com/video/223812225" width="300" height="150" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Robot Academy: Lessons in inverse kinematics and robot motion</title>
		<link>https://robohub.org/masterclass-inverse-kinematics-and-robot-motion/</link>
		
		<dc:creator><![CDATA[Peter Corke]]></dc:creator>
		<pubDate>Fri, 30 Jun 2017 10:00:34 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[actuation]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/masterclass-inverse-kinematics-and-robot-motion/</guid>

					<description><![CDATA[The Robot Academy is a new learning resource from Professor Peter Corke and the Queensland University of Technology (QUT), the team behind the award-winning Introduction to Robotics and Robotic Vision courses. There are over 200 lessons available, all for free. The lessons were created in 2015 for the Introduction to Robotics and Robotic Vision courses. We describe [&#8230;]]]></description>
										<content:encoded><![CDATA[<a href="http://robohub.org/wp-content/uploads/2014/12/IIWA_Kuka-water-glass.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-43577" src="http://robohub.org/wp-content/uploads/2014/12/IIWA_Kuka-water-glass.jpg" alt="" width="762" height="500" srcset="https://robohub.org/wp-content/uploads/2014/12/IIWA_Kuka-water-glass.jpg 762w, https://robohub.org/wp-content/uploads/2014/12/IIWA_Kuka-water-glass-425x278.jpg 425w, https://robohub.org/wp-content/uploads/2014/12/IIWA_Kuka-water-glass-457x300.jpg 457w" sizes="(max-width: 762px) 100vw, 762px" /></a>
<p><em><a href="https://robotacademy.net.au/" target="_blank" rel="follow external noopener noreferrer" data-wpel-link="external">The Robot Academy</a> is a new learning resource from Professor Peter Corke and the Queensland University of Technology (QUT), the team behind the award-winning Introduction to Robotics and Robotic Vision courses. There are over 200 lessons available, all for free.</em></p>
<p>The lessons were created in 2015 for the Introduction to Robotics and Robotic Vision courses. We describe our approach to creating the original courses in the article, <a href="http://ieeexplore.ieee.org/document/7469836/" target="_blank" rel="follow external noopener noreferrer" data-wpel-link="external">An Innovative Educational Change: Massive Open Online Courses in Robotics and Robotic Vision</a>. The courses were designed for university undergraduate students but many lessons are suitable for anybody, as you can easily see the difficulty rating for each lesson. Below are lessons from inverse kinematics and robot motion.<br />
<span id="more-80974"></span></p>
<p><strong>You can watch the entire masterclass on the <a href="https://robotacademy.net.au/masterclass/inverse-kinematics-and-robot-motion/?lesson=256" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Robot Academy website.</a></strong></p>
<h2><strong>Introduction</strong></h2>
<p>In this video lecture, we will learn about inverse kinematics, that is, how to compute the robot’s joint angles given the desired pose of their end-effector and knowledge about the dimensions of its links. We will also learn about how to generate paths that lead to a smooth coordinated motion of the end-effector.</p>
<div class="keep-aspect"><iframe title="Introduction to inverse kinematics" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Ycyc19VSIq4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<h2>Inverse kinematics for a 2-joint robot arm using geometry</h2>
<p>In this lesson, we revisit the simple 2-link planar robot and determine the inverse kinematic function using simple geometry and trigonometry.</p>
<div class="keep-aspect"><iframe title="Inverse kinematics for a 2-joint robot arm using geometry" width="500" height="281" src="https://www.youtube-nocookie.com/embed/IKOGwoJ2HLk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<h2>Inverse kinematics for a 2-joint robot arm using algebra</h2>
<div class="keep-aspect"><iframe title="Inverse kinematics for a 2-joint robot arm using algebra" width="500" height="281" src="https://www.youtube-nocookie.com/embed/eIZuz1XCd0w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p><strong>You can watch the entire masterclass on the <a href="https://robotacademy.net.au/masterclass/inverse-kinematics-and-robot-motion/?lesson=256" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Robot Academy website.</a></strong></p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also enjoy:</em></p>
<ul>
<li><a href="http://robohub.org/smart-grasping-system-available-on-ros-development-studio/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Smart Grasping System available on ROS Development Studio</a></li>
<li><a href="http://robohub.org/the-robot-academy-lessons-in-image-formation-and-3d-vision/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">The Robot Academy: Lessons in image formation and 3D vision</a></li>
<li><a href="http://robohub.org/the-robot-academy-an-open-online-robotics-education-resource/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">The Robot Academy: The open online robotics education resource </a></li>
<li><a href="http://robohub.org/machine-learning-with-openai-gym-on-ros-development-studio/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Machine Learning with OpenAI Gym on ROS Development Studio</a></li>
<li><a href="http://robohub.org/sick-lms-full-lidar-teardown/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">SICK LMS full LIDAR teardown</a></li>
<li><a href="http://robohub.org/envisioning-the-future-of-robotics/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Envisioning the future of robotics</a></li>
<li><a href="http://robohub.org/how-to-mount-an-external-removable-hard-drive-on-a-robot/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">How to mount an external removable hard drive on a robot</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1495556781785000&amp;usg=AFQjCNFMgPp11BS7dm2NcyVGOhPxjyR30A" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1495556781785000&amp;usg=AFQjCNE8W_OvCHiGZNT_ZCHlcUehKrmbMw" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Smart Grasping System available on ROS Development Studio</title>
		<link>https://robohub.org/smart-grasping-system-available-on-ros-development-studio/</link>
		
		<dc:creator><![CDATA[Ruben Alves]]></dc:creator>
		<pubDate>Wed, 10 May 2017 08:15:54 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[actuation]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[sensing]]></category>
		<category><![CDATA[software]]></category>
		<guid isPermaLink="false">http://robohub.org/smart-grasping-system-available-on-ros-development-studio/</guid>

					<description><![CDATA[Would you like to make a robot to grasp something, but you think that is impossible to you just because you can’t buy a robot arm? I’m here to tell that you can definitely achieve this without buying a real robot. Let&#8217;s see how: How is that possible? The Smart Grasping Sandbox built by Shadow [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-full wp-image-78051" src="http://robohub.org/wp-content/uploads/2017/05/sgsmain.png" alt="" width="657" height="485" srcset="https://robohub.org/wp-content/uploads/2017/05/sgsmain.png 657w, https://robohub.org/wp-content/uploads/2017/05/sgsmain-425x314.png 425w" sizes="(max-width: 657px) 100vw, 657px" />
<p>Would you like to make a robot to grasp something, but you think that is impossible to you just because you can’t buy a robot arm? I’m here to tell that you can definitely achieve this without buying a real robot. Let&#8217;s see how:<span id="more-78045"></span></p>
<div class="keep-aspect"><iframe title="[ROS Q&amp;A] Smart Grasping Sandbox online Testbed by Shadow Robot" width="500" height="281" src="https://www.youtube-nocookie.com/embed/uAz3oAseIjQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<h3>How is that possible?</h3>
<p>The <a href="https://medium.freecodecamp.com/an-open-sandbox-for-robot-grasping-cee467a3fabb" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Smart Grasping Sandbox</a> built by <a href="http://www.shadowrobot.com/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Shadow Robotics</a> is now available for everybody on the <a href="http://rds.theconstructsim.com/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">ROS Development Studio</a> – a system that allows you to create and test your robot programs through simulations using only a web browser.</p>
<h3>Wait, what is the Smart Grasping Sandbox?</h3>
<p>The Smart Grasping Sandbox is a public simulation for the <a href="https://www.shadowrobot.com/shadow-smart-grasping-system/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Shadow’s Smart Grasping System</a> with the<a href="https://www.universal-robots.com/products/ur10-robot/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">UR10 robot from Universal Robots</a>. It allows you to make a robot to grasp something without having to learn everything related to Machine Learning, and being available on the ROS Development Studio, it allows you to test it without the hassle of installing all the requirements.</p>
<p>As Ugo Cupcic <a href="https://medium.freecodecamp.com/an-open-sandbox-for-robot-grasping-cee467a3fabb" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">said</a>:</p>
<blockquote><p>I don’t want to have to specify every aspect of a problem — I’d rather the system learn the best way to approach a given problem itself.</p></blockquote>
<h3>Using the Development Environment for Grasping</h3>
<p>In order to user the Smart Grasping Sandbox on <a href="http://rds.theconstructsim.com/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">ROS Development Studio</a>&#8212;also known as RDS&#8212;just go to <a href="http://rds.theconstructsim.com/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">http://rds.theconstructsim.com</a> and Sign In. Once logged in, go to the Public Simulations, select the Smart Grasping Sandbox simulation and press the red <strong>Launch this simulation</strong> button.</p>
<img decoding="async" class="aligncenter size-full wp-image-78047" src="http://robohub.org/wp-content/uploads/2017/05/smart-grasping.png" alt="" width="360" height="660" srcset="https://robohub.org/wp-content/uploads/2017/05/smart-grasping.png 360w, https://robohub.org/wp-content/uploads/2017/05/smart-grasping-232x425.png 232w" sizes="(max-width: 360px) 100vw, 360px" />
<p>After pressing the <strong>Launch this simulation</strong>, a new screen will appears asking you to select the <strong>launch file</strong>. Just keep the default <strong>main.launch</strong> and press the red <strong>run</strong> button.</p>
<img decoding="async" class="aligncenter size-full wp-image-78048" src="http://robohub.org/wp-content/uploads/2017/05/select-launch.png" alt="" width="469" height="644" srcset="https://robohub.org/wp-content/uploads/2017/05/select-launch.png 469w, https://robohub.org/wp-content/uploads/2017/05/select-launch-310x425.png 310w" sizes="(max-width: 469px) 100vw, 469px" />
<p>After a few seconds, the simulation will be loaded and you will be able interact with the simulation.</p>
<p>Once the simulation is loaded, you can see the instructions about how to control it on the left side.</p>
<p>In the center you have the simulation itself, and on the right side you can see the <strong>Integrated Development Environment</strong> and the <strong>Web Shell</strong> that allows you to <strong>modify the code</strong> and send <strong>Linux</strong>commands to the simulation respectively.</p>
<p>You can modify, the simulation, the control programs or even create your own manipulation control programs, make the grasping system learn using deep learning or else. This is up to you as developer!</p>
<img decoding="async" class="aligncenter size-full wp-image-78049" src="http://robohub.org/wp-content/uploads/2017/05/shadow-robot-simulation.png" alt="" width="1364" height="678" srcset="https://robohub.org/wp-content/uploads/2017/05/shadow-robot-simulation.png 1364w, https://robohub.org/wp-content/uploads/2017/05/shadow-robot-simulation-425x211.png 425w, https://robohub.org/wp-content/uploads/2017/05/shadow-robot-simulation-768x382.png 768w, https://robohub.org/wp-content/uploads/2017/05/shadow-robot-simulation-1024x509.png 1024w" sizes="(max-width: 1364px) 100vw, 1364px" />
<p>You can also see what the robot sees using the online ROS 3D Visualizer (RViz) typing the following command on the <strong>Web Shell</strong>:</p>
<p><code>$ rosrun rviz rviz</code></p>
<p>After running <strong>Rviz</strong>, you press the red <strong>Open ROS Graphic Tools</strong> button on the bottom left side of the system and a new tab should appear with Rviz.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-78050" src="http://robohub.org/wp-content/uploads/2017/05/rviz.png" alt="" width="1149" height="712" srcset="https://robohub.org/wp-content/uploads/2017/05/rviz.png 1149w, https://robohub.org/wp-content/uploads/2017/05/rviz-425x263.png 425w, https://robohub.org/wp-content/uploads/2017/05/rviz-768x476.png 768w, https://robohub.org/wp-content/uploads/2017/05/rviz-1024x635.png 1024w" sizes="(max-width: 1149px) 100vw, 1149px" /><hr class="xh2  "></p>
<h3>Conclusion</h3>
<p>Here we have seen how to use a simulation to programme a robot to grasp something.</p>
<p>The simulation uses <em><a href="http://ros.org/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">ROS</a></em> as the middleware to control the robot.</p>
<p>If you want to learn ROS or master your ROS Skills, we recommend you to give a try to <em><a href="http://www.robotigniteacademy.com/" target="_blank" rel="noopener noreferrer follow external" data-wpel-link="external">Robot Ignite Academy</a></em>.</p>
<p>If you are a robot builder and want to have your own simulation available for everybody on RDS, or you want to have a course specifically for your robot, contact us through the email <em><a href="mailto:info@theconstructsim.com" target="_blank" rel="noopener noreferrer">info@theconstructsim.com</a></em>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Programming your NAO robot for human interaction</title>
		<link>https://robohub.org/programming-your-nao-robot-for-human-interaction/</link>
		
		<dc:creator><![CDATA[Philip English]]></dc:creator>
		<pubDate>Tue, 09 May 2017 08:15:19 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[household]]></category>
		<category><![CDATA[human-robot interaction]]></category>
		<category><![CDATA[humanoids]]></category>
		<category><![CDATA[NAO]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/programming-your-nao-robot-for-human-interaction/</guid>

					<description><![CDATA[Today we are looking at how to program your NAO Robot for Human Interaction. Watch the video and follow the steps below to get interactive with your robot pal!  Create an animation of movements Right click, select “Create a new box” Select “Timeline” We want the robot to do 3 things, a five high, a [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-full wp-image-78026" src="http://robohub.org/wp-content/uploads/2017/05/programming-nao-human-interaction.jpg" alt="" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2017/05/programming-nao-human-interaction.jpg 900w, https://robohub.org/wp-content/uploads/2017/05/programming-nao-human-interaction-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2017/05/programming-nao-human-interaction-768x512.jpg 768w" sizes="(max-width: 900px) 100vw, 900px" />
<p>Today we are looking at how to program your NAO Robot for Human Interaction. Watch the video and follow the steps below to get interactive with your robot pal!</p>
<div class="keep-aspect"><iframe title="NAO Robot Human Interaction Tutorial" width="500" height="281" src="https://www.youtube-nocookie.com/embed/fT8rNQEs-_w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<ol>
<li> Create an animation of movements
<ul>
<li>Right click, select “Create a new box”</li>
<li>Select “Timeline”</li>
</ul>
</li>
</ol>
<p>We want the robot to do 3 things, a five high, a hello, and a goodbye move:</p>
<ul>
<li>On the Timeline Edit Box
<ul>
<li>Name: High Five</li>
<li>Image: Click “Edit”
<ul>
<li>On the Edit box image</li>
<li>Click “Browse” and select a file</li>
</ul>
</li>
<li>Click “OK”</li>
</ul>
</li>
</ul>
<p>Now, as you can remember, if we take it to the box, we can get access to the NAO’s Timeline. Mine now is connected to the PC. So what I’m going to do is I’m going to set some points of the NAO to do some movements. As I have said before on one of my tutorial I’m going to make it set all the joints to the whole body.</p>
<p>We want to make him look like he is doing a high five:</p>
<ul>
<li>Right click the arm
<ul>
<li>Click “Stiffen chain on/off”</li>
<li>Raise his arm up</li>
</ul>
</li>
<li>Set joints and keyframe
<ul>
<li>Select “Arms”</li>
</ul>
</li>
<li>Click “Play” on the Motion Controller</li>
</ul>
<p>That’s a quite quick high five actually. What we want to do is to actually give him a pause when he got his arm in the air. So, the way we do that is to copy and paste the keyframe.</p>
<p>Grab a few already built in animation, just to show you how much it works:</p>
<ul>
<li>Go to Motions&gt;Animations
<ul>
<li>Drag a “Hello” box to the workspace</li>
<li>Drag a “Wipe Forehead” box for a goodbye move to the workspace</li>
</ul>
</li>
</ul>
<p>We want to hear him speak, so:</p>
<ul>
<li>Go to Voice
<ul>
<li>Drag a “Speech Recognition” box to the workspace</li>
</ul>
</li>
<li>Drag a “Switch Case”
<ul>
<li>Connect the “Speech Recognition” box to the “Switch Case” box</li>
<li>On the first case, write “Hello” and connect to the “Hello” box</li>
<li>On the second case, write “High Five” and connect it to the “High Five” box</li>
<li>On the third case, write “Goodbye” and connect it to the “Wipe Forehand” box</li>
</ul>
</li>
<li>Set parameters of Speech Recognition
<ul>
<li>Word list: Hi; High Five; Goodbye;</li>
<li>Play with the threshold to see what works better</li>
<li>Click “OK”</li>
</ul>
</li>
</ul>
<p>So there we have a speech recognition, he will listen to what I am saying and then we will act a motion. Now, what we need to do is to make sure that the robot doesn’t repeat it, so you know, it doesn’t loop back. Before we do that, we are going to:</p>
<ul>
<li>Drag 3 “Say” box to the workspace so he can  speak back to us
<ul>
<li>On the “Switch case”, connect the “Hello” case on the “Say” box
<ul>
<li>Localized Text
<ul>
<li>Change the language to English(United States)</li>
<li>Write “Hi” on the textbox</li>
</ul>
</li>
</ul>
</li>
<li>Connect the “High Five” case on the “Say (1)” box
<ul>
<li>Localized Text
<ul>
<li>Change the language to English(United States)</li>
<li>Write “High Five” on the textbox</li>
</ul>
</li>
</ul>
</li>
<li>Connect the “Goodbye” case on the “Say(2)” box
<ul>
<li>Localized Text
<ul>
<li>Change the language to English(United States)</li>
<li>Write “Goodbye” on the textbox</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>So, here’s what we are saying, he recognizes it, says a word and does an animation, now what we want to do is we don’t want him to loop, as in he keeps hearing the same sound and maybe he starts to hear himself and repeat himself, so to stop that we need to connect the end of the motion boxes back to the “Speech Recognition” box. A simple output to the input speech.</p>
<p>I am going to make a little change actually, instead of “Hello”, we should put “Hi” here and I’m going to put “Hi” in there which is already done because they have to match otherwise if it doesn’t match he won’t recognize it. So if he hit “Load”</p>
<p><strong>Philip</strong>: High Five!</p>
<p><strong>Nao</strong>: High Five!</p>
<p><strong>Philip: </strong>Goodbye!</p>
<p><strong>Nao: </strong>Goodbye!</p>
<p><strong>Philip: </strong>Hi!</p>
<p><strong>Nao: </strong>Hello!</p>
<p>Brilliant! So that looks likes he’s working very well, so again if we says “Hi”, “High Five” or “Good bye” then he will greet you. If you walk in to room and you say “Hi” to a robot, obviously, he will do his animation and say a speech. Here you can use your imagination and try different things, different animations.</p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also enjoy these from Robo-Phil:</em></p>
<ul>
<li><a href="http://robohub.org/python-programming-your-nao-robot/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Python programming your NAO robot</a></li>
<li><a href="http://robohub.org/hard-at-work-a-review-of-the-laevo-exoskeleton/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Hard at work: A review of the Laevo Exoskeleton</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Developing ROS programs for the Sphero robot</title>
		<link>https://robohub.org/developing-ros-programs-for-the-sphero-robot/</link>
		
		<dc:creator><![CDATA[Ricardo Téllez]]></dc:creator>
		<pubDate>Mon, 13 Mar 2017 15:30:40 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[household]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Sphero]]></category>
		<guid isPermaLink="false">http://robohub.org/developing-ros-programs-for-the-sphero-robot/</guid>

					<description><![CDATA[You probably know the Sphero robot. It is a small robot with the shape of a ball. In case that you have one, you must know that it is possible to control it using ROS, by installing in your computer the Sphero ROS packages developed by Melonee Wise and connecting to the robot&#160;using the bluetooth]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-full wp-image-73660" src="http://robohub.org/wp-content/uploads/2017/03/sphero-robotic-ball-5-1024x736.jpg" alt="" width="1024" height="736" srcset="https://robohub.org/wp-content/uploads/2017/03/sphero-robotic-ball-5-1024x736.jpg 1024w, https://robohub.org/wp-content/uploads/2017/03/sphero-robotic-ball-5-1024x736-425x305.jpg 425w, https://robohub.org/wp-content/uploads/2017/03/sphero-robotic-ball-5-1024x736-768x552.jpg 768w, https://robohub.org/wp-content/uploads/2017/03/sphero-robotic-ball-5-1024x736-417x300.jpg 417w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>You probably know the Sphero robot. It is a small robot with the shape of a ball. In case that you have one, you must know that it is possible to control it using ROS, by installing in your computer the Sphero ROS packages developed by Melonee Wise and connecting to the robot using the bluetooth of the computer.<span id="more-73602"></span></p>
<p>Now, you can use the ROS Development Studio to create ROS control programs for that robot, testing as you go by using the integrated simulation.</p>
<p>The ROS Development Studio (RDS) provides off-the-shelf a simulation of Sphero with a maze environment. The simulation provides the same interface as the ROS module created by Melonee, so you can test your develop and test the programs on the environment, and once working properly, transfer it to the real robot.</p>
<p>We created the simulation to teach ROS to the students of the Robot Ignite Academy. They have to learn ROS enough to make the Sphero get out of the maze by using odometry and IMU.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73661" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192857-1024x529.png" alt="" width="1024" height="529" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192857-1024x529.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192857-1024x529-425x220.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192857-1024x529-768x397.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192857-1024x529-500x258.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><hr class="xh2  "></p>
<p><strong>Using the simulation</strong></p>
<p>To use the Sphero simulation on RDS go to rds.theconstructsim.com and sign in. If you select the Public simulations, you will quickly identify the Sphero simulation.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73662" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192251.png" alt="" width="717" height="554" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192251.png 717w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192251-425x328.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192251-388x300.png 388w" sizes="(max-width: 717px) 100vw, 717px" />Press the red Play button. A new screen will appear giving you details about the simulation and asking you which launch file you want to launch. The main.launch selected by default is the correct one, so just press Run.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73663" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192318.png" alt="" width="815" height="704" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192318.png 815w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192318-425x367.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192318-768x663.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-192318-347x300.png 347w" sizes="(max-width: 815px) 100vw, 815px" />After a few seconds the simulation will appear together with the development environment for creating the programs for Sphero and testing them.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73664" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193415-1024x528.png" alt="" width="1024" height="528" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193415-1024x528.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193415-1024x528-425x219.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193415-1024x528-768x396.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193415-1024x528-500x258.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" />On the left hand side you have a notebook containing information about the robot and how to program it with ROS. This notebook contains just some examples, but it can be completed and/or modified at your will. As you can see it is an iPython notebook and follows its standard. So it is up to you to modify it, add new information or else. Remember that any change you do to the notebook will be saved in a simulation in your private area of RDS, so you can come back later and launch it with your modifications.</p>
<img decoding="async" class="aligncenter size-full wp-image-73665" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193920-1024x705.png" alt="" width="1024" height="705" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193920-1024x705.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193920-1024x705-425x293.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193920-1024x705-768x529.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-193920-1024x705-436x300.png 436w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>You must know that the code included in the notebook is directly executable by selecting the cell of the code (do a single click on it) and pressing the small play button at the top of the notebook. This means that, once you press that button, the code will be executed and start controlling the Sphero simulated robot for a few time-steps (remember to have the simulation activated (Play button of the simulation activated) to see the robot move).</p>
<p>On the center area, you can see the IDE. It is the development environment for developing the code. You can browse there all the packages related to the simulation or any other packages that you may create.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73666" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194132.png" alt="" width="959" height="912" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194132.png 959w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194132-425x404.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194132-768x730.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194132-315x300.png 315w" sizes="(max-width: 959px) 100vw, 959px" />On the right hand side, you can see the simulation and beneath it, the shell. The simulation shows the Sphero robot as well as the environment of the maze. On the shell, you can issue commands in the computer that contains the simulation of the robot. For instance, you can use the shell to launch the keyboard controller and move the Sphero around. Try typing the following:</p>
<ul>
<li><em>$ roslaunch sphero_gazebo keyboard_teleop.launch</em></li>
</ul>
<p>Now you must be able to move the robot around the maze by pressing some keys of the keyboard (instructions provided on the screen).</p>
<img decoding="async" class="aligncenter size-full wp-image-73667" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194551.png" alt="" width="500" height="987" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194551.png 500w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194551-215x425.png 215w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-194551-152x300.png 152w" sizes="(max-width: 500px) 100vw, 500px" />
<p>You can also launch there Rviz, and then watch the robot, the frames and any other additional information you may want of the robot. Type the following:</p>
<ul>
<li><em>$ rosrun rviz rviz</em></li>
</ul>
<p>Then press the Screen red icon located at the bottom-left of the screen (named the graphical tools). A new tab should appear, showing how the Rviz is loading. After a while, you can configure the Rviz to show the information you desire.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73668" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-195210-1024x768.png" alt="" width="1024" height="768" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-195210-1024x768.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-195210-1024x768-425x319.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-195210-1024x768-768x576.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-195210-1024x768-400x300.png 400w" sizes="(max-width: 1024px) 100vw, 1024px" />There are many ways you can configure the screen to provide more focus to what interests you the most.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-73669" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200711-1024x527.png" alt="" width="1024" height="527" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200711-1024x527.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200711-1024x527-425x219.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200711-1024x527-768x395.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200711-1024x527-500x257.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><img decoding="async" class="aligncenter size-full wp-image-73670" src="http://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200744-1024x531.png" alt="" width="1024" height="531" srcset="https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200744-1024x531.png 1024w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200744-1024x531-425x220.png 425w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200744-1024x531-768x398.png 768w, https://robohub.org/wp-content/uploads/2017/03/Screenshot-from-2017-03-09-200744-1024x531-500x259.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" />To end this post, I would like to indicate that you can download the simulation to your computer at any time, by doing right-click on the directories and selecting Download. You can also clone the The Construct simulations repository to download it (among other simulations available).</p>
<hr class="xh2  ">
<p><em>If you liked this tutorial, you may also enjoy these:</em></p>
<ul>
<li><a href="http://robohub.org/ugcs-photogrammetry-technique-for-uav-land-surveying-missions/" target="_blank" data-wpel-link="internal">UgCS photogrammetry technique for UAV land surveying missions</a></li>
<li><a href="http://robohub.org/programming-for-robotics-introduction-to-ros/" target="_blank" data-wpel-link="internal">Programming for robotics: Introduction to ROS</a></li>
<li><a href="http://robohub.org/python-programming-your-nao-robot/" target="_blank" data-wpel-link="internal">Python programming your NAO robot</a></li>
<li><a href="http://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/" target="_blank" data-wpel-link="internal">Robotics, maths, python: A fledgling computer scientist’s guide to inverse kinematics</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal">3-D printing hydraulically-powered robots, no assembly required</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>UgCS photogrammetry technique for UAV land surveying missions</title>
		<link>https://robohub.org/ugcs-photogrammetry-technique-for-uav-land-surveying-missions/</link>
		
		<dc:creator><![CDATA[SPH Engineering]]></dc:creator>
		<pubDate>Thu, 09 Mar 2017 14:00:00 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[environment & agriculture]]></category>
		<category><![CDATA[exploration & mining]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[manipulation]]></category>
		<category><![CDATA[mapping & surveillance]]></category>
		<category><![CDATA[sensing]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[surveying]]></category>
		<category><![CDATA[UAVs & drones]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/ugcs-photogrammetry-technique-for-uav-land-surveying-missions/</guid>

					<description><![CDATA[&#160; UgCS is easy-to-use software for planning and flying UAV drone-survey missions. It supports almost any UAV platform, providing convenient tools for areal and linear surveys and enabling direct drone control. What&#8217;s more, UgCS enables professional land survey mission planning using photogrammetry techniques. How to plan photogrammetry mission with UgCS Standard land surveying photogrammetry mission planning [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<div id="attachment_73423" style="width: 860px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-73423" class="size-full wp-image-73423" src="http://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot.png" alt="" width="850" height="478" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-425x239.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-768x432.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-500x281.png 500w" sizes="(max-width: 850px) 100vw, 850px" /></a><p id="caption-attachment-73423" class="wp-caption-text">Figure 15: Adding 40m overshot to both ends of each survey line</p></div>
<p><a href="https://www.ugcs.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">UgCS</a> is easy-to-use software for planning and flying UAV drone-survey missions. It supports almost any UAV platform, providing convenient tools for areal and linear surveys and enabling direct drone control. What&#8217;s more, UgCS enables professional land survey mission planning using photogrammetry techniques.</p>
<p><strong>How to plan photogrammetry mission with UgCS</strong></p>
<p>Standard land surveying photogrammetry mission planning with UgCS can be divided into following steps :</p>
<ol>
<li>Obtain input data</li>
<li>Plan mission</li>
<li>Deploy ground control points</li>
<li>Fly mission</li>
<li>Image geotagging</li>
<li>Data processing</li>
<li>Map import to UgCS (optional)</li>
</ol>
<p><a href="https://www.youtube.com/watch?v=SalCQoG6WUw&#038;feature=youtu.be" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.youtube.com/watch?v=SalCQoG6WUw&amp;feature=youtu.be</a></p>
<hr class="xh2  ">
<p><strong>Step one: Obtain input data</strong></p>
<p>Firstly, to reach the desired result, input settings have to be defined:</p>
<ul class="txt">
<li>Required GSD (ground sampling distance &#8211; size of single pixel on ground),</li>
<li>Survey area boundaries,</li>
<li>Required forward and side overlap.</li>
</ul>
<p>GSD and area boundaries are usually defined by the customer’s requirements for output material parameters, for example by scale and resolution of digital map. Overlap should be chosen according to specific conditions of surveying area and requirements of data processing software.</p>
<p>Each data processing software (e.g., Pix4D, Agisoft Photoscan, Dronedeploy, Acute 3d) has specific requirements for side and forward overlaps for different surfaces. To choose correct values, please refer to documentation of chosen software. In general, 75% forward and 60% side overlap will be a good choice. Overlapping should be increased for areas with small amount of visual cues, for example for deserts or forests.</p>
<p>Often, aerial photogrammetry beginners are excited about the option to produce digital maps with extremely high resolution (1-2cm/pixel), and to use very small GSD for mission planning. This is very bad practice. Small GSD will result in longer flight time, hundreds of photos for each acre, tens of hours of processing and heavy output files. GSD should be set according to the output requirements of the digital map.</p>
<p>Other limitations can occur. For example, GSD of 10cm/pixel is required, but designed to use a Sony A6000 camera. Based on mentioned GSD and camera’s parameters, the flight altitude would be set to 510 meters. In most countries, maximum allowed altitude of UAV&#8217;s (without special permission) is limited to 120m/400ft AGL (above ground). Taking into account the maximum allowed altitude, the maximum possible GSD in this case could be no more than 2.3cm.</p>
<hr class="xh2  ">
<p><strong>Step two: Plan your mission</strong></p>
<p>Mission planning consists of two stages:</p>
<ul class="txt">
<li>Initial planning,</li>
<li>Route optimisation.</li>
</ul>
<p><em>-Initial planning:</em></p>
<p>The first step is to set surveying area using UgCS Photogrammetry tool. Area can be set using visual cues on underlying map or using exact coordinates of edges. The result &#8211; survey area is marked with yellow boundaries (Figure 1).</p>
<div id="attachment_73401" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73401" class="size-full wp-image-73401" src="http://robohub.org/wp-content/uploads/2017/03/Fig1_set_survey_area.png" alt="" width="850" height="478" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig1_set_survey_area.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig1_set_survey_area-425x239.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig1_set_survey_area-768x432.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig1_set_survey_area-500x281.png 500w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73401" class="wp-caption-text">Figure 1: Setting the survey area</p></div>
<p>The next step is to set GSD and overlapping for the camera in Photogrammetry tool&#8217;s settings window (Figure 2).</p>
<div id="attachment_73402" style="width: 290px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73402" class="size-full wp-image-73402" src="http://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera.png" alt="" width="280" height="280" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera.png 280w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-220x220.png 220w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-32x32.png 32w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-50x50.png 50w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-64x64.png 64w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-96x96.png 96w, https://robohub.org/wp-content/uploads/2017/03/Fig2_set_camera-128x128.png 128w" sizes="(max-width: 280px) 100vw, 280px" /><p id="caption-attachment-73402" class="wp-caption-text">Figure 2: Setting camera&#8217;s Ground Sampling Distance and overlapping</p></div>
<p>To take photos in Photogrammetry tool&#8217;s setting window, define the control action of the camera (Figure 3). Set camera by distance triggering action with default values.</p>
<div id="attachment_73403" style="width: 339px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73403" class="size-full wp-image-73403" src="http://robohub.org/wp-content/uploads/2017/03/Fig3_camera_control_action.png" alt="" width="329" height="234" /><p id="caption-attachment-73403" class="wp-caption-text">Figure 3: Setting camera&#8217;s control action</p></div>
<p>At this point, initial route planning is completed. UgCS will automatically calculate photogrammetry route (see Figure 4).</p>
<div id="attachment_73404" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73404" class="size-full wp-image-73404" src="http://robohub.org/wp-content/uploads/2017/03/Fig4_un-optimized_route.png" alt="" width="850" height="478" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig4_un-optimized_route.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig4_un-optimized_route-425x239.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig4_un-optimized_route-768x432.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig4_un-optimized_route-500x281.png 500w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73404" class="wp-caption-text">Figure 4: Calculated photogrammetry survey route before optimisation</p></div>
<p><em>-Route optimisation</em></p>
<p>To optimise the route, it&#8217;s calculated parameters should be known: altitude, estimated flight time, number of shots, etc.</p>
<p>Part of the route&#8217;s calculated information can be found in the elevation profile window. To access the elevation profile window (if it is not visible on screen) click the parameters icon on the route card (lower-right corner, see Figure 5), and from the drop-down menu select show elevation:</p>
<div id="attachment_73405" style="width: 281px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73405" class="size-full wp-image-73405" src="http://robohub.org/wp-content/uploads/2017/03/Fig5_parameters.png" alt="" width="271" height="178" /><p id="caption-attachment-73405" class="wp-caption-text">Figure 5: Accessing elevation window from Route cards Parameters settings</p></div>
<p>The elevation profile window will present an estimated route length, duration, waypoint count and min/max altitude data:</p>
<div id="attachment_73408" style="width: 665px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73408" class="size-full wp-image-73408" src="http://robohub.org/wp-content/uploads/2017/03/Fig6_elevation_profile_parameters.png" alt="" width="655" height="254" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig6_elevation_profile_parameters.png 655w, https://robohub.org/wp-content/uploads/2017/03/Fig6_elevation_profile_parameters-425x165.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig6_elevation_profile_parameters-500x194.png 500w" sizes="(max-width: 655px) 100vw, 655px" /><p id="caption-attachment-73408" class="wp-caption-text">Figure 6: Route values in elevation profile window</p></div>
<p>To get other calculated values, open route log by clicking on route status indicator: the green check-mark (upper-right corner, see Figure 7) of the route card:</p>
<div id="attachment_73409" style="width: 731px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73409" class="size-full wp-image-73409" src="http://robohub.org/wp-content/uploads/2017/03/Fig7_route_values-1.png" alt="" width="721" height="293" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig7_route_values-1.png 721w, https://robohub.org/wp-content/uploads/2017/03/Fig7_route_values-1-425x173.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig7_route_values-1-500x203.png 500w" sizes="(max-width: 721px) 100vw, 721px" /><p id="caption-attachment-73409" class="wp-caption-text">Figure 7: Route card and status indicator, Route log</p></div>
<p>Using route parameters, it can be optimised to be more efficient and safe.</p>
<p><em>-Survey line direction</em></p>
<p>By default, UgCS will trace survey lines from south to north. But, in most cases, it will be more optimal to fly parallel to the longest boundary line of the survey area. To change survey line direction, edit direction angle field in the photogrammetry tool. In the example, by changing angle to 135 degrees, the number of passes is reduced from five (Figure 4) to four (Figure 8) and route length is 1km instead of 1.3km.</p>
<div id="attachment_73410" style="width: 737px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73410" class="size-full wp-image-73410" src="http://robohub.org/wp-content/uploads/2017/03/Fig8_optimized_route_passes.png" alt="" width="727" height="490" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig8_optimized_route_passes.png 727w, https://robohub.org/wp-content/uploads/2017/03/Fig8_optimized_route_passes-425x286.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig8_optimized_route_passes-445x300.png 445w" sizes="(max-width: 727px) 100vw, 727px" /><p id="caption-attachment-73410" class="wp-caption-text">Figure 8: Changed survey line angle to be parallel to longest boundary</p></div>
<p><em>-Altitude type</em></p>
<p>UgCS Photogrammetry tool has the option to define how to trace the route according to altitude, with constant altitude above ground (AGL) or above mean sea level (AMSL). Please refer to your data processing software requirements as to which altitude tracking method it recommend.</p>
<p>In the UgCS team&#8217;s experience, the choice of altitude type depends on desired result. For orthophotomap (standard aerial land survey output format) it is better to choose AGL to ensure constant GSD for the entire map. If the aim is to produce DEM or 3D reconstruction, use AMSL so the data processing software has more data to correctly determine ground elevation by photos in order to provide more qualitative output.</p>
<div id="attachment_73411" style="width: 663px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73411" class="size-full wp-image-73411" src="http://robohub.org/wp-content/uploads/2017/03/Fig9_altitude_type_AMSL.png" alt="" width="653" height="254" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig9_altitude_type_AMSL.png 653w, https://robohub.org/wp-content/uploads/2017/03/Fig9_altitude_type_AMSL-425x165.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig9_altitude_type_AMSL-500x194.png 500w" sizes="(max-width: 653px) 100vw, 653px" /><p id="caption-attachment-73411" class="wp-caption-text">Figure 9: Elevation profile with constant altitude above mean sea level (AMSL)</p></div>
<p>In this case, UgCS will calculate flight altitude based on the lowest point of the survey area.</p>
<p>If AGL is selected in photogrammetry tool&#8217;s settings, UgCS will calculate the altitude for each waypoint. But in this case, terrain following will be rough if no “additional waypoints” are added (see Figure 10).</p>
<div id="attachment_73412" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73412" class="size-full wp-image-73412" src="http://robohub.org/wp-content/uploads/2017/03/Fig10_altitude_type_AGL.png" alt="" width="850" height="624" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig10_altitude_type_AGL.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig10_altitude_type_AGL-425x312.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig10_altitude_type_AGL-768x564.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig10_altitude_type_AGL-409x300.png 409w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73412" class="wp-caption-text">Figure 10: Elevation profile with AGL without additional waypoints</p></div>
<p>Therefore, if AGL is used, add some “additional waypoints” flags and UgCS will calculate a flight plan with elevation profile accordingly (see Figure 11).</p>
<div id="attachment_73413" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73413" class="size-full wp-image-73413" src="http://robohub.org/wp-content/uploads/2017/03/Fig11_AGL_with_additional_waypoints.png" alt="" width="850" height="612" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig11_AGL_with_additional_waypoints.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig11_AGL_with_additional_waypoints-425x306.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig11_AGL_with_additional_waypoints-768x553.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig11_AGL_with_additional_waypoints-417x300.png 417w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73413" class="wp-caption-text">Figure 11: Elevation profile with AGL with additional waypoints</p></div>
<p><em>-Speed</em></p>
<p>In general, if flight speed is increased it will minimise flight time. But high speed in combination with large camera exposure can result in blurred images. In most cases 10m/s is the best choice.</p>
<p><em>-Camera control method</em></p>
<p>UgCS supports 3 camera control methods (actions):</p>
<ol>
<li>Make a shot (trigger camera) in waypoint,</li>
<li>Make shot every N seconds,</li>
<li>Make shot every N meters.</li>
</ol>
<p>Not all autopilots support all 3 camera control options. For example (quite old) DJI A2 does support all three options, but newer (starting from Phantom 3 and up to M600) cameras support only triggering in waypoints and by time. DJI promised to implement triggering by distance, but it’s not available yet.</p>
<p>Here are some benefits and drawbacks for all three methods:</p>
<div id="attachment_73416" style="width: 832px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73416" class="size-full wp-image-73416" src="http://robohub.org/wp-content/uploads/2017/03/table.jpg" alt="" width="822" height="464" srcset="https://robohub.org/wp-content/uploads/2017/03/table.jpg 822w, https://robohub.org/wp-content/uploads/2017/03/table-425x240.jpg 425w, https://robohub.org/wp-content/uploads/2017/03/table-768x434.jpg 768w, https://robohub.org/wp-content/uploads/2017/03/table-175x100.jpg 175w, https://robohub.org/wp-content/uploads/2017/03/table-500x282.jpg 500w" sizes="(max-width: 822px) 100vw, 822px" /><p id="caption-attachment-73416" class="wp-caption-text">Table 1: Benefits and Drawback for camera triggering methods</p></div>
<p>In conclusion:</p>
<ul class="txt">
<li>Trigger in waypoints should be preferred when possible</li>
<li>Trigger by time should be used only if no other method is possible</li>
<li>Trigger by distance should be used when triggering in waypoints is not possible to use</li>
</ul>
<p>To select triggering method in UgCS Photogrammetry tool accordingly, use one of three available icons:</p>
<ul class="txt">
<li>Set camera mode</li>
<li>Set camera by time</li>
<li>Set camera by distance</li>
</ul>
<p><em>-Glibal control</em></p>
<p>Drones, e.g., DJI Phantom 3, Phantom 4, Inspire, M100 or M600 with integrated gimbal, have the option to control camera position as part of an automatic route plan.</p>
<p>It is advisable to set camera to nadir position in the first waypoint, and in horizontal position before landing to prevent lenses from potential damage.</p>
<p>To set camera position, select the waypoint preceding the photogrammetry area and click set camera attitude/zoom (Figure 12) and enter &#8220;90&#8221; in the &#8220;Tilt&#8221; field (Figure 13).</p>
<div id="attachment_73418" style="width: 346px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73418" class="size-full wp-image-73418" src="http://robohub.org/wp-content/uploads/2017/03/Fig12_Gimbal_control_set_camera.png" alt="" width="336" height="314" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig12_Gimbal_control_set_camera.png 336w, https://robohub.org/wp-content/uploads/2017/03/Fig12_Gimbal_control_set_camera-321x300.png 321w" sizes="(max-width: 336px) 100vw, 336px" /><p id="caption-attachment-73418" class="wp-caption-text">Figure 12: Setting camera attitude</p></div>
<div id="attachment_73420" style="width: 299px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73420" class="size-full wp-image-73420" src="http://robohub.org/wp-content/uploads/2017/03/Fig13_Gimbal_control_Tilt.png" alt="" width="289" height="438" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig13_Gimbal_control_Tilt.png 289w, https://robohub.org/wp-content/uploads/2017/03/Fig13_Gimbal_control_Tilt-280x425.png 280w, https://robohub.org/wp-content/uploads/2017/03/Fig13_Gimbal_control_Tilt-198x300.png 198w" sizes="(max-width: 289px) 100vw, 289px" /><p id="caption-attachment-73420" class="wp-caption-text">Figure 13: Setting camera position</p></div>
<p>As described previously, this waypoint should be a Stop&amp;Turn type, otherwise the drone could skip this action.</p>
<p>To set camera to horizontal position, select last waypoint of survey route and click set camera attitude/zoom and enter &#8220;0&#8221; in the &#8220;Tilt&#8221; field.</p>
<p><em>-Turn types</em></p>
<p>Most autopilots or multirotor drones support different turn types in waypoints. Most popular DJI drones have three turn-types:</p>
<ul class="txt">
<li>Stop and Turn: drone flies to the fixed point accurately, stays at that fixed point and then flies to next fixed point.</li>
<li>Bank Turn: the drone would fly with constant speed from one point to another without stopping.</li>
<li>Adaptive Bank Turn: It is almost the same performance like Bank Turn mode (Figure 13), but the real flight routine will be more accurately than Bank Turn.</li>
</ul>
<p>It is advisable not to use Bank Turn for photogrammetry missions. Drone interprets Bank Turns as “recommendation destination waypoint”. The drone will fly towards this direction but will almost never pass through the waypoint. Because drone will not pass the waypoint, no action will be executed, meaning the camera will not be triggered, etc.</p>
<p>Adaptive Bank Turn should be used with caution because a drone can miss waypoints and, again, no camera triggering will be initiated.</p>
<div id="attachment_73422" style="width: 410px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73422" class="size-full wp-image-73422" src="http://robohub.org/wp-content/uploads/2017/03/Fig14_dji_turn_types.png" alt="" width="400" height="189" /><p id="caption-attachment-73422" class="wp-caption-text">Figure 14: Illustration of typical DJI drone trajectories for Bank Turn and Adaptive Bank Turn types</p></div>
<p>Sometimes, adaptive bank turn type has to be used in order to have shorter flight time compared to stop and turn. When using adaptive bank turns, it is recommended to use overshot (see below) for the photogrammetry area.</p>
<p><em>-Overshot</em></p>
<p>Initially overshot was implemented for fixed wing (airplane) drones in order to have enough space for manoeuvring a U-turn.</p>
<p>Overshot can be set in photogrammetry tool to add an extra segment to both ends of each survey line.</p>
<div id="attachment_73423-2" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73423-2" class="size-full wp-image-73423" src="http://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot.png" alt="" width="850" height="478" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-425x239.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-768x432.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig15_adding_overshot-500x281.png 500w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73423-2" class="wp-caption-text">Figure 15: Adding 40m overshot to both ends of each survey line</p></div>
<p>In the example (Figure 15) can be seen that UgCS added 40m additional segments to both ends of each survey line (comparing to Figure 8).</p>
<p>Adding overshot is useful for copter-UAVs in two situations:</p>
<ol>
<li>When Adaptive Bank Turns are used (or similar method for non-DJI drones), adding overshot will increase the chance that drone will precisely enter survey line and camera control action will be triggered. UgCS Team recommends to specify overshot that is approximately equal to distance between the parallel survey lines.</li>
<li>When Stop and Turn type is in use in combination with action to trigger camera in waypoints, there is a possibility that before making the shot, drone will start rotation to next waypoint &#8211; it can result in having photos with wrong orientation or blurred. To avoid that, shorter overshot has to be set, for example 5m. Don’t specify too short value (&lt; 3m) because some drones could ignore waypoints, that are too close.</li>
</ol>
<div id="attachment_73425" style="width: 1210px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73425" class="size-full wp-image-73425" src="http://robohub.org/wp-content/uploads/2017/03/Fig16_speed2.jpg" alt="" width="1200" height="675" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig16_speed2.jpg 1200w, https://robohub.org/wp-content/uploads/2017/03/Fig16_speed2-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2017/03/Fig16_speed2-768x432.jpg 768w, https://robohub.org/wp-content/uploads/2017/03/Fig16_speed2-1024x576.jpg 1024w, https://robohub.org/wp-content/uploads/2017/03/Fig16_speed2-500x281.jpg 500w" sizes="(max-width: 1200px) 100vw, 1200px" /><p id="caption-attachment-73425" class="wp-caption-text">Figure 16: Example of blurred image taken by drone in rotation to next waypoint</p></div>
<p><em>-Takeoff point</em></p>
<p>It is important to <strong><em>check the takeoff area</em></strong> at site before flying any mission! To better explain best practice on how to set takeoff point, first discuss an example of how it should not be done. Supposing that the takeoff point in our example mission (Figure 17) would be from the point marked with the airplane-icon, and drone pilot would upload the route on the ground with set automatic mission for automatic take-off.</p>
<div id="attachment_73426" style="width: 655px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73426" class="size-full wp-image-73426" src="http://robohub.org/wp-content/uploads/2017/03/Fig17_take_off.png" alt="" width="645" height="434" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig17_take_off.png 645w, https://robohub.org/wp-content/uploads/2017/03/Fig17_take_off-425x286.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig17_take_off-446x300.png 446w" sizes="(max-width: 645px) 100vw, 645px" /><p id="caption-attachment-73426" class="wp-caption-text">Figure 17: Take-off point example</p></div>
<p>Most drones in automatic takeoff mode would climb to low altitude about 3-10meters and then fly straight towards the first waypoint. Other drones would fly towards first waypoint straight from ground. Looking closely at the example map (Figure 17), some trees between the takeoff point and the first waypoint can be noticed. In this example, the drone more likely will not reach a safe altitude and will hit the trees.</p>
<p>Not only the surroundings can affect takeoff planning. Drone manufacturers can change drones elevation behavior in drone firmware, therefore after firmware updates it is recommended that you check drones automatic takeoff mode.</p>
<p>Also, a very important consideration is that most small UAVs use relative altitude for mission planing. Altitude counted relatively according to first waypoint is a second reason why an actual takeoff point should be near the first waypoint, and on the same terrain level.</p>
<p>UgCS Team recommends placing the first waypoint as close as possible to actual takeoff point and specifying a safe takeoff altitude (≈30m in most situations will be above any trees, see Figure 18). This is the only method that warrants safe takeoff for any mission. It also protects from any weird drone behaviour and unpredictable firmware updates, etc.</p>
<div id="attachment_73427" style="width: 997px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73427" class="size-full wp-image-73427" src="http://robohub.org/wp-content/uploads/2017/03/Fig18_take_off_near_survey_grid.png" alt="" width="987" height="398" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig18_take_off_near_survey_grid.png 987w, https://robohub.org/wp-content/uploads/2017/03/Fig18_take_off_near_survey_grid-425x171.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig18_take_off_near_survey_grid-768x310.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig18_take_off_near_survey_grid-500x202.png 500w" sizes="(max-width: 987px) 100vw, 987px" /><p id="caption-attachment-73427" class="wp-caption-text">Figure 18: Route with safe take-off</p></div>
<p><em>-Entry point to the survey grid</em></p>
<p>In the previous example, (see Figure 18), it can be noticed, that after adding the takeoff point, the route&#8217;s survey grid entry point was changed. This is because if additional waypoint is added subsequently to the photogrammetry area, UgCS will plan to fly the survey grid starting from nearest corner to the previous waypoint.</p>
<p>To change the entry point to survey grid, set additional waypoint close to the desired starting corner (see Figure 19).</p>
<div id="attachment_73428" style="width: 930px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73428" class="size-full wp-image-73428" src="http://robohub.org/wp-content/uploads/2017/03/Fig19_entry_point_to_survey_grid.png" alt="" width="920" height="409" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig19_entry_point_to_survey_grid.png 920w, https://robohub.org/wp-content/uploads/2017/03/Fig19_entry_point_to_survey_grid-425x189.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig19_entry_point_to_survey_grid-768x341.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig19_entry_point_to_survey_grid-500x222.png 500w" sizes="(max-width: 920px) 100vw, 920px" /><p id="caption-attachment-73428" class="wp-caption-text">Figure 19: Changing survey grid entry point by adding additional waypoint</p></div>
<p><em>-Landing point</em></p>
<p>If no landing point will be added outside the photogrammetry area after the survey mission, the drone will fly and hover in the last waypoint. There are two options for landing:</p>
<ol>
<li>Take manual control over the drone and fly to landing point manually,</li>
<li>Activate the Return Home command in UgCS or from Remote Controller (RC).</li>
</ol>
<p>In situations when the radio link with the drone is lost, for example if the survey area is large or there are problems with the remote controller, depending on the drone and it’s settings, one of these actions can occur:</p>
<ul>
<li>Drone will return to home location automatically if lost radio link with ground station,</li>
<li>Drone will fly to last waypoint of survey area and hover as long as battery capacity will enable that, then: drone will perform emergency landing, or it will try to fly to home location.</li>
</ul>
<p>The recommendation is to add an explicit landing points to the route in order to avoid relying on unpredictable drone behavior or settings.</p>
<p>If the drone doesn’t support automatic landing, or the pilot prefers to land manually, place the route’s last waypoint over the planned landing point with an altitude for comfortable manual drone descending and landing above any obstacles in the surrounding area. In general 30m is best choice.</p>
<p><em>-Action execution</em></p>
<p>Photogrammetry tool has a <i>magic</i> parameter “Action Execution” with three possible values:</p>
<ul class="txt">
<li>Every point</li>
<li>At start</li>
<li>Forward passes</li>
</ul>
<p>This parameter defines how and where camera actions specified for photogrammetry tool will be executed.</p>
<p>The most useful option for photogrammetry/survey missions is to set forward passes, the drone will make photos only on survey lines, but will not make excess photos on perpendicular lines.</p>
<p><em>-Complex survey areas</em></p>
<p>UgCS enables photogrammetry/survey mission planning for irregular areas, having functionality to combine any number of photogrammetry areas in one route, avoiding splitting the area in separate routes.</p>
<p>For example, if a mission has to be planned for two fields connected in a T-shape, and if these two fields are marked as one photogrammetry area, the whole route will not be optimal, regardless any direction of survey lines.</p>
<div id="attachment_73431" style="width: 782px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73431" class="size-full wp-image-73431" src="http://robohub.org/wp-content/uploads/2017/03/fig20.png" alt="" width="772" height="569" srcset="https://robohub.org/wp-content/uploads/2017/03/fig20.png 772w, https://robohub.org/wp-content/uploads/2017/03/fig20-425x313.png 425w, https://robohub.org/wp-content/uploads/2017/03/fig20-768x566.png 768w, https://robohub.org/wp-content/uploads/2017/03/fig20-407x300.png 407w" sizes="(max-width: 772px) 100vw, 772px" /><p id="caption-attachment-73431" class="wp-caption-text">Figure 20: Complex survey area before optimisation</p></div>
<p>If the survey area is marked as two photogrammetry areas within one route, survey lines for each area can be optimised individually (see Figure 21).</p>
<div id="attachment_73434" style="width: 736px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73434" class="size-full wp-image-73434" src="http://robohub.org/wp-content/uploads/2017/03/Fig21_complex_survey_area_combined.png" alt="" width="726" height="597" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig21_complex_survey_area_combined.png 726w, https://robohub.org/wp-content/uploads/2017/03/Fig21_complex_survey_area_combined-425x349.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig21_complex_survey_area_combined-365x300.png 365w" sizes="(max-width: 726px) 100vw, 726px" /><p id="caption-attachment-73434" class="wp-caption-text">Figure 21: Optimised survey flight passes for each part of a complex photogrammetry area</p></div>
<hr class="xh2  ">
<p><strong>Step three: deploy ground control points</strong></p>
<p>Ground control points are mandatory if the survey output map has to be precisely aligned to coordinates on Earth.</p>
<p>There are lots of discussions about the necessity of ground control points in cases when a drone is equipped with Real Time Kinematics (RTK) GPS receivers with centimeter-level accuracy. This is useful, but the drone coordinates are not in themselves sufficient because, for precise map aligning, image center coordinates are necessary.</p>
<p>Data processing softwares like Agisoft Photoscan, Dronedeplay, Pix4d, Icarus OneButton and others will produce very accurate maps using geotagged images, but the real precision of the map will not be known without ground control points.</p>
<p>Conclusion: ground control points have to be used to create survey-grade result. For a map with approximate precision, it is sufficient to rely just on RTK GPS and the capabilities of data processing software.</p>
<hr class="xh2  ">
<p><strong>Step four: fly your mission</strong></p>
<p>For carefully planned missions, flying it is the most straightforward step. Mission execution differs according to the type of UAV and equipment used, therefore it will not be described in detail in this article (please refer to equipment’s and UgCS documentation).</p>
<p>Important issues before flying:</p>
<ul>
<li>In most countries there are strict regulations for UAV usage. Always comply with the regulations! Usually these rules can be found on web-site of local aviation authority.</li>
<li>In some countries special permission for any kind of aerial photo/video shooting is needed. Please check local regulations.</li>
<li>In most cases missions are planned before arriving to flying location (e.g., in office, at home) using satellite imaginary from Google maps, Bing, etc. Before flying always check actual circumstances at the location. There could be a need to adjust take-off/landing points, for example, to avoid tall obstacles (e.g., trees, masts, power lines) in your survey area.</li>
</ul>
<hr class="xh2  ">
<p><strong>Step five: image geotagging</strong></p>
<p>Image geotagging is optional if ground control points were used, but almost any data processing software will require less time to process geotagged images.</p>
<p>Some of the latest and professional drones with integrated cameras can geotag images automatically during flight. In other cases images can be geotagged in UgCS after flight.</p>
<p>Very important: UgCS uses the telemetry log from drone, that is received via radio channel, to extract the drone’s altitude for any given moment (when pictures were taken). To geotag pictures using UgCS, assure robust telemetry reception during flight.</p>
<p>For detailed information how to geotag images using UgCS refer to UgCS User Manual.</p>
<hr class="xh2  ">
<p><strong>Step six: data processing</strong></p>
<p>For data processing, use third party software or services available on the market.</p>
<p>From UgCS Team experience, the most powerful and flexible software is Agisoft Photoscan (<a href="http://www.agisoft.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">http://www.agisoft.com/</a>), but sometimes too much user input is required to get necessary results. The most uncomplicated solution for users is online service Dronedeploy (<a href="https://www.dronedeploy.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://www.dronedeploy.com/</a>). All other software packages and services will fit somewhere between these two in terms of complexity and power.</p>
<hr class="xh2  ">
<p><strong>Step seven (optional): import created map to UgCS</strong></p>
<p>Should the need arise for the mission to be repeated in the future, UgCS enables importing the GeoTiff file as a map layer and using it for mission planning. More detailed instructions can be found in UgCS User Manual. See the result of an imported map created using UgCS photogrammetry tool imported as GeoTiff file in Figure 22.</p>
<div id="attachment_73436" style="width: 860px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-73436" class="size-full wp-image-73436" src="http://robohub.org/wp-content/uploads/2017/03/Fig22_UgCS_map_import.png" alt="" width="850" height="478" srcset="https://robohub.org/wp-content/uploads/2017/03/Fig22_UgCS_map_import.png 850w, https://robohub.org/wp-content/uploads/2017/03/Fig22_UgCS_map_import-425x239.png 425w, https://robohub.org/wp-content/uploads/2017/03/Fig22_UgCS_map_import-768x432.png 768w, https://robohub.org/wp-content/uploads/2017/03/Fig22_UgCS_map_import-500x281.png 500w" sizes="(max-width: 850px) 100vw, 850px" /><p id="caption-attachment-73436" class="wp-caption-text">Figure 22: Imported GeoTiff map as layer. The map is output of a Photogrammetry survey mission panned with UgCS</p></div>
<p>Visit the <a href="https://www.ugcs.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">UgCS homepage</a></p>
<p>Download this tutorial as a <a href="https://www.ugcs.com/files/photogrammetry_tool/UgCS-for_Land_surveying-with-photogrammetry.pdf" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">PDF</a></p>
<hr class="xh2  ">
<p><em>If you liked this tutorial, you may also enjoy these:</em></p>
<ul>
<li><a href="http://robohub.org/programming-for-robotics-introduction-to-ros/" target="_blank" data-wpel-link="internal">Programming for robotics: Introduction to ROS</a></li>
<li><a href="http://robohub.org/python-programming-your-nao-robot/" target="_blank" data-wpel-link="internal">Python programming your NAO robot</a></li>
<li><a href="http://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/" target="_blank" data-wpel-link="internal">Robotics, maths, python: A fledgling computer scientist’s guide to inverse kinematics</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal">Adjust how you learn and quickly pick up robotics programming</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal">3-D printing hydraulically-powered robots, no assembly required</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Programming for robotics: Introduction to ROS</title>
		<link>https://robohub.org/programming-for-robotics-introduction-to-ros/</link>
		
		<dc:creator><![CDATA[Péter Fankhauser]]></dc:creator>
		<pubDate>Tue, 07 Mar 2017 15:15:39 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[household]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/programming-for-robotics-introduction-to-ros/</guid>

					<description><![CDATA[This handy video-tutorial course gives an introduction to the Robot Operating System (ROS), including many of the available tools that are commonly used in robotics. With the help of different examples, the tutorials offer a great starting point to learn programming robots. You will learn how to create software including simulation, to interface sensors and actuators, [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-full wp-image-73310" src="http://robohub.org/wp-content/uploads/2017/03/bigstock-156822308.jpg" alt="" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2017/03/bigstock-156822308.jpg 900w, https://robohub.org/wp-content/uploads/2017/03/bigstock-156822308-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2017/03/bigstock-156822308-768x512.jpg 768w, https://robohub.org/wp-content/uploads/2017/03/bigstock-156822308-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" />
<p>This handy video-tutorial course gives an introduction to the Robot Operating System (ROS), including many of the available tools that are commonly used in robotics. With the help of different examples, the tutorials offer a great starting point to learn programming robots. You will learn how to create software including simulation, to interface sensors and actuators, and to integrate control algorithms.<span id="more-73240"></span></p>
<p>The course consists of a guided tutorial and exercises with increasing level of difficulty working with an autonomous robot. We provide recordings of the lectures and give an introduction to the exercises. From the course website, you can download all the material including exercise sheets and templates, and use the provided Virtual Machine (VM) image to start programming right away.</p>
<p><strong>Objectives:</strong></p>
<ul>
<li>ROS architecture: Master nodes, topics, messages, services, parameters and actions</li>
<li>Console commands: Navigating and analyzing the ROS system and the catkin workspace</li>
<li>Creating ROS packages: Structure, launch-files, and best practices</li>
<li>ROS C++ client library (roscpp): Creating your own ROS C++ programs</li>
<li>Simulating with ROS: Gazebo simulator, robot models (URDF) and simulation environments (SDF)</li>
<li>Working with visualizations (RViz) and user interface tools (rqt)</li>
<li>Inside ROS: TF transformation system, time, bags</li>
</ul>
<hr class="xh2  ">
<p><strong>Course 1:</strong></p>
<div class="keep-aspect"><iframe title="Programming for Robotics (ROS) Course 1" width="500" height="281" src="https://www.youtube-nocookie.com/embed/0BxVPCInS3M?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<p><strong>Course 2:</strong></p>
<div class="keep-aspect"><iframe title="Programming for Robotics (ROS) Course 2" width="500" height="281" src="https://www.youtube-nocookie.com/embed/jYqDnuxTwK8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<p><strong>Course 3:</strong></p>
<div class="keep-aspect"><iframe title="Programming for Robotics (ROS) Course 3" width="500" height="281" src="https://www.youtube-nocookie.com/embed/_GgHFuib_LU?start=6&#038;feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<p><strong>Course 4:</strong></p>
<div class="keep-aspect"><iframe title="Programming for Robotics (ROS) Course 4" width="500" height="281" src="https://www.youtube-nocookie.com/embed/feXC7aQrkeM?start=33&#038;feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Download the <a href="https://www.researchgate.net/publication/314101187_Programming_for_Robotics_-_Introduction_to_ROS" target="_blank" rel="noopener follow external noreferrer" data-wpel-link="external">full presentation here.</a></p>
<p>P. Fankhauser, D. Jud, M. Wermelinger, M. Hutter, “Programming for Robotics – Introduction to ROS”, ETH Zurich, 2017. DOI: 10.13140/RG.2.2.14140.44161<br />
<hr class="xh2  "></p>
<p><em>If you liked this tutorial, you may also enjoy these:</em></p>
<ul>
<li><a href="http://robohub.org/python-programming-your-nao-robot/" target="_blank" rel="noopener" data-wpel-link="internal">Python programming your NAO robot</a></li>
<li><a href="http://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/" target="_blank" data-wpel-link="internal" rel="noopener">Robotics, maths, python: A fledgling computer scientist’s guide to inverse kinematics</a></li>
<li><a href="http://robohub.org/sticky-business-five-adhesives-tested-for-3d-printing/" target="_blank" data-wpel-link="internal" rel="noopener">Sticky business: Five adhesives tested for 3D printing</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal" rel="noopener">Adjust how you learn and quickly pick up robotics programming</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal" rel="noopener">3-D printing hydraulically-powered robots, no assembly required</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal" rel="noopener">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Python programming your NAO robot</title>
		<link>https://robohub.org/python-programming-your-nao-robot/</link>
		
		<dc:creator><![CDATA[Philip English]]></dc:creator>
		<pubDate>Thu, 09 Feb 2017 12:05:44 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Aldebaran]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[NAO]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/python-programming-your-nao-robot/</guid>

					<description><![CDATA[These videos aim to teach you how to begin programming your NAO with Python. The NAO can be programmed using several programming languages, including C++, MATLAB, JAVA, LabVIEW and Python. Instead of using the drag and drop boxes in the Choreograph, we&#8217;re going to get our NAO robot walking and talking using coding. Tutorial 1: Speech [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="aligncenter size-full wp-image-71578" src="http://robohub.org/wp-content/uploads/2017/02/programmable-humanoid-nao-evolution-robot.jpg" alt="" width="900" height="707" srcset="https://robohub.org/wp-content/uploads/2017/02/programmable-humanoid-nao-evolution-robot.jpg 900w, https://robohub.org/wp-content/uploads/2017/02/programmable-humanoid-nao-evolution-robot-425x334.jpg 425w, https://robohub.org/wp-content/uploads/2017/02/programmable-humanoid-nao-evolution-robot-768x603.jpg 768w, https://robohub.org/wp-content/uploads/2017/02/programmable-humanoid-nao-evolution-robot-382x300.jpg 382w" sizes="(max-width: 900px) 100vw, 900px" />These videos aim to teach you how to begin programming your NAO with Python. The NAO can be programmed using several programming languages, including C++, MATLAB, JAVA, LabVIEW and Python. Instead of using the drag and drop boxes in the Choreograph, we&#8217;re going to get our NAO robot walking and talking using coding.</p>
<p><strong>Tutorial 1: Speech</strong></p>
<div class="keep-aspect"><iframe title="Python Programming your NAO Robot Tutorial Video 1" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Djzb8c41qbk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p><strong>Helpful hints:</strong></p>
<p>Follow these steps to create a box that we could put our python code into, and have our robot speak: <em>“Hello”. “Hello I am a robot”.</em></p>
<ol>
<li>Right click the main section box and go to “add new box”</li>
<li>Create a name for the box</li>
<li>Input main image</li>
<li>Select the type of box</li>
</ol>
<p>Now we&#8217;re having a look at the script. Go into the scripts and click ok. And there we have our NAO little box. If we click into it, we have the python code. What we are going to do is change some of the codes to get our robot to speak.</p>
<ol>
<li>Double click the box</li>
<li>Select the piece of code you need to alter to get our robot to speak(“def onInput_onStart(self)”)</li>
<li>Take out the pass section</li>
<li>Type in “ttsproxy = ALProxy(“ALTextToSpeech”)”. (Make sure you get the comment in there).</li>
<li>Underneath that, we are going to put “ttsproxy.say” and add the comment “Hello, I am a robot”.</li>
</ol>
<p>The first line could create an object that gives us access to the robot’s text to speech capabilities. This object is assigned to the variable ttsProxy. We can access the object later through the name ttsProxy. I am going to mount the top line, and the alspeech is there. The second line calls a different function site. This function takes an argument “Hello, I am a robot” and then he uses a string or sequence of characters between two double quoted marks. The robot will speak the string that will pass to the say message aloud.  There are your simple first steps into python and choreograph.</p>
<p>You can now, hopefully, get your NAO robot to talk by using your python programming skills. Now have a play with it’s behavior to see if you can get your NAO to say a longer sentence, or maybe even sing a song. Have a play, and use your imagination!</p>
<hr class="xh2  ">
<p><strong>Tutorial 2: Walking</strong></p>
<div class="keep-aspect"><iframe title="Python Programming Your NAO Robot Tutorial Video 2" width="500" height="281" src="https://www.youtube-nocookie.com/embed/ykss9i1hjgo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p><strong>Helpful hints:</strong></p>
<p>No we&#8217;re going get your robot to walk using Python. The NAO can be program to walk to any point using the in-build Python Programming Language instead of using the drag and drop boxes in the choregraphe. Python is more expressive and allows you to do things like computing trigonometric calculations on the robot.</p>
<ol>
<li>Right click the main section box and go to &#8220;add new box&#8221;</li>
<li>Create a name for the box</li>
<li>Input main image</li>
<li>Select the type of box</li>
</ol>
<p>First, we want our robot to stand up. Drag a stand up icon into the box. I am actually using the NAO key so the 3D robot in the robot view, and this because we need to put the robot on connecting so we can see what&#8217;s going on quite clearly. Oversee when you are using this on the real robot and never forget to trigger on the motors and connect everything up properly.</p>
<p>Open the Code Box</p>
<ol>
<li>Go to &#8220;def onInput_onStart(self):&#8221;</li>
<li>Write &#8220;motionProxy = ALProxy(&#8220;ALMotion&#8221;)&#8221;</li>
<li>On the next line write &#8220;walkTo(0.2,0.0,0.0)&#8221;</li>
<li>End it with &#8220;self.onStopped()&#8221;</li>
</ol>
<p>The first line is a proxy called ALmotion, which what is we created here, which allows us to call the motion functions up. The second line is the walkTo, which moves the robot to a specific distance. Now, look on the decimal places: see that .2 is X and Y and the radius, so he&#8217;s going to move .2 forward. Then if I start playing with the other numbers here, he&#8217;ll move to the Y radius and then to the other turning point as well. The final bit is the self.on. To stop this, we will call and tell the choregraphe to stop the procedure when it is at the end and just simple loop and loop and loop.</p>
<p>If we are good, we should see this now on the 3D NAO. So if I hit play, we can see it walking along. Well done guys, you can now get your NAO Robot to walk by using<br />
your Python programming skills. Tread carefully!</p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also enjoy these:</em></p>
<ul>
<li><a href="http://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/" target="_blank" data-wpel-link="internal">Robotics, maths, python: A fledgling computer scientist’s guide to inverse kinematics</a></li>
<li><a href="http://robohub.org/sticky-business-five-adhesives-tested-for-3d-printing/" target="_blank" data-wpel-link="internal">Sticky business: Five adhesives tested for 3D printing</a></li>
<li><a href="http://robohub.org/meet-robogabby-shes-on-a-mission-to-teach-more-girls-about-robotics/" target="_blank" data-wpel-link="internal">Meet RoboGabby: She’s on a mission to teach more girls about robotics</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal">Adjust how you learn and quickly pick up robotics programming</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal">3-D printing hydraulically-powered robots, no assembly required</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Robotics, maths, python: A fledgling computer scientist’s guide to inverse kinematics</title>
		<link>https://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/</link>
		
		<dc:creator><![CDATA[Alistair Wick]]></dc:creator>
		<pubDate>Fri, 13 Jan 2017 15:00:45 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[actuation]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[manipulation]]></category>
		<category><![CDATA[research]]></category>
		<guid isPermaLink="false">http://robohub.org/robotics-maths-python-a-fledgling-computer-scientists-guide-to-inverse-kinematics/</guid>

					<description><![CDATA[So – you’ve built a robot arm. Now you’ve got to figure out how to control the thing. This was the situation I found myself in a few months ago, during my Masters project, and it’s a problem common to any robotic application: you want to put the end (specifically, the “end effector”) of your [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://robohub.org/wp-content/uploads/2017/01/arm_illustration.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69533" src="http://robohub.org/wp-content/uploads/2017/01/arm_illustration.png" alt="arm_illustration" width="1280" height="751" srcset="https://robohub.org/wp-content/uploads/2017/01/arm_illustration.png 1280w, https://robohub.org/wp-content/uploads/2017/01/arm_illustration-425x249.png 425w, https://robohub.org/wp-content/uploads/2017/01/arm_illustration-1024x601.png 1024w, https://robohub.org/wp-content/uploads/2017/01/arm_illustration-500x293.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" /></a>So – you’ve built a robot arm. Now you’ve got to figure out how to control the thing. This was the situation I found myself in a few months ago, during my Masters project, and it’s a problem common to any robotic application: you want to put the end (specifically, the “end effector”) of your robot arm in a certain place, and to do that you have to figure out a valid pose for the arm which achieves that. This problem is called <a href="http://en.wikipedia.org/wiki/Inverse_kinematics" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">inverse kinematics</a> (IK), and it’s one of the key problems in robotics.<span id="more-69530"></span></p>
<hr class="xh2  ">
<p><strong>The Arm</strong></p>
<p>The design I used is based on industrial pallet-packing robots, and at its core has three degrees of freedom, or ‘axes’ on which it can move. Think left to right, in and out and up and down; it basically means that the arm can move in three different ways. The GIFs below show the different types of movement: the entire arm can swivel on its base, the “main arm” translates the elbow in and out from the centre, and the “actuator” drives the forearm, which in turn translates the end-effector up and down. A 3-DOF arm like this has the handy property of having a unique solution for each possible position of its end-effector, which made the IK task approachable to someone like me, who’s never done this type of thing before.</p>
<div id="attachment_69535" style="width: 339px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-69535" class="size-full wp-image-69535" src="http://robohub.org/wp-content/uploads/2017/01/swing.gif" alt="Swing" width="329" height="240" /><p id="caption-attachment-69535" class="wp-caption-text">Swing</p></div>
<p>&nbsp;</p>
<div id="attachment_69534" style="width: 330px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-69534" class="size-full wp-image-69534" src="http://robohub.org/wp-content/uploads/2017/01/main.gif" alt="Main" width="320" height="240" /><p id="caption-attachment-69534" class="wp-caption-text">Main</p></div>
<p>&nbsp;</p>
<div id="attachment_69532" style="width: 292px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-69532" class="size-full wp-image-69532" src="http://robohub.org/wp-content/uploads/2017/01/actuator.gif" alt="Actuator" width="282" height="240" /><p id="caption-attachment-69532" class="wp-caption-text">Actuator</p></div>
<p>&nbsp;</p>
<p>Like many well-studied problems, IK has generic solutions, but these are numerically-based and computationally complex. I wanted a simple and efficient solution, so I decided to approach the control of my arm <em>analytically</em>, using geometric principals and logic. The result of this work was a graphical Python application, which connected to the arm via serial and allowed the user to move the goal position of the end-effector by clicking and dragging, or by sending commands from another application running on the same computer (this IK application made up a key part of my project, but <a href="https://www.youtube.com/watch?v=iBWBPbonj-Q" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">that’s a topic for another time</a>).</p>
<p>Here’s a quick look at what I ended up with:</p>
<img decoding="async" class="alignnone" src="http://www.alistairwick.com/assets/images/robot/ik.gif" alt="" width="862" height="540" />
<p><em>Heads up</em>: The code in this post is written in <a href="https://www.python.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Python</a> with <a href="http://www.numpy.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Numpy</a>, and there’s maths. I won’t pretend that any of the ideas presented here are optimal (or good, for that matter), but hopefully you’ll be able to scrounge something useful!</p>
<hr class="xh2  ">
<p><strong>Let&#8217;s go already</strong></p>
<p>To start with, let’s consider the “swing” action of the arm, as it rotates on its base. Since the main arm, elbow and forearm are all constrained to a single plane (look at the GIFs above: only the swing rotation affects the left-right position of the wrist), all we really have to do here is line up that plane – a line from our top-down perspective – with the goal point, ignoring the goal’s vertical position. If this sounds easy, you’re right: it’s plain old trigonometry. Unfortunately for me, a quirk of my design left the arm’s operation plane just off-centre of the axis of rotation, which made the solution much less obvious.</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/top_ik.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69539" src="http://robohub.org/wp-content/uploads/2017/01/top_ik.png" alt="top_ik" width="1280" height="800" srcset="https://robohub.org/wp-content/uploads/2017/01/top_ik.png 1280w, https://robohub.org/wp-content/uploads/2017/01/top_ik-425x266.png 425w, https://robohub.org/wp-content/uploads/2017/01/top_ik-1024x640.png 1024w, https://robohub.org/wp-content/uploads/2017/01/top_ik-480x300.png 480w" sizes="(max-width: 1280px) 100vw, 1280px" /></a>
<p>Using the naive trigonometric approach here results in pointing off to the left of the actual goal (right if the shoulder sits on the other side), and the gap is big enough that this is a real problem. I took a shot at solving this geometrically, but quickly decided it wasn’t worth my time figuring it out. In the end, I resorted to an extremely simple numerical technique called a binary search. I’ve used this in the past for other tough geometric problems, like finding an intersection between a Bezier curve and a circle.</p>
<p>In a binary search (also known as the <a href="https://en.wikipedia.org/wiki/Bisection_method" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">“Bisection Method”</a>), you essentially come up with arbitrary upper and lower bounds for your variable – in this case, theta – and then examine the midpoint to find whether it’s larger or smaller than your target. If it’s larger, then the midpoint becomes your new upper bound; if it’s smaller, the midpoint is your new lower bound. Repeat until you’ve bounded your variable with sufficient accuracy. A binary search is conceptually simple and computationally cheap, and converges fairly quickly: you halve your search space each iteration. I found 3-5 iterations got me within 0.3 degrees of the true value, well within the limits of what my servo motors could practically target.</p>
<p>On to the solution! What we’re actually searching for is the point at which the vector representing our arm is lined up with the vector from the arm’s shoulder joint to the goal: where the angle between these two vectors is zero. Normally, when taking the angle between two vectors (call them <em>A</em> and <em>B</em>) you get the <em>absolute</em> angle out, with no directionality. However, with this search method it’s important to have a signed distinction between “too high” and “too low”. To get around this, I wrote a simple function to find a <em>signed</em> angle between two vectors, with negative showing that <em>A</em> points counter-clockwise to <em>B</em>, and positive showing that <em>A</em> points clockwise from <em>B</em>:</p>
<p><a href="http://robohub.org/wp-content/uploads/2017/01/code1.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69541" src="http://robohub.org/wp-content/uploads/2017/01/code1.jpg" alt="code1" width="716" height="354" srcset="https://robohub.org/wp-content/uploads/2017/01/code1.jpg 716w, https://robohub.org/wp-content/uploads/2017/01/code1-425x210.jpg 425w, https://robohub.org/wp-content/uploads/2017/01/code1-500x247.jpg 500w" sizes="(max-width: 716px) 100vw, 716px" /></a>This works by taking a perpendicular vector from <em>B</em> (pointing clockwise), and <a href="https://en.wikipedia.org/wiki/Dot_product" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">dot</a>-ing it with <em>A</em> to see how much they line up (using the dot product for<br />
<a href="https://en.wikipedia.org/wiki/Vector_projection" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">vector projection</a>).</p>
<p>If <em>A</em> points clockwise of <em>B</em> then <em>np.dot(A, perp) will be positive, and vice-versa.<br />
</em></p>
<p>Note that the <em>normalize() </em>function simply sets a vector’s length to 1, while keeping it pointed in the same direction. Mathematically, it’s just doing: <em>A=|A|<sup>-1 </sup></em>(<em>np.clip()</em> just keeps the dot product between 1 and -1).</p>
<p>With that, we can now perform our binary search and find a decent approximation to the target angle. We need a reasonable starting point, so let’s just use the angle from the origin to the goal (the naive approach I mentioned above). Numpy provides a very useful function for finding the angle <em>np.arctan2(y, x)</em> which resolves the arc-tangent of <a href="https://en.wikipedia.org/wiki/Atan2" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">in the correct quadrant</a>.</p>
<p>Now, it’s important to check which side the shoulder sits on: this lets us decide whether to use <em>start_theta</em><code class="highlighter-rouge"> </code>as an upper or lower bound. This is as simple as testing the signed angle between the shoulder offset vector (from the origin) and a vector pointing straight forwards. At the same time, we can also establish the other bound by taking the absolute value of this angle and adding or subtracting it from <em>start_theta,</em> since this angle to the shoulder is always going to be greater than the error of <em>start_theta</em>.</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/code2.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69542" src="http://robohub.org/wp-content/uploads/2017/01/code2.jpg" alt="code2" width="714" height="206" srcset="https://robohub.org/wp-content/uploads/2017/01/code2.jpg 714w, https://robohub.org/wp-content/uploads/2017/01/code2-425x123.jpg 425w, https://robohub.org/wp-content/uploads/2017/01/code2-500x144.jpg 500w" sizes="(max-width: 714px) 100vw, 714px" /></a>
<p>With our initial bounds established, the actual search loop is pretty straightforward. Note the use of an iteration counter: it’s only there in case something goes wrong (e.g. if we input an unsolvable configuration), since in normal operation the loop exits once the desired accuracy is reached. We iteratively update <em>self.swing, </em>which will hold the new target swing angle at the end of the search.</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/code3.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69543" src="http://robohub.org/wp-content/uploads/2017/01/code3.jpg" alt="code3" width="708" height="430" srcset="https://robohub.org/wp-content/uploads/2017/01/code3.jpg 708w, https://robohub.org/wp-content/uploads/2017/01/code3-425x258.jpg 425w, https://robohub.org/wp-content/uploads/2017/01/code3-494x300.jpg 494w" sizes="(max-width: 708px) 100vw, 708px" /></a>
<p>Note that the <em>self.shoulder(angle)</em> function just generates the top-down (x, z) position of the shoulder joint for a given swing angle. Besides the swing angle, there’s one other important result from this stage of IK: the radial distance, from the shoulder joint to the end-effector. The calculation is simple enough:</p>
<p><em>goal_radial = np.linalg.norm(self.goaltd &#8211; self.shoulder(self.swing))</em></p>
<hr class="xh2  ">
<p><strong>Round in circles</strong></p>
<p>We know which way to point: now, let’s consider the movement of the arm in its ‘plane of operation’, which covers the goal end-effector position and the line extending vertically (+y) from the shoulder joint. The main arm and forearm both move across this plane. The trick here is that we’ll still be using a 2D coordinate system, basically a local frame of reference, where our y value remains the same but the x value is the radial distance of the point we’re interested in. For the goal, we computed this radial distance above in the top-down IK, so we can go ahead and construct <em>goalpl</em> – the ‘planar’ goal – which lies at: <em>goalpl</em>=(goal_radial/goal<sub>y</sub>).</p>
<p>Side-on, the main arm and forearm form an upright triangle between the shoulder joint and <em>goalpl </em>with the elbow joint sitting at the peak. It’s important to note that the arm’s sections are different lengths, with the forearm being a bit longer. Now, in this plane we’re solving given the end effector’s position, and the origin is static. That just leaves the position of the elbow joint to solve for, which we can do geometrically, since it’s at a fixed distance from both the origin and effector. If we draw two circles, one fixed about the origin with radius = main arm length, and one centred on the end-effector with radius = forearm length, then the elbow must be at one of the two possible intersections between these circles:</p>
<p><a href="http://robohub.org/wp-content/uploads/2017/01/side_ik.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69544" src="http://robohub.org/wp-content/uploads/2017/01/side_ik.png" alt="side_ik" width="1280" height="800" srcset="https://robohub.org/wp-content/uploads/2017/01/side_ik.png 1280w, https://robohub.org/wp-content/uploads/2017/01/side_ik-425x266.png 425w, https://robohub.org/wp-content/uploads/2017/01/side_ik-1024x640.png 1024w, https://robohub.org/wp-content/uploads/2017/01/side_ik-480x300.png 480w" sizes="(max-width: 1280px) 100vw, 1280px" /></a>Let’s look at a simple Python class which deals with this intersection calculation. There’s a few possible cases for circle-circle intersection, most of which invalidate our solver: if the circles do not contact, either by being separated or in the case that one contains another, then there is no valid solution; if the circles are coincident (impossible for this design, since the radii differ) then there are infinite possible solutions; however, when the circle borders <em>intersect</em>, we can find two distinct intersection points.</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/code4.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69545" src="http://robohub.org/wp-content/uploads/2017/01/code4.jpg" alt="code4" width="708" height="740" srcset="https://robohub.org/wp-content/uploads/2017/01/code4.jpg 708w, https://robohub.org/wp-content/uploads/2017/01/code4-407x425.jpg 407w, https://robohub.org/wp-content/uploads/2017/01/code4-287x300.jpg 287w, https://robohub.org/wp-content/uploads/2017/01/code4-32x32.jpg 32w" sizes="(max-width: 708px) 100vw, 708px" /></a>
<p>For any case we’re interested in, it’s the top intersection that matters. This means we can just pick the one with the largest <em>y</em> value, and call it a day:</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/code5.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69546" src="http://robohub.org/wp-content/uploads/2017/01/code5.jpg" alt="code5" width="716" height="320" srcset="https://robohub.org/wp-content/uploads/2017/01/code5.jpg 716w, https://robohub.org/wp-content/uploads/2017/01/code5-425x190.jpg 425w, https://robohub.org/wp-content/uploads/2017/01/code5-500x223.jpg 500w" sizes="(max-width: 716px) 100vw, 716px" /></a>
<p>And – that’s it! We have the swing angle, and a valid position for the elbow joint to match the shoulder and goal end-effector positions. That’s all we need to define a valid pose for the arm. If you need to, you can reconstruct the positions in 3D space:</p>
<a href="http://robohub.org/wp-content/uploads/2017/01/code6.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-69547" src="http://robohub.org/wp-content/uploads/2017/01/code6.jpg" alt="code6" width="718" height="306" srcset="https://robohub.org/wp-content/uploads/2017/01/code6.jpg 718w, https://robohub.org/wp-content/uploads/2017/01/code6-425x181.jpg 425w, https://robohub.org/wp-content/uploads/2017/01/code6-500x213.jpg 500w" sizes="(max-width: 718px) 100vw, 718px" /></a>
<p><strong>Wrapping up</strong></p>
<p>If you’ve made it this far, I hope you’ve found this interesting and/or enlightening. Want to see how it all fits together? I’ll be uploading the full IK application to GitHub <a href="https://github.com/AliShug/EvoArm" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">here</a>, along with all the design files for the robotic arm. If you’re feeling ambitious, you should be able to 3D-print and build your own to play around with <img decoding="async" class="emoji" draggable="false" src="https://s.w.org/images/core/emoji/72x72/1f916.png" alt="?" /></p>
<p>Other notes:</p>
<ul>
<li>I didn’t design the arm completely from scratch: check out the original “LiteArm” design <a href="http://www.thingiverse.com/thing:480446" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">on Thingiverse</a>.</li>
<li>The IK application uses <a href="http://pygame.org/hifi.html" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">PyGame</a>, a no-frills SDL wrapper for Python, to open and draw to the graphical window. I’ll probably switch to a meatier library for further development, but this did the job of basic “drawn-to-screen” stuff nicely.</li>
</ul>
<p><em>Written by <a href="http://www.alistairwick.com/about" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Alistair Wick</a> for the University of Bristol <a href="http://engmaths.org" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Engineering Maths blog</a>.</em> The original post, and future follow-ups, are available <a href="http://www.alistairwick.com/posts/ik-for-dummies" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">on Alistair’s website.</a></p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also enjoy these:</em></p>
<ul>
<li><a href="http://robohub.org/trotbot-tackles-rough-terrain/" target="_blank" data-wpel-link="internal">TrotBot tackles rough terrain</a></li>
<li><a href="http://robohub.org/sticky-business-five-adhesives-tested-for-3d-printing/" target="_blank" data-wpel-link="internal">Sticky business: Five adhesives tested for 3D printing</a></li>
<li><a href="http://robohub.org/meet-robogabby-shes-on-a-mission-to-teach-more-girls-about-robotics/" target="_blank" data-wpel-link="internal">Meet RoboGabby: She’s on a mission to teach more girls about robotics</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal">Adjust how you learn and quickly pick up robotics programming</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal">3-D printing hydraulically-powered robots, no assembly required</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TrotBot tackles rough terrain</title>
		<link>https://robohub.org/trotbot-tackles-rough-terrain/</link>
		
		<dc:creator><![CDATA[Ben Vagle]]></dc:creator>
		<pubDate>Thu, 17 Nov 2016 15:00:30 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[research]]></category>
		<guid isPermaLink="false">http://robohub.org/trotbot-tackles-rough-terrain/</guid>

					<description><![CDATA[Hi, I&#8217;m Ben. I was a member of the team that developed a new walking mechanism, TrotBot, that we eventually scaled up to the size of a mini-van. We were inspired to begin this project in 2012 when we discovered Theo Jansen’s Strandbeest. This led us to embark on a LEGO building spree, attempting various [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class="keep-aspect"><iframe title="Walkers in the Desert" width="500" height="281" src="https://www.youtube-nocookie.com/embed/gg5z7AImwnc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Hi, I&#8217;m Ben. I was a member of the team that developed a new walking mechanism, TrotBot, that we eventually scaled up to the size of a mini-van. We were inspired to begin this project in 2012 when we discovered <a href="http://www.strandbeest.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Theo Jansen’s Strandbeest</a>. This led us to embark on a LEGO building spree, attempting various existing walking mechanisms.  However, they performed poorly on rough terrain, so we decided to design our own. We wanted our design to have lifelike motion and to be functional on rough terrain. After a couple months we had designs and LEGO iterations of TrotBot, a walking mechanism with the gait of a galloping horse, and a very high footstep to tackle obstacles. Below is a simulation of the linkage we discovered compared to Strandbeest and<a href="http://www.mechanicalspider.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer"> Klann&#8217;s Mechanical Spider.</a></p>
<div class="keep-aspect"><iframe title="Simulation of Strandbeest, Klann, and TrotBot Linkages" width="500" height="281" src="https://www.youtube-nocookie.com/embed/3AOuYNQLfEw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>After tinkering with our new linkage in LEGO, it wasn’t long before we, somewhat naively, decided to scale it up to the size of a minivan. This turned out to be a more difficult challenge than we originally anticipated, like asking a bridge company to build a bridge, but with moving supports that occasionally lift off the ground. Despite a rat’s-nest of problems to solve, we finally managed to get this machine walking after<em> two summers</em> of hard work. Below is a clip of TrotBot 1.0.</p>
<div class="keep-aspect"><iframe title="TrotBot Walking Test" width="500" height="281" src="https://www.youtube-nocookie.com/embed/0QJjtfX0-OQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>I scaled back down to LEGO scale, using the insights gained from the scale-up, and the functionality of my builds improved enough that I decided to post the mechanism and build plans. For an example of how TrotBot&#8217;s high foot-path improved its functionality, below you can see a LEGO TrotBot tackling an obstacle course.</p>
<div class="keep-aspect"><iframe title="TrotBot LEGO Walker" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Ndys0xC4F-k?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>I&#8217;ve posted detailed plans on how I built TrotBot in LEGO, some of the engineering insights behind the design, as well as some of what we learned throughout the process of creating TrotBot at <a href="http://www.diywalkers.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">DIY Walkers</a>, where I will continue to post my progress with future builds.  If you have insights into TrotBot or walker projects you&#8217;d like to share, or if you are a teacher hoping to motivate your students to take on a hard STEM challenge, please visit the site and get in touch!</p>
<hr class="xh2  ">
<p><em>If you enjoyed this article, you may also want to read:</em></p>
<ul>
<li><a href="http://robohub.org/work-play-and-stem-how-robotics-will-bridge-the-gap/" target="_blank" data-wpel-link="internal">Work, play and STEM: How robotics will bridge the gap</a></li>
<li><a href="http://robohub.org/meet-robogabby-shes-on-a-mission-to-teach-more-girls-about-robotics/" target="_blank" data-wpel-link="internal">Meet RoboGabby: She&#8217;s on a mission to teach more girls about robotics</a></li>
<li><a href="http://robohub.org/motivational-posters-with-a-clever-robotics-twist/" target="_blank" data-wpel-link="internal">Motivational posters with a clever robotics twist</a></li>
<li><a href="http://robohub.org/teaching-the-teachers-study-focuses-on-how-teachers-perceive-educational-robots-in-classrooms/" target="_blank" data-wpel-link="internal">Teaching the teachers: Study focuses on how teachers perceive educational robots in classrooms</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal">Adjust how you learn and quickly pick up robotics programming</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1475766714274000&amp;usg=AFQjCNHafEhZ01BRc_lgxNv09QuVk9kH4g" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1475766714274000&amp;usg=AFQjCNG4KDv-Gf8hm31k5VRvfhgCuhkOpA" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Sticky business: Five adhesives tested for 3D printing</title>
		<link>https://robohub.org/sticky-business-five-adhesives-tested-for-3d-printing/</link>
		
		<dc:creator><![CDATA[George Fomitchev]]></dc:creator>
		<pubDate>Fri, 28 Oct 2016 10:00:45 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[3D printing]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://robohub.org/sticky-business-five-adhesives-tested-for-3d-printing/</guid>

					<description><![CDATA[We compared five adhesives for 3D printing applications on a Wanhao Duplicator i3. We’ll print a PLA (polylactide) cube, 1х1х1 cm in size. 1.  NELLY LACQUER: We spread it on the clean surface of the table and turn on the Print Mode. The printed model is very well stuck—a pallet-knife is needed to separate it from [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.youtube.com/watch?v=ipPzi9J-M9w" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.youtube.com/watch?v=ipPzi9J-M9w</a></p>
<p>We compared five adhesives for 3D printing applications on a <a href="http://wanhaousa.com/products/duplicator-i3-steel-frame" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Wanhao Duplicator i3</a>. We’ll print a PLA (<a href="http://www.protoparadigm.com/news-updates/the-difference-between-abs-and-pla-for-3d-printing/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">polylactide</a>) cube, 1х1х1 cm in size.</p>
<p><strong><em>1.  NELLY LACQUER</em></strong>: We spread it on the clean surface of the table and turn on the Print Mode. The printed model is very well stuck—a pallet-knife is needed to separate it from the surface of the table. The adhesion result is very good.</p>
<p><em><strong>2.  THE 3D GLUE:</strong></em> We apply it to the table with a cloth, wait for the table to warm up, then start printing. The result is similar to Nelly lacquer. We can’t separate the printed model from the table without any tools. The bottom of the cube is smooth.</p>
<p><em><strong>3.  PVA GLUE:</strong></em> We spread a small quantity on the table and let it dry before printing. It is not easy to tear the model from the table. The bottom surface of the cube is rather rough and has PVA glue stains.</p>
<p><em><strong>4.  GLUE STICK:</strong></em> We try to apply a thin layer of it to the hot platform but, because the adhesive is very thick, we can&#8217;t do it using a microfiber cloth. To separate the cube from the platform we use a pallet-knife. The bottom surface of the model and the platform surface have white glue stains. Now we need to clean the table and apply an adhesive anew.</p>
<p><em><strong>5.  STICKY TAPE (an analogue of a blue Scotch):</strong></em> Finally, we paste one layer of it to the table, carefully smoothing it out to avoid blistering. This adhesive is no good for big ABS models as they tend to break away from the table along with the tape.</p>
<p>We try to accurately separate the cube from the table to prevent the tape from peeling off, but part of the tape stuck too well to the cube and came off the table along with the model. Now we’ll have a naked spot (without the tape layer) on the table when we print next time.</p>
<p><em><strong>Conclusions</strong></em></p>
<ul>
<li>The lacquer and 3D glue give the best results; the bottom surface of the printed models is clean and smooth, without any traces of adhesives.</li>
<li>The glue stick stains the models.</li>
<li>The Scotch tape tends to stick to the model and comes off from the table partially or fully.</li>
<li>For ABS printing we recommend using a closed 3D printer and a strong adhesive, like NELLY.</li>
</ul>
<hr class="xh2  ">
<p><em>If you liked this article, you may also want to read these other articles on 3D printing:</em></p>
<ul>
<li><a href="http://robohub.org/foundry-tool-multi-material-designing-for-3-d-printing/" target="_blank" data-wpel-link="internal">Foundry tool: Multi-material designing for 3-D printing</a></li>
<li><a href="http://robohub.org/3-d-printing-hydraulically-powered-robots-no-assembly-required/" target="_blank" data-wpel-link="internal">3-D printing hydraulically-powered robots, no assembly required</a></li>
<li><a href="http://robohub.org/ai-deep-learning-and-3d-printing-produce-the-next-rembrandt/" target="_blank" data-wpel-link="internal">AI, deep learning and 3D printing produce ‘The Next Rembrandt’</a></li>
<li><a href="http://robohub.org/rising-media-acquires-robouniverse-and-inside-3d-printing-shows/" target="_blank" data-wpel-link="internal">Rising Media acquires RoboUniverse and Inside 3D Printing shows</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNFmCoRAKHuz2BWNf-njm6KSkgAacA" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1477500783522000&amp;usg=AFQjCNGjDpzB3aAol7pCzSfh7VU9iN6oQQ" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Meet RoboGabby: She&#8217;s on a mission to teach more girls about robotics</title>
		<link>https://robohub.org/meet-robogabby-shes-on-a-mission-to-teach-more-girls-about-robotics/</link>
		
		<dc:creator><![CDATA[Kassie Perlongo]]></dc:creator>
		<pubDate>Fri, 14 Oct 2016 12:02:47 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[STEM]]></category>
		<guid isPermaLink="false">http://robohub.org/meet-robogabby-shes-on-a-mission-to-teach-more-girls-about-robotics/</guid>

					<description><![CDATA[Gabby has five goals to achieve this school year. The first goal sounds like any other young middle schooler: get straight As in her classes. Goal number two: get accepted into her school&#8217;s robotics team, followed closely by number three: to own her first VEX IQ Robotics kit. That&#8217;s when you may realize, Gabby is [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_66755" style="width: 1034px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/10/robogabby1.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-66755" class="size-large wp-image-66755" src="http://robohub.org/wp-content/uploads/2016/10/robogabby1-1024x529.jpg" alt="Source: RoboGabby/YouTube" width="1024" height="529" srcset="https://robohub.org/wp-content/uploads/2016/10/robogabby1-1024x529.jpg 1024w, https://robohub.org/wp-content/uploads/2016/10/robogabby1-425x220.jpg 425w, https://robohub.org/wp-content/uploads/2016/10/robogabby1-500x258.jpg 500w, https://robohub.org/wp-content/uploads/2016/10/robogabby1.jpg 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-66755" class="wp-caption-text">Source: RoboGabby/YouTube</p></div>
<p>Gabby has five goals to achieve this school year. The first goal sounds like any other young middle schooler: get straight As in her classes. Goal number two: get accepted into her school&#8217;s robotics team, followed closely by number three: to own her first VEX IQ Robotics kit. That&#8217;s when you may realize, Gabby is an extraordinary middle schooler!<span id="more-66753"></span></p>
<p>Gabby, or &#8220;RoboGabby,&#8221; is a budding science communicator and roboticist, aspiring to be a role model and STEM ambassador. She began creating tutorial videos to encourage girls to give robotics a try, born from her own experience witnessing the lack of girls involved with STEM at her school, and specifically after an all-girls robotics camp was cancelled due to lack of sign-ups.</p>
<p><span class="m_4763119650253838380gmail-m_1297403173793048290gmail-s1">“My dad found other robotics camps for me to attend, but there were only about 4 girls who participated, in total, of all the camps I attended &#8212; including myself,&#8221; she said. &#8220;I constantly asked my parents &#8216;why aren&#8217;t more girls involved in STEM? My dad suggested that I try to inspire other girls to get involved. </span>I was very nervous when I first started and scared that people would not like my videos. But everyone online and at my school seems to love my videos,&#8221; she said.</p>
<div class="keep-aspect"><iframe title="ROBOTC Basics - Point And Swing Turns For VEX IQ With RoboGabby" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Pv7-Ugt0Qnc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Gabby was introduced to programming and robotics by her dad at the age of 8 and enjoyed being able to &#8220;explore what a robot can do through code.&#8221; She loves working with her hands, having now been to several computer and technology camps, as well as, three robotics camps.</p>
<p>“I started out learning the Python programming language, and I did not quite understand why he was making me learn it.&#8221; she said. &#8220;Eventually, I started doing fun things with code and began to like it. From 8 to 10 years old, I learned how to program in Python, a little bit of Java, and learned block programming with Scratch. When I was 10 years old, I purchased my first robotic arm using my own Christmas money.&#8221;</p>
<p><span class="m_4763119650253838380gmail-m_1297403173793048290gmail-s1">&#8220;I now c</span><span class="m_4763119650253838380gmail-m_1297403173793048290gmail-s2">onsider myself a role model, because I am getting recognition from girls and boys all the time,&#8221; she said. &#8220;I </span><span class="m_4763119650253838380gmail-m_1297403173793048290gmail-s2">am still making tutorial videos with Robot Virtual Worlds, by Robomatter, and I’m working on making tutorial videos for another robot simulation software called CoderZ. I also plan on making Java programming tutorial videos in the future.&#8221;</span></p>
<div class="keep-aspect"><iframe title="ROBOTC Color Sensor and Line Tracking for VexIQ with RoboGabby" width="500" height="281" src="https://www.youtube-nocookie.com/embed/RBoNDT4B-zU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>&#8220;I still do not have an actual physical robot, but I’m hoping to get a Vex Programming or Dual Control Starter Kit some day and start making tutorial videos with that, as well. I’ve discovered that being different was something cool, rather than something to be embarrassed about,&#8221; she said.</p>
<p>From all of us here at Robohub, we look forward to seeing more of your creative tutorials Gabby! Keep creating!</p>
<p>You can follow RoboGabby&#8217;s tutorials on her <a href="https://www.youtube.com/channel/UCgdh5S7Tclq6_BIGI2jc66A" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">YouTube</a> channel, or on any of her social media channels, like <a href="https://twitter.com/RoboGabby" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Twitter</a> or <a href="https://www.facebook.com/RoboGabby/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Facebook</a> or <a href="https://www.instagram.com/robogabby/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Instagram</a>.</p>
<hr class="xh2  ">
<p><em>If you enjoyed this article, you may also want to read:</em></p>
<ul>
<li><a href="http://robohub.org/work-play-and-stem-how-robotics-will-bridge-the-gap/" target="_blank" data-wpel-link="internal">Work, play and STEM: How robotics will bridge the gap</a></li>
<li><a href="http://robohub.org/25-women-in-robotics-you-need-to-know-about-2016/" target="_blank" data-wpel-link="internal">25 women in robotics you need to know about – 2016</a></li>
<li><a href="http://robohub.org/motivational-posters-with-a-clever-robotics-twist/" target="_blank" data-wpel-link="internal">Motivational posters with a clever robotics twist</a></li>
<li><a href="http://robohub.org/teaching-the-teachers-study-focuses-on-how-teachers-perceive-educational-robots-in-classrooms/" target="_blank" data-wpel-link="internal">Teaching the teachers: Study focuses on how teachers perceive educational robots in classrooms</a></li>
<li><a href="http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/" target="_blank" data-wpel-link="internal">Adjust how you learn and quickly pick up robotics programming</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1475766714274000&amp;usg=AFQjCNHafEhZ01BRc_lgxNv09QuVk9kH4g" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1475766714274000&amp;usg=AFQjCNG4KDv-Gf8hm31k5VRvfhgCuhkOpA" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Adjust how you learn and quickly pick up robotics programming</title>
		<link>https://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/</link>
		
		<dc:creator><![CDATA[Ricardo Téllez]]></dc:creator>
		<pubDate>Thu, 06 Oct 2016 09:30:14 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[The Construct]]></category>
		<guid isPermaLink="false">http://robohub.org/adjust-how-you-learn-and-quickly-pick-up-robotics-programming/</guid>

					<description><![CDATA[&#160; The Biggest Obstacle Preventing Robotics Going Mainstream Is Not Having Good Programmers Able To Program Robots Brian Gerkey, CEO of the Open Source Robotics Foundation &#160; Want to be up to speed on robotics programming? Want to learn the latest robotics programming standards in 5 days? Want to avoid all that tedious documentation&#160;in order]]></description>
										<content:encoded><![CDATA[<div id="attachment_66616" style="width: 1034px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/09/IMG_1384-1-1024x684.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-66616" class="size-large wp-image-66616" src="http://robohub.org/wp-content/uploads/2016/09/IMG_1384-1-1024x684-1024x684.jpg" alt="Credit: Ricardo Tellez" width="1024" height="684" srcset="https://robohub.org/wp-content/uploads/2016/09/IMG_1384-1-1024x684.jpg 1024w, https://robohub.org/wp-content/uploads/2016/09/IMG_1384-1-1024x684-425x284.jpg 425w, https://robohub.org/wp-content/uploads/2016/09/IMG_1384-1-1024x684-449x300.jpg 449w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-66616" class="wp-caption-text">Credit: Ricardo Tellez</p></div>
<p>&#8220;The biggest obstacle preventing robotics going mainstream is not having good programmers able to program robots,&#8221; Brian Gerkey, CEO of the <a href="http://www.osrfoundation.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Open Source Robotics Foundation</a>.</p>
<h2 class="p1">Learning to program robots is difficult.</h2>
<p class="p1">I mean, real robots.</p>
<p class="p1">I am not talking about learning to program Lego and the like. I’m talking about making a <a href="https://www.youtube.com/watch?v=hkbUIatgfBM" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Reem robot</a> move around a shopping mall helping people to carry their bags. Or a <a href="https://www.youtube.com/watch?v=CEIUrF7iOXk" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Fetch robot</a> cooperate on a warehouse with humans helping them to fetch the packages.</p>
<div class="keep-aspect"><iframe title="Fetch Automates Your Warehouse With Robots" width="500" height="281" src="https://www.youtube-nocookie.com/embed/CEIUrF7iOXk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p class="p1">Yes, programming of these robots is difficult.</p>
<p class="p1">In order to simplify the programming of those robots, frameworks have been created:</p>
<ol>
<li class="p1"><a href="http://www.ros.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">ROS</a></li>
<li class="p1"><a href="http://www.orocos.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">OROCOS</a></li>
<li class="p1"><a href="http://www.yarp.it/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">YARP</a></li>
<li class="p1"><a href="http://www.gostai.com/products/urbi/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">URBI</a></li>
<li class="p1">etc…</li>
</ol>
<p class="p1">Those are the real thing. They are frameworks that are installed in real robots and used to make them work. I’m not talking about using Matlab for programming your algorithm in a robot. Matlab is not used in real life, only in academia for non-replicable results. Here we are talking about the real thing.</p>
<p class="p1">But don’t be get me wrong. Even if those frameworks are quite complex, anybody can learn to program robots. The question is: how long does it take?</p>
<p class="p1"><strong>Why does it take so long to learn how to program robots?</strong></p>
<p>We have identified a series of problems that prevent quick learning of robotics.</p>
<h3>You don’t have access to robots to play with</h3>
<p class="p1">There are many different robots available and they are really expensive. <span class="s1">Acquiring, maintaining, and explaining the hardware are real problems that limit class size and the learning experience of the students.</span></p>
<p class="p1">As Nikolaus Correll, <span class="ff2 ws2"><span class="ff1 ws3">Rowan Wing and David Coleman</span></span> indicate in their paper, <a href="https://www.researchgate.net/publication/258792932_A_One-Year_Introductory_Robotics_Curriculum_for_Computer_Science_Upperclassmen" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer"><em>A One-Year Introductory Robotics Curriculum for Computer Science Upperclassmen</em>:</a></p>
<blockquote>
<p class="p1"><span class="s1">Only a subset of the course material of a robotics curriculum can be assessed conceptually or mathematically. Demonstrating a thorough understanding of an algorithm requires implementation. Unlike purely computational algorithms, which can be assessed automatically using test-input, authentic assessment scenarios are difficult to create for a robotics class.</span></p>
</blockquote>
<p class="p1">Hence, students can hardly practice what they are learning.</p>
<p class="p1">We strongly believe in the <a href="http://www.papert.org/articles/SituatingConstructionism.html" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">CONSTRUCTIONISM</a> approach. Defined by Seymor Papert around 1980, the constructionism approach advocates for learning by making. That is, you are not learning when somebody is teaching you, but you are learning when you practice.</p>
<p class="p1">If you don’t have a robot to practise with, you cannot learn properly and at full speed.</p>
<h3 class="p1">Concepts are complex to understand</h3>
<p class="p1">The concepts of learning how to make a robot work are complex (how to make a robot grasp, how to build a navigation program, how to make it reason, etc.), which makes the learning curve very steep.</p>
<p class="p1">How many of you out there use ROS? Ok, how would you explain ROS to others who know nothing about it? Difficult, isn’t it?</p>
<p class="p1">The most meaningful unit in robotics for a newcomer is making the robot do something. Given the student’s program to make the robot do something, the robot either does it or not. This is very clear to understand. You push this button and the robot does that (or not, if you have a failure in your program). The feedback of your performance is very clear and straight.</p>
<p class="p1">It is not the same to get the feedback about the robot doing an action than to do it because the compilation said you forgot to include something in the CMakeLists.</p>
<p class="p1">The longer it takes to associate the errors with the result in the robot, the more difficult it is for the student to close the loop of understanding, and hence, learn why or why not this works that way. This is the concept of <strong>delayed reward</strong>. The longer delayed reward, the more difficult to understand the relation cause-effect and the longer it will take to learn the concept associated.</p>
<p class="p1">The challenge is then to provide such feedback very quickly, even if there are many steps and concepts involved in a robot action. Hence, teaching materials cannot start by indicating how to install everything, how to compile, or how to create a download new packages.</p>
<p class="p1">Nobody needs to know the definition of ROS to start using it. It is not a good idea to start teaching ROS by defining what a package is, or what a workspace is, then how catkin works, then what is the ROS_MASTER_URI, etc.</p>
<p class="p1">All of those are important, but not at this early stage. Going at that pace will take ages to make the robot do something, and for the student to understand.</p>
<p class="p1"><a href="http://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-01-at-16.37.37-1024x452.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-66706" src="http://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-01-at-16.37.37-1024x452-1024x452.png" alt="screen-shot-2016-09-01-at-16-37-37-1024x452" width="1024" height="452" srcset="https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-01-at-16.37.37-1024x452.png 1024w, https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-01-at-16.37.37-1024x452-425x188.png 425w, https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-01-at-16.37.37-1024x452-500x221.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<h3 class="p1">Documentation made by teachers for teachers</h3>
<p class="p1">We found that documentation, tutorials and classes are made by people who already know robotics for people who already understand robotics. I call these type of tutorials <strong>reference tutorials</strong>. Those tutorials basically start by describing concepts one-by-one, following a hierarchy of well-defined definitions by people who already understand the subject. If you ask the reason of that concept or for what do you need it, they will tell you that you will understand later (but later is too late!).</p>
<p class="p1">Generally speaking, robotics is sometimes taught as if it were for the instructor. It is very structured with a clear concepts hierarchy. It is a problem that documentations of robot programming frameworks work as a <em>reference tutorial</em> for the engineers that wrote it. Of course, you can learn from those but it is a lot harder and much slower (I learnt ROS that way).</p>
<p class="p1">I do believe we do not work this way. One thing is the way we structure information once we know the whole space, and another is the way we structure it when we are learning. Very different things.</p>
<h2 class="p1">The solution we propose</h2>
<p class="p1">The<span class="Apple-converted-space"> </span>method we propose is to make the students forget as many concepts as possible and concentrate on doing things with the robots. Complex concepts will be taught later when the student has the base. This approach is based on how we learn and not in how we order our thoughts once we have them.</p>
<p class="p1">We propose a solution to speed the learning that provides the following steps:</p>
<p><strong>1. In media res. </strong>That is the trick Star Wars used to make the movie more appealing (new Star Trek movies have copied successfully, I think).</p>
<p class="p1">This means, start in the middle, not the edges. The idea is to put the student in the middle of the knowledge to learn and make it move to the sides, discarding a lot of things in the way to the side.</p>
<p class="p1"><strong>2. Learning by doing.</strong> Not by reading or by typing, by working on a robot.</p>
<p class="p1">This is the successful case of <a href="https://www.codecademy.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Code Academy</a>. There you can learn to code by doing and quickly observing the result of what you have done.</p>
<p class="p1">We must have the same type of environment for robotics learning. Do, then observe <strong>on the robot</strong> the result of your program.</p>
<p class="p1"><strong>3. A step by step guide. </strong>Showing only what is required for the next action of the robot, and removing out of the equation what is not required/useful at that specific learning moment (even if important for the success of the step).</p>
<p class="p1">For example, you must have a <em>catkin_ws</em> in order to launch a ROS package, but we do not believe that we must explain to a new student how to create a <em>catkin_ws</em>. Instead, we provide it done ready to be used, and once he becomes used to it, then we show how to create your own.</p>
<p class="p1"><a href="http://robohub.org/wp-content/uploads/2016/09/Screenshot-from-2016-08-10-121840-1024x422.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-66707" src="http://robohub.org/wp-content/uploads/2016/09/Screenshot-from-2016-08-10-121840-1024x422-1024x422.png" alt="screenshot-from-2016-08-10-121840-1024x422" width="1024" height="422" srcset="https://robohub.org/wp-content/uploads/2016/09/Screenshot-from-2016-08-10-121840-1024x422.png 1024w, https://robohub.org/wp-content/uploads/2016/09/Screenshot-from-2016-08-10-121840-1024x422-425x175.png 425w, https://robohub.org/wp-content/uploads/2016/09/Screenshot-from-2016-08-10-121840-1024x422-500x206.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<h2 class="p1">Implementation</h2>
<p class="p1">At The Construct, we have integrated all those ideas into a platform that allows students to quickly learn (in 5 days) any concept of robotics programming. I mean, for real robots!</p>
<p class="p1">Our platform is called <a href="http://www.robotigniteacademy.com/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Robot Ignite Academy</a>, and we like to call it the <strong>Code Academy for Robotics</strong>. We integrated step by step explanations with a robot simulation and program development environment, everything inside a web browser (hence you can learn using any type of device).</p>
<p class="p1"><a href="http://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-29-at-12.37.38-1024x576.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-66708" src="http://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-29-at-12.37.38-1024x576-1024x576.png" alt="screen-shot-2016-09-29-at-12-37-38-1024x576" width="1024" height="576" srcset="https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-29-at-12.37.38-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-29-at-12.37.38-1024x576-425x239.png 425w, https://robohub.org/wp-content/uploads/2016/09/Screen-Shot-2016-09-29-at-12.37.38-1024x576-500x281.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p class="p1">At Ignite Academy, students will learn complex robotics concepts by:</p>
<ol>
<li class="p1"><strong>Using simulations of the real robots</strong>. Many. Examples include Turtlebot-2, Husky, Sphero, Wam, quadcopters… even BB-8! Students use a simulation of the robots as if they had the robot.</li>
<li class="p1"><strong>Use a step-by-step lesson process</strong> that engages the student on doing something with the robot after every step, in order to check that he is understanding the explanation.</li>
<li class="p1"><strong>Use the description not only to explain, but also to do</strong>. Include interactions in the explanation. For example, generate graphics dynamically on the explanation based on what the robot is doing at that moment.</li>
<li class="p1"><strong>Forget about certain basic concepts</strong> (for example, what is ROS… who cares? You don’t need to know what is ROS in order to use it and make a robot work) We believe that once you have mastered the real thing, getting those concepts will be easy peace. But if you put them on the pile of things you have to learn together with the others, it makes the whole thing difficult to swallow.</li>
</ol>
<p>All that without having to install anything in your computer, and with simulations at the core of the learning system, not only as something additional.</p>
<p class="p1">In our system, the simulation is at the center. We provide different simulated robots that the student has to practice with. They use simulation as if they had the real robot, with the difference that they don’t have to care about building it. It is just provided and ready to be used.</p>
<h2 class="p1">Conclusion</h2>
<p class="p1">We are providing the Ignite Academy platform online, for anyone. <strong>Students</strong> can use it for their personal learning. <strong>Teachers</strong> can use it for teaching during the class. <strong>Companies</strong> can use it to upgrade their workers.</p>
<p>What is also important to state is that you don’t have to care about installing anything. Connect using a web browser from any type of computer and start learning.</p>
<a href="http://robohub.org/wp-content/uploads/2016/09/DSC09928-1024x680.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-66709" src="http://robohub.org/wp-content/uploads/2016/09/DSC09928-1024x680-1024x680.jpg" alt="dsc09928-1024x680" width="1024" height="680" srcset="https://robohub.org/wp-content/uploads/2016/09/DSC09928-1024x680.jpg 1024w, https://robohub.org/wp-content/uploads/2016/09/DSC09928-1024x680-425x282.jpg 425w, https://robohub.org/wp-content/uploads/2016/09/DSC09928-1024x680-452x300.jpg 452w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Make your own Dtto Modular Robot – Assembly instructions (Part 3 of 3)</title>
		<link>https://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-3-of-3/</link>
		
		<dc:creator><![CDATA[Alberto Molina]]></dc:creator>
		<pubDate>Wed, 24 Aug 2016 11:00:59 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Alberto Molina]]></category>
		<category><![CDATA[DIY robotics]]></category>
		<guid isPermaLink="false">http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-3-of-3/</guid>

					<description><![CDATA[Dtto v2.0 is a modular self-reconfigurable robot focused on bio-inspired locomotion mechanisms. This tutorial shows how to assemble a fully working Dtto Modular Robot module. Please review Parts 1 and 2 before getting started. This document is an illustrated guide on how to assemble a module (v2) for the Dtto Modular Robot: https://hackaday.io/project/9976-dtto-v20-modular-robot Now, let’s jump in for [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_65627" style="width: 1034px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65627" class="size-large wp-image-65627" src="http://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s-1024x750.jpg" alt="Source: Alberto Molina" width="1024" height="750" srcset="https://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s-1024x750.jpg 1024w, https://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s-425x311.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s-410x300.jpg 410w, https://robohub.org/wp-content/uploads/2016/08/IMG_20160421_114411-s.jpg 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-65627" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>Dtto v2.0 is a modular self-reconfigurable robot focused on bio-inspired locomotion mechanisms. This tutorial shows how to assemble a fully working <a class="ext-link" title="" href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" rel="external follow noopener noreferrer" data-wpel-link="external">Dtto Modular Robot module</a>.<span id="more-65599"></span><br />
<span id="more-65572"></span></p>
<p>Please review<a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/" target="_blank" data-wpel-link="internal"> Parts 1</a> and <a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-2-of-3/" target="_blank" data-wpel-link="internal">2</a> before getting started.</p>
<p>This document is an illustrated guide on how to assemble a module (v2) for the Dtto Modular Robot: <a class="ext-link" title="" href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" rel="external follow noopener noreferrer" data-wpel-link="external">https://hackaday.io/project/9976-dtto-v20-modular-robot</a></p>
<p>Now, let’s jump in for Part 3!</p>
<hr class="xh2  ">
<h2>Step 15</h2>
<p>We need:</p>
<ul>
<li>1 x LM317 Voltage Regulator</li>
<li>1 x 1200 Ohm Resistor</li>
<li>1 x 330 Ohm Resistor</li>
</ul>
<p>Now we will configure our voltage regulator. Since we basically need the regulator for powering the servomotors, and since they can operate between 5 and 6 volts, set the regulator to as close to 6 volts as you can. You can use any other voltage regulator you want, considering the minimum current needs.</p>
<p>The LM317 Voltage regulator allows us to adjust the output voltage using some resistors. You can find the details and the math in its datasheet, widely available. Refer to the datasheet to be sure of the connections. The resistors that we choose were 330 and 1200 Ohms, resulting 5.8 volts. We can also use 100 and 390 Ohms, resulting in 6.1 volts. Check the schematics.</p>
<p>We need to power 5 servomotors with the output voltage from the regulator, so we need a small board to solder up the regulator, the resistors, and the cables. The dimensions of the board shouldn’t exceed 1*2.2cm, and it should fit in the module, as in the next pictures.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/15a-1.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65603" src="http://robohub.org/wp-content/uploads/2016/08/15a-1.jpg" alt="15a (1)" width="552" height="707" srcset="https://robohub.org/wp-content/uploads/2016/08/15a-1.jpg 552w, https://robohub.org/wp-content/uploads/2016/08/15a-1-332x425.jpg 332w, https://robohub.org/wp-content/uploads/2016/08/15a-1-234x300.jpg 234w" sizes="(max-width: 552px) 100vw, 552px" /></a>
<p>Check the schematics of the module, you can use the board to connect the cables that come from the batteries (switch), and the ones that connect to the Arduino.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/15b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-65604" src="http://robohub.org/wp-content/uploads/2016/08/15b-1024x958.jpg" alt="15b" width="1024" height="958" srcset="https://robohub.org/wp-content/uploads/2016/08/15b-1024x958.jpg 1024w, https://robohub.org/wp-content/uploads/2016/08/15b-425x398.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/15b-321x300.jpg 321w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/15c.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65605" src="http://robohub.org/wp-content/uploads/2016/08/15c.jpg" alt="15c" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/15c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/15c-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/15c-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 16</h2>
<p>We need:</p>
<ul>
<li>1 x Mini Switch</li>
</ul>
<p>Now we are going to put a little switch to power on/off the entire module. Check the schematics.</p>
<p>For now, we&#8217;ll leave the switch hanging around and we will return to it later.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/16a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65606" src="http://robohub.org/wp-content/uploads/2016/08/16a.jpg" alt="16a" width="900" height="931" srcset="https://robohub.org/wp-content/uploads/2016/08/16a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/16a-411x425.jpg 411w, https://robohub.org/wp-content/uploads/2016/08/16a-290x300.jpg 290w, https://robohub.org/wp-content/uploads/2016/08/16a-32x32.jpg 32w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 17</h2>
<p>We need:</p>
<ul>
<li>1 x Arduino Nano v3.0</li>
</ul>
<p>The Arduino Nano is the brain of our module, our robot. <strong>It is very important to test the Arduino before proceeding to the following steps.</strong></p>
<p>In this step, we will test the Arduino Board and the connection with the computer and will program an example program: blink. Once tested, note that, in order to save some valuable space, we will need a pins-free board.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/17a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65607" src="http://robohub.org/wp-content/uploads/2016/08/17a.jpg" alt="17a" width="900" height="441" srcset="https://robohub.org/wp-content/uploads/2016/08/17a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/17a-425x208.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/17a-500x245.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Now put the Arduino Nano into the module.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/17b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-large wp-image-65608" src="http://robohub.org/wp-content/uploads/2016/08/17b-1024x791.jpg" alt="17b" width="1024" height="791" srcset="https://robohub.org/wp-content/uploads/2016/08/17b-1024x791.jpg 1024w, https://robohub.org/wp-content/uploads/2016/08/17b-425x328.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/17b-389x300.jpg 389w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><div style="clear:both"></div></p>
<h2>Step 18</h2>
<p>We need:</p>
<ul>
<li>1 x HC-05 Bluetooth module (step 11)</li>
</ul>
<p>Now we are going to solder all the cables directly to the Arduino. Follow the schematics and try to keep the cables as short as possible. This is a tricky part, so you have to think how to put the cables to reduce length, allow all the components to fit, and allow the coupling mechanisms to work.</p>
<p>Check the schematics.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/18a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65613" src="http://robohub.org/wp-content/uploads/2016/08/18a.jpg" alt="18a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/18a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/18a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/18a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/18b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65614" src="http://robohub.org/wp-content/uploads/2016/08/18b.jpg" alt="18b" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/18b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/18b-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/18b-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/18c.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65615" src="http://robohub.org/wp-content/uploads/2016/08/18c.jpg" alt="18c" width="900" height="1001" srcset="https://robohub.org/wp-content/uploads/2016/08/18c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/18c-382x425.jpg 382w, https://robohub.org/wp-content/uploads/2016/08/18c-270x300.jpg 270w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>As you can see in the pictures, the Bluetooth module is “floating”. Since it’s on top of the Arduino, and we have to ensure that we can access the Arduino, cut the cables long enough. We’ve also used auxiliary boards to solder some cables together (grounds, etc.), for better cable organization.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/18d.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65616" src="http://robohub.org/wp-content/uploads/2016/08/18d.jpg" alt="18d" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/18d.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/18d-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/18d-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 19</h2>
<p>We need:</p>
<ul>
<li>1 x WS2812 RGB LED</li>
<li>1 x Part 007-1 (step 10)</li>
</ul>
<p>In this step, we will be mounting the fancy RGB LED of the robot. Cut the LED support to adapt it to the mounted LED. The cables should go, as in the picture (Note: the servo in this picture has no cables, we ran out of working ones).</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/19a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65617" src="http://robohub.org/wp-content/uploads/2016/08/19a.jpg" alt="19a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/19a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/19a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/19a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Now it’s time to fix the printed part to the module body, using 2 screws. As you can see in the picture, the mini switch is just under the servo we just assembled. Stick the mini switch in a position that, when pressed, it doesn’t protrude from the module.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/19b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65618" src="http://robohub.org/wp-content/uploads/2016/08/19b.jpg" alt="19b" width="900" height="915" srcset="https://robohub.org/wp-content/uploads/2016/08/19b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/19b-418x425.jpg 418w, https://robohub.org/wp-content/uploads/2016/08/19b-295x300.jpg 295w, https://robohub.org/wp-content/uploads/2016/08/19b-32x32.jpg 32w, https://robohub.org/wp-content/uploads/2016/08/19b-64x64.jpg 64w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 20</h2>
<p>We need:</p>
<ul>
<li>1 x Part 003-1</li>
<li>1 x Part 006-1</li>
<li>1 x Part 008-1</li>
<li>1 x Part 010-1</li>
<li>2 x Li-Po Batteries</li>
</ul>
<p>Just as we did in step 6, assemble part 003-1 to the other half of the module. Make sure that it rotates nice and easy.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/20a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65619" src="http://robohub.org/wp-content/uploads/2016/08/20a.jpg" alt="20a" width="900" height="565" srcset="https://robohub.org/wp-content/uploads/2016/08/20a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/20a-425x267.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/20a-478x300.jpg 478w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Now that the module is almost assembled, think about where to put the batteries. The module is designed to host the batteries in the male part, at the back of the Arduino, but since we are not using the empty space in the female part, we are going to put the batteries in the female half. This way we get a better weight distribution.</p>
<p>First, put the cables through that will power up the system:</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/20b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65620" src="http://robohub.org/wp-content/uploads/2016/08/20b.jpg" alt="20b" width="900" height="506" srcset="https://robohub.org/wp-content/uploads/2016/08/20b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/20b-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/20b-500x281.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Then, mount Parts 006-1 and 008-1, just as we did in the other half. Once we have done this, we can proceed to insert the batteries. Stick them in like in the pictures:</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/20c.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65621" src="http://robohub.org/wp-content/uploads/2016/08/20c.jpg" alt="20c" width="900" height="522" srcset="https://robohub.org/wp-content/uploads/2016/08/20c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/20c-425x247.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/20c-500x290.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/20d.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65622" src="http://robohub.org/wp-content/uploads/2016/08/20d.jpg" alt="20d" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/20d.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/20d-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/20d-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>We can now mount the Part 010-1.<div style="clear:both"></div></p>
<h2>Step 21</h2>
<p>We need:</p>
<ul>
<li>2 x Part 001-1</li>
<li>2 x Part 002-1</li>
</ul>
<p>This is the final step and we are going to assemble the last parts.</p>
<p>First, test if they fit correctly. If not, sand down until you get them to fit nicely.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/21a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65623" src="http://robohub.org/wp-content/uploads/2016/08/21a.jpg" alt="21a" width="900" height="911" srcset="https://robohub.org/wp-content/uploads/2016/08/21a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/21a-420x425.jpg 420w, https://robohub.org/wp-content/uploads/2016/08/21a-100x100.jpg 100w, https://robohub.org/wp-content/uploads/2016/08/21a-296x300.jpg 296w, https://robohub.org/wp-content/uploads/2016/08/21a-32x32.jpg 32w, https://robohub.org/wp-content/uploads/2016/08/21a-64x64.jpg 64w, https://robohub.org/wp-content/uploads/2016/08/21a-96x96.jpg 96w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>And this is the final result!</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/21b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65624" src="http://robohub.org/wp-content/uploads/2016/08/21b.jpg" alt="21b" width="900" height="481" srcset="https://robohub.org/wp-content/uploads/2016/08/21b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/21b-425x227.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/21b-500x267.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/21c.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65625" src="http://robohub.org/wp-content/uploads/2016/08/21c.jpg" alt="21c" width="900" height="506" srcset="https://robohub.org/wp-content/uploads/2016/08/21c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/21c-425x239.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/21c-500x281.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Now just program the Arduino with the available code and enjoy!</p>
<p>If you have any questions don’t hesitate to contact me, otrebla333@gmail.com.</p>
<p>Good luck with your modular projects!</p>
<p>This project and all of its files, images and texts are entirely licensed under the CC BY-SA 4.0 license. (<a class="ext-link" title="" href="http://creativecommons.org/licenses/by-sa/4.0/legalcode" target="_blank" rel="external follow noopener noreferrer" data-wpel-link="external">http://creativecommons.org/licenses/by-sa/4.0/legalcode</a>).</p>
<div class="keep-aspect"><iframe title="Dtto Modular Robot – Reconfiguration from snake to wheel - 2016HackadayPrize" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Z0rCfe9eDIo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<div class="keep-aspect"><iframe title="Dtto Modular Robot - Obstacles, wheel configuration - 2016HackadayPrize" width="500" height="281" src="https://www.youtube-nocookie.com/embed/he-2xa50Mhc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also want to read:</em></p>
<ul>
<li><a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/" target="_blank" data-wpel-link="internal">Make your own Dtto Modular Robot – Assembly instructions (Part 1 of 3)</a></li>
<li><a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-2-of-3/" target="_blank" data-wpel-link="internal">Make your own Dtto Modular Robot – Assembly instructions (Part 2 of 3)</a></li>
<li><a href="http://robohub.org/hello-pepper-getting-started-to-program-robots-on-android/" target="_blank" data-wpel-link="internal">Hello Pepper: Getting started to program robots on Android</a></li>
<li><a href="http://robohub.org/nasa-robonaut-2-simulation-placing-an-iss-panel-in-the-construct/" target="_blank" data-wpel-link="internal">NASA Robonaut 2 simulation: Placing an ISS panel in The Construct</a></li>
<li><a href="http://robohub.org/how-to-make-a-printed-circuit-board-using-a-diode-laser-with-a-3d-printer/" target="_blank" data-wpel-link="internal">How to make a printed circuit board using a diode laser with a 3D printer</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1472043154487000&amp;usg=AFQjCNEk0gaXceo7uV-Q1S-E9xqHgwTybg" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a class="ext-link" title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1472043154487000&amp;usg=AFQjCNHMsw3ZWbR5mKDx2p5e5zopA6kO5g" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Make your own Dtto Modular Robot – Assembly instructions (Part 2 of 3)</title>
		<link>https://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-2-of-3/</link>
		
		<dc:creator><![CDATA[Alberto Molina]]></dc:creator>
		<pubDate>Tue, 23 Aug 2016 12:59:42 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Alberto Molina]]></category>
		<category><![CDATA[DIY robotics]]></category>
		<guid isPermaLink="false">http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-2-of-3/</guid>

					<description><![CDATA[Dtto v2.0 is a modular self-reconfigurable robot focused on bio-inspired locomotion mechanisms. This tutorial shows how to assemble a fully working Dtto Modular Robot module. Please review Part 1 before getting started. This document is an illustrated guide on how to assemble a module (v2) for the Dtto Modular Robot: https://hackaday.io/project/9976-dtto-v20-modular-robot Now, let&#8217;s jump in for Part [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_65574" style="width: 1034px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/1931341463009095990.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65574" class="size-large wp-image-65574" src="http://robohub.org/wp-content/uploads/2016/08/1931341463009095990-1024x937.jpg" alt="Dtto v.2 module robot, DIY project, photo by Alberto Molina." width="1024" height="937" srcset="https://robohub.org/wp-content/uploads/2016/08/1931341463009095990-1024x937.jpg 1024w, https://robohub.org/wp-content/uploads/2016/08/1931341463009095990-425x389.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/1931341463009095990-328x300.jpg 328w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-65574" class="wp-caption-text">Dtto v.2 module robot, DIY project, photo by Alberto Molina.</p></div>
<p>Dtto v2.0 is a modular self-reconfigurable robot focused on bio-inspired locomotion mechanisms. This tutorial shows how to assemble a fully working <a class="ext-link" title="" href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" rel="external follow noopener noreferrer" data-wpel-link="external">Dtto Modular Robot module</a>.<br />
<span id="more-65572"></span></p>
<p><a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/" target="_blank" data-wpel-link="internal">Please review Part 1</a> before getting started.</p>
<p>This document is an illustrated guide on how to assemble a module (v2) for the Dtto Modular Robot: <a href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://hackaday.io/project/9976-dtto-v20-modular-robot</a></p>
<p>Now, let&#8217;s jump in for Part 2!</p>
<hr class="xh2  ">
<h2>Step 7</h2>
<p>We need:</p>
<ul>
<li>1 x Part 005-1</li>
<li>1 x Part 007-1</li>
<li>1 x Part 009-1</li>
<li>12 x Neodymium Magnets</li>
</ul>
<p>In this step, we put the magnets on the male parts. It is very important to put all the magnets in the male part with the north pole facing the inside of the module. Put the magnets in the holes, then put a drop of glue, sticking it to the part. For this procedure, use a hot glue gun.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/7a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65579" src="http://robohub.org/wp-content/uploads/2016/08/7a.jpg" alt="7a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/7a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/7a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/7a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/7b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65580" src="http://robohub.org/wp-content/uploads/2016/08/7b.jpg" alt="7b" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/7b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/7b-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/7b-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Repeat the procedure for the 3 parts:</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/7c.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65581" src="http://robohub.org/wp-content/uploads/2016/08/7c.jpg" alt="7c" width="900" height="234" srcset="https://robohub.org/wp-content/uploads/2016/08/7c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/7c-425x111.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/7c-500x130.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<div style="clear:both"></div>
<h2>Step 8</h2>
<p>We need:</p>
<ul>
<li>1 x Part 006-1</li>
<li>1 x Part 008-1</li>
<li>1 x Part 010-1</li>
<li>12 x Neodymium Magnets</li>
</ul>
<p>As we did in the previous step, we will also put the magnets in the female parts. Remember to put all magnets with the north pole facing the outside of the module. If we do this correctly the male parts won’t stick between them, but a male and a female part will be magnetically attracted.</p>
<h2>Step 9</h2>
<p>We need:</p>
<ul>
<li>3 x SG90 Servomotors</li>
<li>3 x Part 013-1</li>
<li>3 x Part 014-1</li>
<li>3 x Small rubber bands (dental braces)</li>
</ul>
<p>In this step, we will prepare the coupling mechanism that holds the modules of the robot together.</p>
<p>First, insert the servo arm (previously cut, as in the pic) through the two printed parts. Ensure that these parts rotate freely around the servo arm. Put the servo in the 90° position (servo.write(90)).</p>
<p>Then, screw the parts, like in the picture, using the screw that came with the servo.</p>
<p>Finally, put the rubber band between the two parts.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/9a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65582" src="http://robohub.org/wp-content/uploads/2016/08/9a.jpg" alt="9a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/9a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/9a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/9a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/9b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65583" src="http://robohub.org/wp-content/uploads/2016/08/9b.jpg" alt="9b" width="900" height="514" srcset="https://robohub.org/wp-content/uploads/2016/08/9b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/9b-425x243.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/9b-175x100.jpg 175w, https://robohub.org/wp-content/uploads/2016/08/9b-500x286.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Repeat the procedure with the other 3 SG90 servomotors.</p>
<div style="clear:both"></div>
<h2>Step 10</h2>
<p>We need:</p>
<ul>
<li>1 x Part 005-1 (step 7)</li>
<li>1 x Part 007-1 (step 7)</li>
<li>1 x Part 009-1 (step 7)</li>
</ul>
<p>In this step, we will fix the servos that form the coupling mechanism to the printed parts.</p>
<p>First, insert the servo in the correct position.</p>
<p>Then, using the 2 screws that came with the servo, fix it to the part.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/10a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65584" src="http://robohub.org/wp-content/uploads/2016/08/10a.jpg" alt="10a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/10a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/10a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/10a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<a href="http://robohub.org/wp-content/uploads/2016/08/10b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65585" src="http://robohub.org/wp-content/uploads/2016/08/10b.jpg" alt="10b" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/10b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/10b-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/10b-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p>Repeat the procedure for the 2 parts left.<div style="clear:both"></div></p>
<h2>Step 11</h2>
<p>We need:</p>
<ul>
<li>1 x HC-05 Bluetooth module</li>
<li>1 x NRF24L01 radio module</li>
</ul>
<p>In this step, we will prepare the Bluetooth and the radio module.</p>
<p>Remove the pin headers to solder wire directly, thus reducing the total volume of the modules. Be sure to use a flat cable from an old PC, because there won’t be much space for cables.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/11a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65586" src="http://robohub.org/wp-content/uploads/2016/08/11a.jpg" alt="11a" width="900" height="312" srcset="https://robohub.org/wp-content/uploads/2016/08/11a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/11a-425x147.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/11a-500x173.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 12</h2>
<p>We need:</p>
<ul>
<li>1 x NRF24L02 radio module (step 11)</li>
</ul>
<p>Now, we are going to stick the radio module to its final position.</p>
<p>Due to the lack of space and the need to reduce weight, we decided to simply stick the module with some hot glue. Be sure the module doesn’t make contact with the moving part in the center. The cables go to the other side of the module.</p>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/12a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65587" src="http://robohub.org/wp-content/uploads/2016/08/12a.jpg" alt="12a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/12a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/12a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/12a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 13</h2>
<p>We need:</p>
<ul>
<li>1 x Part 009-1 (step 10)</li>
</ul>
<p>Using 3 screws, mount the motor-equipped part 009-1 to the body of the module. Ensure that the servo cables don’t contact the coupling mechanism.</p>
<a href="http://robohub.org/wp-content/uploads/2016/08/13a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65591" src="http://robohub.org/wp-content/uploads/2016/08/13a.jpg" alt="13a" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/13a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/13a-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/13a-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a>
<p><a href="http://robohub.org/wp-content/uploads/2016/08/13b.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65592" src="http://robohub.org/wp-content/uploads/2016/08/13b.jpg" alt="13b" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/13b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/13b-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/13b-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><div style="clear:both"></div></p>
<h2>Step 14</h2>
<p>We need:</p>
<ul>
<li>1 x Part 005-1 (step 10)</li>
</ul>
<p>In this step, we will mount the “base” of the robot, part 005-1, with the previously mounted motor.</p>
<p>It&#8217;s important to note the size of the cables connected to the radio module (step 11), because they have to fit between the “base” servomotor and the top part.</p>
<p>We need 4 screws for this step.<br />
<a href="http://robohub.org/wp-content/uploads/2016/08/14a.jpg" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-65593" src="http://robohub.org/wp-content/uploads/2016/08/14a.jpg" alt="14a" width="616" height="900" srcset="https://robohub.org/wp-content/uploads/2016/08/14a.jpg 616w, https://robohub.org/wp-content/uploads/2016/08/14a-291x425.jpg 291w, https://robohub.org/wp-content/uploads/2016/08/14a-205x300.jpg 205w" sizes="(max-width: 616px) 100vw, 616px" /></a></p>
<p>Tomorrow, we will conclude the tutorial with Part 3: configuring the voltage regulator, the Arduino Nano, and final part assembly!</p>
<p>This project and all of its files, images and texts are entirely licensed under the CC BY-SA 4.0 license. (<a href="http://creativecommons.org/licenses/by-sa/4.0/legalcode" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://creativecommons.org/licenses/by-sa/4.0/legalcode</a>).</p>
<hr class="xh2  ">
<p><em>If you liked this article, you may also want to read:</em></p>
<ul>
<li><a href="http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/" target="_blank" data-wpel-link="internal">Make your own Dtto Modular Robot – Assembly instructions (Part 1 of 3)</a></li>
<li><a href="http://robohub.org/hello-pepper-getting-started-to-program-robots-on-android/" target="_blank" data-wpel-link="internal">Hello Pepper: Getting started to program robots on Android</a></li>
<li><a href="http://robohub.org/nasa-robonaut-2-simulation-placing-an-iss-panel-in-the-construct/" target="_blank" data-wpel-link="internal">NASA Robonaut 2 simulation: Placing an ISS panel in The Construct</a></li>
<li><a href="http://robohub.org/how-to-make-a-printed-circuit-board-using-a-diode-laser-with-a-3d-printer/" target="_blank" data-wpel-link="internal">How to make a printed circuit board using a diode laser with a 3D printer</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://robohub.org/&amp;source=gmail&amp;ust=1472043154487000&amp;usg=AFQjCNEk0gaXceo7uV-Q1S-E9xqHgwTybg" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a title="" href="http://eepurl.com/t-UEf" target="_blank" rel="external follow noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en-GB&amp;q=http://eepurl.com/t-UEf&amp;source=gmail&amp;ust=1472043154487000&amp;usg=AFQjCNHMsw3ZWbR5mKDx2p5e5zopA6kO5g" data-wpel-link="external">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Make your own Dtto Modular Robot – Assembly instructions (Part 1 of 3)</title>
		<link>https://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/</link>
		
		<dc:creator><![CDATA[Alberto Molina]]></dc:creator>
		<pubDate>Mon, 22 Aug 2016 18:37:22 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Alberto Molina]]></category>
		<category><![CDATA[DIY robotics]]></category>
		<guid isPermaLink="false">http://robohub.org/make-your-own-dtto-modular-robot-assembly-instructions-part-1-of-3/</guid>

					<description><![CDATA[This tutorial shows how to assemble a fully working Dtto Modular Robot module. This robot is inspired by the MTRAN III, by the National Institute of Advanced Industrial Science and Technology (AIST), Japan. We strongly recommend you have a rasp (also called: nail file, emery board, or sandpaper) close by and a set of precision [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_65531" style="width: 626px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/dtto-robot1.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65531" class="wp-image-65531 size-full" src="http://robohub.org/wp-content/uploads/2016/08/dtto-robot1.png" alt="" width="616" height="457" srcset="https://robohub.org/wp-content/uploads/2016/08/dtto-robot1.png 616w, https://robohub.org/wp-content/uploads/2016/08/dtto-robot1-425x315.png 425w, https://robohub.org/wp-content/uploads/2016/08/dtto-robot1-404x300.png 404w" sizes="(max-width: 616px) 100vw, 616px" /></a><p id="caption-attachment-65531" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>This tutorial shows how to assemble a fully working <a href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Dtto Modular Robot module.</a><span id="more-65527"></span></p>
<div class="keep-aspect"><iframe title="Dtto Modular Robot - 4 legged walker - 2016HackadayPrize" width="500" height="281" src="https://www.youtube-nocookie.com/embed/IggfFP-3cz0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>This robot is inspired by the <a href="https://unit.aist.go.jp/is/frrg/dsysd/mtran3/index.htm" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">MTRAN III, by the National Institute of Advanced Industrial Science and Technology (AIST), Japan.</a></p>
<p>We strongly recommend you have a rasp (also called: nail file, emery board, or sandpaper) close by and a set of precision blades.</p>
<p>First of all, we need to print all the robot parts. For this type of project, we think that ABS plastic is better as it is more machinable than others. All .stl files are available in the links below. You also have a link to a PDF file detailing how many parts we need, part numbers and some details (list of 3D printed parts). We will be using the part number to identify the parts. We also need the schematics file to check the connections.</p>
<p>Once we have all our parts printed, all supports removed and carefully sanded, we can proceed to the assembly of the module.</p>
<p>It has been fully printed with open-source 3D printers, uses open-source hardware, and has been designed entirely on FreeCad.</p>
<p><em>Note: In this tutorial</em>, <em>we won’t be assembling the IR detection system. This feature will be available as soon as possible.</em></p>
<p><em>We do not take any responsibility and we are not liable for anything occurring while assembling and playing with this modular robot.</em></p>
<p><strong>All images copyright Alberto Molina.</strong></p>
<hr class="xh2  ">
<div id="attachment_65529" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/1.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65529" class="wp-image-65529 size-full" src="http://robohub.org/wp-content/uploads/2016/08/1.jpg" alt="Source: Alberto Perez" width="900" height="481" srcset="https://robohub.org/wp-content/uploads/2016/08/1.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/1-425x227.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/1-500x267.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65529" class="wp-caption-text">Source: Alberto Molina</p></div>
<div style="clear:both"></div>
<h2>Step 1</h2>
<p>This document is an illustrated guide on how to assemble a module (v2) for the Dtto Modular Robot: <a href="https://hackaday.io/project/9976-dtto-v20-modular-robot" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://hackaday.io/project/9976-dtto-v20-modular-robot</a></p>
<p><strong>In the project files, you will find the following documents:</strong></p>
<ul>
<li>Bill of materials</li>
<li>List of 3D printed parts</li>
<li>Schematics</li>
<li>STL files for printing</li>
</ul>
<p>You will find all the documents also on:<br />
<a href="https://github.com/otrebla333/Dtto-Modular-Robot" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://github.com/otrebla333/Dtto-Modular-Robot</a></p>
<p><strong>Components:</strong></p>
<table class="tg">
<tbody>
<tr>
<th class="tg-e3zv">Quantity</th>
<th class="tg-9hbo">Description</th>
</tr>
<tr>
<td class="tg-yw4l">22</td>
<td class="tg-yw4l">3D printed parts</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">Arduino Nano v3.0</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">HC-05 Bluetooth Module</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">NRF24L01 + Wireless Transceiver</td>
</tr>
<tr>
<td class="tg-yw4l">24</td>
<td class="tg-yw4l">Neodimium Disk Magnets (4x3mm)</td>
</tr>
<tr>
<td class="tg-yw4l">2</td>
<td class="tg-yw4l">TowerPro MG92B Servomotor</td>
</tr>
<tr>
<td class="tg-yw4l">3</td>
<td class="tg-yw4l">TowerPro SG90 Servomotor</td>
</tr>
<tr>
<td class="tg-yw4l">2</td>
<td class="tg-yw4l">Li-Po Battery 3,7V 600mAh 25C</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">LM317 Voltage Regulator</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">Mini Switch</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">WS2812 RGB LED</td>
</tr>
<tr>
<td class="tg-yw4l">40</td>
<td class="tg-yw4l">M1.7x4mm Self Tapper Screw</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">330 Ohms Resistor</td>
</tr>
<tr>
<td class="tg-yw4l">1</td>
<td class="tg-yw4l">1200 Ohms Resistor</td>
</tr>
<tr>
<td class="tg-yw4l">4</td>
<td class="tg-yw4l">520 Ohms Resistor</td>
</tr>
<tr>
<td class="tg-yw4l">3</td>
<td class="tg-yw4l">Small Rubber Bands (dental braces)</td>
</tr>
</tbody>
</table>
<div style="clear:both"></div>
<h2>Step 2</h2>
<p>We need:</p>
<ul>
<li>2 x Part 004-1</li>
<li>1 x Part 011-1</li>
</ul>
<p>First, we have to ensure these 3 parts fit perfectly. It is very important that the 004-1 parts rotate freely around the center. The easier they rotate the less energy is lost in friction, and the robot moves around better.</p>
<div id="attachment_65534" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/2a.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65534" class="wp-image-65534 size-full" src="http://robohub.org/wp-content/uploads/2016/08/2a.jpg" alt="Source: Alberto Perez" width="900" height="355" srcset="https://robohub.org/wp-content/uploads/2016/08/2a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/2a-425x168.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/2a-500x197.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65534" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65535" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/2b.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65535" class="wp-image-65535 size-full" src="http://robohub.org/wp-content/uploads/2016/08/2b.jpg" alt="Source: Alberto Perez" width="900" height="353" srcset="https://robohub.org/wp-content/uploads/2016/08/2b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/2b-425x167.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/2b-500x196.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65535" class="wp-caption-text">Source: Alberto Molina</p></div>
<div style="clear:both"></div>
<h2>Step 3</h2>
<p>We need:</p>
<ul>
<li>2 x MG92B Servomotors</li>
<li>4 x 520 Ohms Resistors</li>
</ul>
<p>The second thing to do is to adapt the MG92B servomotors to turn the full 180 degrees.</p>
<p>The method we used was to add a couple resistors to each servo control circuit:</p>
<ul>
<li>Take apart the back cover of the servomotor (4 screws).</li>
<li>Carefully separate the control circuit from the inside. The potentiometer is located under the circuit (it may be covered by a black film). Once you can access the 3 pins of the potentiometer, you have to unsolder the first and the third cable (not the center one). Then, you have to solder a 520 ohms resistor to each of these two pins, and then solder the cable to the resistor. You can find tutorials on how to modify servomotors (search: modify servo 180 degree), but it’s important you use the 520 ohms resistors (in the pictures we used one 680 and one 2200 ohms resistor in parallel to get the 520 ohms).</li>
<li>The control circuit does not fit the casing anymore, so we are going to stick it to the side of the metal case (see pictures). Protect the circuit from short-circuits with some tape on both sides.</li>
<li>Repeat the procedure for the other servomotor.</li>
</ul>
<div id="attachment_65536" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/3a.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65536" class="wp-image-65536 size-full" src="http://robohub.org/wp-content/uploads/2016/08/3a.jpg" alt="" width="900" height="383" srcset="https://robohub.org/wp-content/uploads/2016/08/3a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/3a-425x181.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/3a-500x213.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65536" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65537" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/3b.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65537" class="wp-image-65537 size-full" src="http://robohub.org/wp-content/uploads/2016/08/3b.jpg" alt="" width="900" height="306" srcset="https://robohub.org/wp-content/uploads/2016/08/3b.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/3b-425x145.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/3b-500x170.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65537" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65538" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/3c.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65538" class="wp-image-65538 size-full" src="http://robohub.org/wp-content/uploads/2016/08/3c.jpg" alt="" width="900" height="479" srcset="https://robohub.org/wp-content/uploads/2016/08/3c.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/3c-425x226.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/3c-500x266.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65538" class="wp-caption-text">Source: Alberto Molina</p></div>
<div style="clear:both"></div>
<h2>Step 4</h2>
<p>We need:</p>
<ul>
<li>2 x Part 004-1</li>
<li>2 x MG92B Servomotors (step 3)</li>
</ul>
<p>In this step, we are going to fix the motors to the printed parts. The motor should fit correctly. We can use the screws that come with the motor, but we will have to cut them to the right length.</p>
<div id="attachment_65539" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/4a.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65539" class="wp-image-65539 size-full" src="http://robohub.org/wp-content/uploads/2016/08/4a.jpg" alt="" width="900" height="551" srcset="https://robohub.org/wp-content/uploads/2016/08/4a.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/4a-425x260.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/4a-490x300.jpg 490w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65539" class="wp-caption-text">Source: Alberto Molina</p></div>
<div style="clear:both"></div>
<h2>Step 5</h2>
<p>We need:</p>
<ul>
<li>1 x Part 011-1</li>
<li>1 x Part 012-1</li>
<li>2 x Servo Arms (Cross)</li>
</ul>
<p>Now we are going to fix the servo arms to the 3D printed part. This step is very important because we have to ensure that the servomotor is centered. If it is not centered, once assembled, the module motor won’t be able to rotate all the way.</p>
<p>The next image illustrates the result. When the servo is set to 90 degrees (servo.write(90)), the relative position of the parts should be like in the center picture. If the position is slightly deviated, like in the picture on the right, we will have to center the part.</p>
<div id="attachment_65540" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5aa.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65540" class="wp-image-65540 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5aa.png" alt="" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/5aa.png 900w, https://robohub.org/wp-content/uploads/2016/08/5aa-425x283.png 425w, https://robohub.org/wp-content/uploads/2016/08/5aa-450x300.png 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65540" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>If we set the servo to 90 degrees and get a deviated position like in the picture on the right, we will have to un-center the servo arm, like in the following picture:</p>
<div id="attachment_65543" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5d.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65543" class="wp-image-65543 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5d.jpg" alt="" width="900" height="368" srcset="https://robohub.org/wp-content/uploads/2016/08/5d.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5d-425x174.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5d-500x204.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65543" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65544" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5e.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65544" class="wp-image-65544 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5e.jpg" alt="" width="900" height="432" srcset="https://robohub.org/wp-content/uploads/2016/08/5e.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5e-425x204.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5e-500x240.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65544" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>This is a critical part, so be sure to get a well-centered configuration. Once we get a well-centered part, we have to be completely sure that we have a correct configuration. We can connect the two parts and test the rotation with the &#8220;sweep&#8221; example in arduino IDE.</p>
<div id="attachment_65545" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5f.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65545" class="wp-image-65545 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5f.jpg" alt="" width="900" height="463" srcset="https://robohub.org/wp-content/uploads/2016/08/5f.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5f-425x219.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5f-500x257.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65545" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65546" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5g.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65546" class="wp-image-65546 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5g.jpg" alt="" width="900" height="589" srcset="https://robohub.org/wp-content/uploads/2016/08/5g.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5g-425x278.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5g-458x300.jpg 458w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65546" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>Once we finish with one servomotor, we can proceed to fix the other one.</p>
<div id="attachment_65547" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5h.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65547" class="wp-image-65547 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5h.jpg" alt="" width="900" height="551" srcset="https://robohub.org/wp-content/uploads/2016/08/5h.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5h-425x260.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5h-490x300.jpg 490w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65547" class="wp-caption-text">Source: Alberto Molina</p></div>
<div id="attachment_65548" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5i.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65548" class="wp-image-65548 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5i.jpg" alt="" width="900" height="459" srcset="https://robohub.org/wp-content/uploads/2016/08/5i.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5i-425x217.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5i-500x255.jpg 500w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65548" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>At this moment, the module does not have a male or female part assigned. We will choose one half and we will name it male. The other will be the female half. Then, we have to put the cables of the female motor through the hole in the central part, to the male part. You have to ensure that the cables allow a free rotation of the parts.</p>
<div id="attachment_65549" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/5j.jpg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65549" class="wp-image-65549 size-full" src="http://robohub.org/wp-content/uploads/2016/08/5j.jpg" alt="" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/5j.jpg 900w, https://robohub.org/wp-content/uploads/2016/08/5j-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2016/08/5j-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65549" class="wp-caption-text">Source: Alberto Molina</p></div>
<div style="clear:both"></div>
<h2>Step 6</h2>
<p>We need:</p>
<ul>
<li>1 x Part 003-1</li>
</ul>
<p>Now we will start to assemble the male half of the module. First of all we have to ensure that the hole in the part 003-1 fits with the previously assembled part 012-1. Once sanded, we can attach the part 003-1 to the part 004-1 using 3 screws.</p>
<div id="attachment_65550" style="width: 910px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/6a.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-65550" class="wp-image-65550 size-full" src="http://robohub.org/wp-content/uploads/2016/08/6a.png" alt="" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2016/08/6a.png 900w, https://robohub.org/wp-content/uploads/2016/08/6a-425x283.png 425w, https://robohub.org/wp-content/uploads/2016/08/6a-450x300.png 450w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-65550" class="wp-caption-text">Source: Alberto Molina</p></div>
<p>Tomorrow will feature Part 2, putting magnets on the parts and servos!</p>
<p>This project and all of its files, images and texts are entirely licensed under the CC BY-SA 4.0 license. (<a href="http://creativecommons.org/licenses/by-sa/4.0/legalcode" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://creativecommons.org/licenses/by-sa/4.0/legalcode</a>).</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Hello Pepper: Getting started to program robots on Android</title>
		<link>https://robohub.org/hello-pepper-getting-started-to-program-robots-on-android/</link>
		
		<dc:creator><![CDATA[Margaret Maynard-Reid]]></dc:creator>
		<pubDate>Wed, 03 Aug 2016 16:03:54 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Pepper]]></category>
		<guid isPermaLink="false">http://robohub.org/hello-pepper-getting-started-to-program-robots-on-android/</guid>

					<description><![CDATA[I didn’t get to meet Pepper the humanoid Robot at Google I/O but I watched the video afterwards: A new development frontier: Android + Pepper the interactive robot. Love the robots’ dance! I was super excited to hear that Pepper will become available in the U.S. later this year, and Android developers can now program [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="attachment_64968" style="width: 810px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/future-care-social-robotics.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-64968" class="size-full wp-image-64968" src="http://robohub.org/wp-content/uploads/2016/08/future-care-social-robotics.png" alt="The Future of Social Robotics, by Nicolas Rigaud. Source: Margaret Maynard-Reid/Medium" width="800" height="561" srcset="https://robohub.org/wp-content/uploads/2016/08/future-care-social-robotics.png 800w, https://robohub.org/wp-content/uploads/2016/08/future-care-social-robotics-425x298.png 425w, https://robohub.org/wp-content/uploads/2016/08/future-care-social-robotics-428x300.png 428w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-64968" class="wp-caption-text">The Future of Social Robotics, by Nicolas Rigaud. Source: Margaret Maynard-Reid/Medium</p></div>
<p id="f5b1" class="graf--p graf-after--h3">I didn’t get to meet <a class="markup--anchor markup--p-anchor" href="https://www.ald.softbankrobotics.com/en/cool-robots/pepper" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://www.ald.softbankrobotics.com/en/cool-robots/pepper" data-wpel-link="external">Pepper the humanoid Robot</a> at Google I/O but I watched the video afterwards: <a class="markup--anchor markup--p-anchor" href="https://youtu.be/Jd96g8vBUWk" rel="nofollow external noopener noreferrer" data-href="https://youtu.be/Jd96g8vBUWk" data-wpel-link="external" target="_blank">A new development frontier: Android + Pepper the interactive robot</a>. Love the robots’ dance! I was super excited to hear that Pepper will become available in the U.S. later this year, and Android developers can now program robots!</p>
<div class="keep-aspect"><iframe title="A new development frontier: Android + Pepper the interactive robot - Google I/O 2016" width="500" height="281" src="https://www.youtube-nocookie.com/embed/Jd96g8vBUWk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p id="6677" class="graf--p graf-after--p">A few weeks after I/O, I attended a Seattle Java User Group meetup. That evening I met Pepper in person, and I learned about the Future of Social Robotics from <a class="markup--user markup--p-user" href="https://medium.com/u/782537274ef4" target="_blank" data-href="https://medium.com/u/782537274ef4" data-anchor-type="2" data-user-id="782537274ef4" data-action="show-user-card" data-action-type="hover" data-wpel-link="external" rel="follow external noopener noreferrer">Nicolas Rigaud</a> (slides <a class="markup--anchor markup--p-anchor" href="http://www.slideshare.net/NicolasRigaud/meet-pepper" target="_blank" rel="nofollow external noopener noreferrer" data-href="http://www.slideshare.net/NicolasRigaud/meet-pepper" data-wpel-link="external">here</a>).</p>
<p id="3d5f" class="graf--p graf-after--p">Equipped with microphones, cameras, sensors and an intelligence to perceive emotions, Pepper was designed for social interactions. He has an Android tablet on his chest which is very convenient for displaying image, video and texts. Pepper is 4 feet tall (1.2 meters) and can connect to the network with either Wi-Fi or Ethernet. Pepper is multi-lingual in English, French, Japanese and Chinese.</p>
<div class="aspectRatioPlaceholder is-locked">
<div id="attachment_64967" style="width: 810px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/meeting-pepper.jpeg" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-64967" class="size-full wp-image-64967" src="http://robohub.org/wp-content/uploads/2016/08/meeting-pepper.jpeg" alt="Source: Margaret Maynard-Reid/Medium" width="800" height="800" srcset="https://robohub.org/wp-content/uploads/2016/08/meeting-pepper.jpeg 800w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-290x290.jpeg 290w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-425x425.jpeg 425w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-100x100.jpeg 100w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-220x220.jpeg 220w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-300x300.jpeg 300w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-32x32.jpeg 32w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-64x64.jpeg 64w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-96x96.jpeg 96w, https://robohub.org/wp-content/uploads/2016/08/meeting-pepper-128x128.jpeg 128w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-64967" class="wp-caption-text">Source: Margaret Maynard-Reid/Medium</p></div>
<p>I wanted to learn more about Pepper. So I followed the instructions from the <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/index.html" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/index.html" data-wpel-link="external">Pepper SDK for Android</a> and was able to quickly get set up and create my first robot Application with Android Studio.</p>
</div>
<div class="aspectRatioPlaceholder is-locked">
<p id="dff5" class="graf--p graf-after--p">Since I already have Android Studio installed, all I had to do was to install the Pepper SDK plugin before creating my first “Hello World” robot application. You can follow the official <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/getting_started.html" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/getting_started.html" data-wpel-link="external">Getting Started</a> guide for detailed instructions, and here I’m sharing with you a brief summary of the steps I took (note I already had JDK and Android Studio installed):</p>
<ol class="postList">
<li id="b22a" class="graf--li graf-after--p">In Android Studio, install the Pepper SDK plugin; then the <strong class="markup--strong markup--li-strong">Robot SDK Manager</strong> icon appears on the Android Studio main tool bar</li>
<li id="7170" class="graf--li graf-after--li">Click the Robot SDK Manager icon to get the Robot SDK and tools</li>
<li id="8970" class="graf--li graf-after--li">Creating my first robot application</li>
</ol>
<ul class="postList">
<li id="8178" class="graf--li graf-after--li">First create a regular Android application with minSDK = API 22 Android 5.1 Lollipop.</li>
<li id="87ab" class="graf--li graf-after--li">Then click File &gt; New &gt; Robot Application. Then notice these changes:</li>
</ul>
<p id="7d02" class="graf--p graf-after--li">These two robot development related icons in Android Studio become enabled: <strong class="markup--strong markup--p-strong">Emulator </strong>and <strong class="markup--strong markup--p-strong">Connect/Disconnect</strong>. The 4th icon <strong class="markup--strong markup--p-strong">Wakeup</strong> is still grayed out since I don’t have a real robot to connect to.</p>
<div id="attachment_64966" style="width: 721px" class="wp-caption aligncenter"><a href="http://robohub.org/wp-content/uploads/2016/08/Screen-Shot-2016-08-02-at-17.59.49.png" data-wpel-link="internal"><img decoding="async" aria-describedby="caption-attachment-64966" class="size-full wp-image-64966" src="http://robohub.org/wp-content/uploads/2016/08/Screen-Shot-2016-08-02-at-17.59.49.png" alt="Source: Margaret Maynard-Reid/Medium" width="711" height="115" srcset="https://robohub.org/wp-content/uploads/2016/08/Screen-Shot-2016-08-02-at-17.59.49.png 711w, https://robohub.org/wp-content/uploads/2016/08/Screen-Shot-2016-08-02-at-17.59.49-425x69.png 425w, https://robohub.org/wp-content/uploads/2016/08/Screen-Shot-2016-08-02-at-17.59.49-500x81.png 500w" sizes="(max-width: 711px) 100vw, 711px" /></a><p id="caption-attachment-64966" class="wp-caption-text">Source: Margaret Maynard-Reid/Medium</p></div>
<p class="graf--p graf-after--li">The Android project structure gets updated to the Robot Project Structure. Dependencies are automatically added in build.gradle file:</p>
<pre id="a311" class="graf--pre graf-after--p">compile <strong class="markup--strong markup--pre-strong">'com.aldebaran:libqi-java-android:sdk-2016-05-16'
</strong>compile <strong class="markup--strong markup--pre-strong">'com.aldebaran:qisdk:0.7'
</strong>compile <strong class="markup--strong markup--pre-strong">'com.aldebaran:qichatplayer:1.0.1'</strong></pre>
<ul class="postList">
<li id="ad4a" class="graf--li graf-after--pre">I set CPU/ABI as x86 and checked “Use Host GPU” under Run/Debug Configuration/AVD option. Make sure to launch the emulator by clicking on the Robot Emulator icon, instead of using a virtual device from the Android Studio AVD Manager.</li>
<li id="bf1b" class="graf--li graf-after--li">When the Robot emulator launches, the Robot Viewer also gets launched.</li>
</ul>
<p id="0217" class="graf--p graf-after--li graf--last">Without an actual robot I was still able to follow the first 3 of <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/tutorials.html" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/tutorials.html" data-wpel-link="external">the tutorials</a>: <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/say_tutorial.html#say-tutorial" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/say_tutorial.html#say-tutorial" data-wpel-link="external">Say “Hello, world!”</a>, <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/goto_tutorial.html#goto-tutorial" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/goto_tutorial.html#goto-tutorial" data-wpel-link="external">Go to one meter forward</a> and <a class="markup--anchor markup--p-anchor" href="https://android.aldebaran.com/doc/elephant_tutorial.html#elephant-tutorial" target="_blank" rel="nofollow external noopener noreferrer" data-href="https://android.aldebaran.com/doc/elephant_tutorial.html#elephant-tutorial" data-wpel-link="external">Mimic the elephant</a>.</p>
<p class="graf--p graf-after--li graf--last">I will share more as I continue to learn about Pepper. Hopefully in the near future, we all can make apps that work with Pepper the humanoid robot.</p>
</div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>NASA Robonaut 2 simulation: Placing an ISS panel in The Construct</title>
		<link>https://robohub.org/nasa-robonaut-2-simulation-placing-an-iss-panel-in-the-construct/</link>
		
		<dc:creator><![CDATA[Ricardo Téllez]]></dc:creator>
		<pubDate>Fri, 24 Jun 2016 16:35:10 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ISS]]></category>
		<category><![CDATA[NASA]]></category>
		<category><![CDATA[The Construct]]></category>
		<guid isPermaLink="false">http://robohub.org/nasa-robonaut-2-simulation-placing-an-iss-panel-in-the-construct/</guid>

					<description><![CDATA[One of the most wanted robot simulations is a robot that can be used for anything. Robonaut is one of this kind. NASA kindly gave this simulation for public use and we though in The Construct that we could use it to make an even better user friendly ve...]]></description>
										<content:encoded><![CDATA[<div id="attachment_63973" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63973" class="size-large wp-image-63973" src="http://robohub.org/wp-content/uploads/2016/06/start-1024x412-1024x412.png" alt="Image: The Construct" width="1024" height="412" srcset="https://robohub.org/wp-content/uploads/2016/06/start-1024x412.png 1024w, https://robohub.org/wp-content/uploads/2016/06/start-1024x412-425x171.png 425w, https://robohub.org/wp-content/uploads/2016/06/start-1024x412-500x201.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63973" class="wp-caption-text">Image: The Construct</p></div>
<p>By <a href="http://www.theconstructsim.com/author/2016-06-22-192633-330172/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Miguel Angel</a></p>
<p>One of the most wanted robot simulations is a robot that can be used for anything. <span class="original-content">Robonaut</span> is one like this. NASA kindly gave this simulation for public use and we thought here in The Construct that we could use it to make an even better user-friendly version. We created a test to demonstrate the possibilities that The Construct has to offer in Space Zero gravity simulations. <span id="more-63950"></span>We also envisioned this as a proof of concept of how The Construct could be used as a platform for competitions such as <span class="original-content">RoboCup</span>, special for Space Exploration themes.</p>
<p>To launch this simulation you simply have to select the Robonaut2 simulation and select the following launch: $r2_robocup_at_space_1.launch</p>
<p>And there you have it! All the technical <span class="original-content">hassle</span> was <span class="original-content">solved</span> by The Construct and you have a ready to use R<span class="original-content">obonaut</span>. This launch will spawn the torso version of Robonaut, with all its controllers in a zero gravity space. It will also spawn a <span class="original-content">taskboard</span> full of functional buttons and switches without the third panel which will be spawned separately. One it&#8217;s done, you should get something like this:</p>
<div id="attachment_63973-2" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63973-2" class="wp-image-63973 size-large" src="http://robohub.org/wp-content/uploads/2016/06/start-1024x412-1024x412.png" alt="Robonaut1" width="1024" height="412" srcset="https://robohub.org/wp-content/uploads/2016/06/start-1024x412.png 1024w, https://robohub.org/wp-content/uploads/2016/06/start-1024x412-425x171.png 425w, https://robohub.org/wp-content/uploads/2016/06/start-1024x412-500x201.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63973-2" class="wp-caption-text">Image: The Construct</p></div>
<p>To check that Robonaut is functioning correctly, it should have its arms in an L shape ready to start moving like in the picture above. Once all is running, please check that the <span class="original-content">taskboard</span> is publishing. The <span class="original-content">taskboard</span> publishes in a topic the state of the switches and buttons in the panel. In this early version, it only tracks the three lower switches and the security switch on the top right-hand corner of the first panel. To check all the <span class="original-content">taskboard</span> systems are working, this is the correct output to the following command in the <span class="original-content">Webshell</span>:</p>
<p>$rostopic info /taskboard/TaskboardPanelA</p>
<p>Type:<br />
gazebo_taskboard/TaskboardPanelA<br />
Publishers: * /taskboard_state_tracker<br />
Subscribers: * /taskboard_systems_actuator</p>
<p>You should see the publisher of the Topic and a subscriber that controls when to activate the magnet that maintains the panel to be placed in position.</p>
<div id="attachment_63974" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63974" class="wp-image-63974 size-large" src="http://robohub.org/wp-content/uploads/2016/06/taskboard_and_panel-1024x410.png" alt="taskboard_and_panel" width="1024" height="410" srcset="https://robohub.org/wp-content/uploads/2016/06/taskboard_and_panel-1024x410.png 1024w, https://robohub.org/wp-content/uploads/2016/06/taskboard_and_panel-425x170.png 425w, https://robohub.org/wp-content/uploads/2016/06/taskboard_and_panel-500x200.png 500w, https://robohub.org/wp-content/uploads/2016/06/taskboard_and_panel.png 1642w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63974" class="wp-caption-text">Image: The Construct</p></div>
<div id="attachment_63975" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63975" class="size-large wp-image-63975" src="http://robohub.org/wp-content/uploads/2016/06/taskboard-1024x413.png" alt="Image: The Construct" width="1024" height="413" srcset="https://robohub.org/wp-content/uploads/2016/06/taskboard-1024x413.png 1024w, https://robohub.org/wp-content/uploads/2016/06/taskboard-425x172.png 425w, https://robohub.org/wp-content/uploads/2016/06/taskboard-500x202.png 500w, https://robohub.org/wp-content/uploads/2016/06/taskboard.png 1643w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63975" class="wp-caption-text">Image: The Construct</p></div>
<div id="attachment_63976" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63976" class="size-large wp-image-63976" src="http://robohub.org/wp-content/uploads/2016/06/taskboard_closeup-1024x409-1024x409.png" alt="Image: The Construct" width="1024" height="409" srcset="https://robohub.org/wp-content/uploads/2016/06/taskboard_closeup-1024x409.png 1024w, https://robohub.org/wp-content/uploads/2016/06/taskboard_closeup-1024x409-425x170.png 425w, https://robohub.org/wp-content/uploads/2016/06/taskboard_closeup-1024x409-500x200.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63976" class="wp-caption-text">Image: The Construct</p></div>
<div id="attachment_63977" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63977" class="size-large wp-image-63977" src="http://robohub.org/wp-content/uploads/2016/06/panel-1024x410-1024x410.png" alt="Image: The Construct" width="1024" height="410" srcset="https://robohub.org/wp-content/uploads/2016/06/panel-1024x410.png 1024w, https://robohub.org/wp-content/uploads/2016/06/panel-1024x410-425x170.png 425w, https://robohub.org/wp-content/uploads/2016/06/panel-1024x410-500x200.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63977" class="wp-caption-text">Image: The Construct</p></div>
<p>Once you are ready just launch the grab and place panel 3 launch:</p>
<div id="attachment_63978" style="width: 647px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63978" class="size-full wp-image-63978" src="http://robohub.org/wp-content/uploads/2016/06/webshell.png" alt="Source: The Construct" width="637" height="138" srcset="https://robohub.org/wp-content/uploads/2016/06/webshell.png 637w, https://robohub.org/wp-content/uploads/2016/06/webshell-425x92.png 425w, https://robohub.org/wp-content/uploads/2016/06/webshell-500x108.png 500w" sizes="(max-width: 637px) 100vw, 637px" /><p id="caption-attachment-63978" class="wp-caption-text">Source: The Construct</p></div>
<p>This will reset the power switch and the panel to their starting positions.<br />
Once done, Robonaut will start moving to grab the panel.</p>
<div id="attachment_63979" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63979" class="size-large wp-image-63979" src="http://robohub.org/wp-content/uploads/2016/06/seq_1-1024x415-1024x415.png" alt="Source: The Construct" width="1024" height="415" srcset="https://robohub.org/wp-content/uploads/2016/06/seq_1-1024x415.png 1024w, https://robohub.org/wp-content/uploads/2016/06/seq_1-1024x415-425x172.png 425w, https://robohub.org/wp-content/uploads/2016/06/seq_1-1024x415-500x203.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63979" class="wp-caption-text">Source: The Construct</p></div>
<div id="attachment_63980" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63980" class="size-large wp-image-63980" src="http://robohub.org/wp-content/uploads/2016/06/seq_2-1024x429-1024x429.png" alt="Source: The Construct" width="1024" height="429" srcset="https://robohub.org/wp-content/uploads/2016/06/seq_2-1024x429.png 1024w, https://robohub.org/wp-content/uploads/2016/06/seq_2-1024x429-425x178.png 425w, https://robohub.org/wp-content/uploads/2016/06/seq_2-1024x429-500x209.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63980" class="wp-caption-text">Source: The Construct</p></div>
<div id="attachment_63981" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63981" class="size-large wp-image-63981" src="http://robohub.org/wp-content/uploads/2016/06/seq_6-1024x427-1024x427.png" alt="Source: The Construct" width="1024" height="427" srcset="https://robohub.org/wp-content/uploads/2016/06/seq_6-1024x427.png 1024w, https://robohub.org/wp-content/uploads/2016/06/seq_6-1024x427-425x177.png 425w, https://robohub.org/wp-content/uploads/2016/06/seq_6-1024x427-500x208.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63981" class="wp-caption-text">Source: The Construct</p></div>
<p>Once grabbed, it will place it just in front of the desired spot.</p>
<div id="attachment_63982" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63982" class="size-large wp-image-63982" src="http://robohub.org/wp-content/uploads/2016/06/seq_10-1024x420-1024x420.png" alt="Source: The Construct" width="1024" height="420" srcset="https://robohub.org/wp-content/uploads/2016/06/seq_10-1024x420.png 1024w, https://robohub.org/wp-content/uploads/2016/06/seq_10-1024x420-425x174.png 425w, https://robohub.org/wp-content/uploads/2016/06/seq_10-1024x420-500x205.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63982" class="wp-caption-text">Source: The Construct</p></div>
<p>Then it will activate the magnet by firstly opening the security lid and then activating the power switches. Once activated, the panel will receive a force that will hopefully place it inside the taskboard.</p>
<div id="attachment_63983" style="width: 1034px" class="wp-caption aligncenter"><img decoding="async" aria-describedby="caption-attachment-63983" class="size-large wp-image-63983" src="http://robohub.org/wp-content/uploads/2016/06/sw_0-1024x346-1024x346.png" alt="Source: The Construct" width="1024" height="346" srcset="https://robohub.org/wp-content/uploads/2016/06/sw_0-1024x346.png 1024w, https://robohub.org/wp-content/uploads/2016/06/sw_0-1024x346-425x144.png 425w, https://robohub.org/wp-content/uploads/2016/06/sw_0-1024x346-500x169.png 500w" sizes="(max-width: 1024px) 100vw, 1024px" /><p id="caption-attachment-63983" class="wp-caption-text">Source: The Construct</p></div>
<p>This launch can be executed as many time as you like, so that there is no need of relaunching the simulation every time. There are other features that you might want to explore like the “model_destination_validator.py” which you can use to evaluate correct placing of objects based on their relative position to prior placed markers. Very useful for unsupervised learning and competitions.</p>
<p>Here is a full-length demo:</p>
<p>https://www.youtube.com/watch?v=QABa4pbk4qs</p>
<p>Come on, try it! We would love to see intelligent algorithms and systems to make <span class="original-content">Robonaut </span>work as a charm!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create a ROS sensor plugin for Gazebo</title>
		<link>https://robohub.org/create-a-ros-sensor-plugin-for-gazebo/</link>
		
		<dc:creator><![CDATA[Ricardo Téllez]]></dc:creator>
		<pubDate>Thu, 07 Jan 2016 21:35:34 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Gazebo]]></category>
		<category><![CDATA[ROS]]></category>
		<guid isPermaLink="false">http://robohub.org/create-a-ros-sensor-plugin-for-gazebo/</guid>

					<description><![CDATA[There are magnificent tutorials about how to create plugins for Gazebo in the GazeboSim webpage. There are even some tutorials about how to create plugins for Gazebo + ROS. Those tutorials show that there are several types of plugins (world, model, sensor, system, visual), and indicate how to create a plugin for&#160;a world type plugin. [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" class="aligncenter size-full wp-image-58133" src="http://robohub.org/wp-content/uploads/2015/05/ROS_Plugin_Sensor_Gazebo.jpg" alt="ROS_Plugin_Sensor_Gazebo" width="1000" height="522" srcset="https://robohub.org/wp-content/uploads/2015/05/ROS_Plugin_Sensor_Gazebo.jpg 1000w, https://robohub.org/wp-content/uploads/2015/05/ROS_Plugin_Sensor_Gazebo-425x222.jpg 425w, https://robohub.org/wp-content/uploads/2015/05/ROS_Plugin_Sensor_Gazebo-500x261.jpg 500w" sizes="(max-width: 1000px) 100vw, 1000px" />
<p>There are magnificent <a href="http://gazebosim.org/tutorials?cat=write_plugin" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">tutorials about how to create plugins for Gazebo</a> in the GazeboSim webpage. There are even some tutorials about how to create <a href="http://www.gazebosim.org/tutorials?tut=ros_plugins&amp;cat=connect_ros" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">plugins for Gazebo + ROS,</a> which show that there are several types of plugins (world, model, sensor, system, visual), and indicate how to create a plugin for a world-type plugin. But I recently I needed to create a plugin for a light detector and couldn&#8217;t find a concrete example. Here&#8217;s a how-to post showing you how I did it.<span id="more-56656"></span></p>
<h2>How to: light sensor plugin in Gazebo</h2>
<p>Following the indications provided at the answers forum of <em>Gazebo</em>, I decided to build a very simple light detector sensor based on a camera. Instead of using a <em>raytracing</em> algorithm from lights, the idea is to use a camera to capture an image, then use the image to calculate the illuminance of the image, and then publish that illuminance value through a ROS topic.</p>
<p>Since the plugin is meant to be used with ROS, the whole plugin should be compilable using ROS environment.</p>
<h2>Creating a ROS package for the plugin</h2>
<p>First we need to create the package in our catkin workspace that will allow us to compile the plugin without a problem.</p>
<pre><code class="prettyprint prettyprinted"><span class="pln">cd </span><span class="pun">~/</span><span class="pln">catkin_ws/src
catkin_create</span><span class="pun">-</span><span class="pln">pkg gazebo_light_sensor_plugin gazebo_ros roscpp</span></code></pre>
<h2>Creating the plugin code</h2>
<p>For this purpose, since we are using a camera to capture the light, we are going to create a plugin class that inherits from the CameraPlugin. The code that follows has been created taking as guideline the code of the authentic <a href="https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_plugins/src/gazebo_ros_camera.cpp" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">gazebo ROS camera plugin</a>.</p>
<p>Create a file called <em>light_sensor_plugin.h</em> inside the <strong>include</strong> directory of your package, including the following code:</p>
<pre><code class="prettyprint prettyprinted"><span class="pln">#ifndef GAZEBO_ROS_LIGHT_SENSOR_HH
#define GAZEBO_ROS_LIGHT_SENSOR_HH

#include &lt;string&gt;

// library for processing camera data for gazebo / ros conversions
#include &lt;gazebo/plugins/CameraPlugin.hh&gt;

#include &lt;gazebo_plugins/gazebo_ros_camera_utils.h&gt;

namespace gazebo
{
class GazeboRosLight : public CameraPlugin, GazeboRosCameraUtils
{
/// brief Constructor
/// param parent The parent entity, must be a Model or a Sensor
public: GazeboRosLight();

/// brief Destructor
public: ~GazeboRosLight();

/// brief Load the plugin
/// param take in SDF root element
public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);

/// brief Update the controller
protected: virtual void OnNewFrame(const unsigned char *_image,
unsigned int _width, unsigned int _height,
unsigned int _depth, const std::string &amp;_format);

ros::NodeHandle _nh;
ros::Publisher _sensorPublisher;

double _fov;
double _range;
};
}
#endif

</span></code></pre>
<p>As you can see, the code includes a node handler to connect to the <em>roscore</em>. It also defines a publisher that will publish messages containing the illuminance value. Two parameters have been defined: <em>fov</em> (field of view) and <em>range</em>. At present only <em>fov</em> is used to indicate the amount of pixels around the center of the image that will be taken into account to calculate the illuminance.</p>
<p>Then create a file named <em>light_sensor_plugin.cpp</em> containing the following code in the <strong><em>src</em></strong> directory of your package:</p>
<pre><code class="prettyprint prettyprinted"><span class="pln">#include &lt;gazebo/common/Plugin.hh&gt;
#include &lt;ros/ros.h&gt;
#include "/home/rtellez/iri-lab/iri_ws/src/gazebo_light_sensor_plugin/include/light_sensor_plugin.h"

#include "gazebo_plugins/gazebo_ros_camera.h"

#include &lt;string&gt;

#include &lt;gazebo/sensors/Sensor.hh&gt;
#include &lt;gazebo/sensors/CameraSensor.hh&gt;
#include &lt;gazebo/sensors/SensorTypes.hh&gt;

#include &lt;sensor_msgs/Illuminance.h&gt;

namespace gazebo
{
 // Register this plugin with the simulator
 GZ_REGISTER_SENSOR_PLUGIN(GazeboRosLight)

 ////////////////////////////////////////////////////////////////////////////////
 // Constructor
 GazeboRosLight::GazeboRosLight():
 _nh("light_sensor_plugin"),
 _fov(6),
 _range(10)
 {
 _sensorPublisher = _nh.advertise&lt;sensor_msgs::Illuminance&gt;("lightSensor", 1);
 }

 ////////////////////////////////////////////////////////////////////////////////
 // Destructor
 GazeboRosLight::~GazeboRosLight()
 {
 ROS_DEBUG_STREAM_NAMED("camera","Unloaded");
 }

 void GazeboRosLight::Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
 {
 // Make sure the ROS node for Gazebo has already been initialized
 if (!ros::isInitialized())
 {
 ROS_FATAL_STREAM("A ROS node for Gazebo has not been initialized, unable to load plugin. "
 &lt;&lt; "Load the Gazebo system plugin 'libgazebo_ros_api_plugin.so' in the gazebo_ros package)");
 return;
 }

 CameraPlugin::Load(_parent, _sdf);
 // copying from CameraPlugin into GazeboRosCameraUtils
 this-&gt;parentSensor_ = this-&gt;parentSensor;
 this-&gt;width_ = this-&gt;width;
 this-&gt;height_ = this-&gt;height;
 this-&gt;depth_ = this-&gt;depth;
 this-&gt;format_ = this-&gt;format;
 this-&gt;camera_ = this-&gt;camera;

 GazeboRosCameraUtils::Load(_parent, _sdf);
 }

 ////////////////////////////////////////////////////////////////////////////////
 // Update the controller
 void GazeboRosLight::OnNewFrame(const unsigned char *_image,
 unsigned int _width, unsigned int _height, unsigned int _depth,
 const std::string &amp;_format)
 {
 static int seq=0;

 this-&gt;sensor_update_time_ = this-&gt;parentSensor_-&gt;GetLastUpdateTime();

 if (!this-&gt;parentSensor-&gt;IsActive())
 {
 if ((*this-&gt;image_connect_count_) &gt; 0)
 // do this first so there's chance for sensor to run once after activated
 this-&gt;parentSensor-&gt;SetActive(true);
 }
 else
 {
 if ((*this-&gt;image_connect_count_) &gt; 0)
 {
 common::Time cur_time = this-&gt;world_-&gt;GetSimTime();
 if (cur_time - this-&gt;last_update_time_ &gt;= this-&gt;update_period_)
 {
 this-&gt;PutCameraData(_image);
 this-&gt;PublishCameraInfo();
 this-&gt;last_update_time_ = cur_time;

 sensor_msgs::Illuminance msg;
 msg.header.stamp = ros::Time::now();
 msg.header.frame_id = "";
 msg.header.seq = seq;

 int startingPix = _width * ( (int)(_height/2) - (int)( _fov/2)) - (int)(_fov/2);

 double illum = 0;
 for (int i=0; i&lt;_fov ; ++i)
 {
 int index = startingPix + i*_width;
 for (int j=0; j&lt;_fov ; ++j)
 illum += _image[index+j];
 }

 msg.illuminance = illum/(_fov*_fov);
 msg.variance = 0.0;

 _sensorPublisher.publish(msg);

 seq++;
 }
 }
 }
 }
}

</span></code></pre>
<p>That is the code that calculates, in a very basic form, the illuminance.</p>
<h2>Create a CMakeLists.txt</h2>
<p>Copy the following code in your <em>CMakeLists.txt</em></p>
<pre><code>cmake_minimum_required(VERSION 2.8.3)
project(gazebo_light_sensor_plugin)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
roscpp
gazebo_ros
)

# Depend on system install of Gazebo
find_package(gazebo REQUIRED)

link_directories(${GAZEBO_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})

add_library(${PROJECT_NAME} src/light_sensor_plugin.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES} CameraPlugin)

catkin_package(
DEPENDS
roscpp
gazebo_ros
)
</code></pre>
<h2>Update the package.xml</h2>
<p>Now you need to include the following line in your <em>package.xml</em>, between the tags <em>&lt;export&gt;&lt;/export&gt;</em></p>
<p><code class="prettyprint prettyprinted"><span class="tag">&lt;gazebo_ros</span> <span class="atn">plugin_path</span><span class="pun">=</span><span class="atv">"${prefix}/lib"</span> <span class="atn">gazebo_media_path</span><span class="pun">=</span><span class="atv">"${prefix}"</span> <span class="tag">/&gt;</span></code></p>
<p>Now you are ready to <strong>compile the plugin</strong>. Compilation should generate the library containing the plugin inside your building directory.</p>
<h2>Create a world file</h2>
<p>Below is an example of a world file that includes the plugin. Save this code in a file named <em>light.world</em> inside the directory <em>worlds</em> of your package. This world file simply loads the camera with its plugin, so it might be a bit ugly, but it will be good enough for your tests. Feel free to add more elements and models in the world file.</p>
<pre><code>&lt;?xml version="1.0" ?&gt;
&lt;sdf version="1.4"&gt;
 &lt;world name="default"&gt;
 &lt;include&gt;
 &lt;uri&gt;model://ground_plane&lt;/uri&gt;
 &lt;/include&gt;

 &lt;include&gt;
 &lt;uri&gt;model://sun&lt;/uri&gt;
 &lt;/include&gt;

 &lt;!-- reference to your plugin --&gt;
 &lt;model name='camera'&gt;
 &lt;pose&gt;0 -1 0.05 0 -0 0&lt;/pose&gt;
 &lt;link name='link'&gt;
 &lt;inertial&gt;
 &lt;mass&gt;0.1&lt;/mass&gt;
 &lt;inertia&gt;
 &lt;ixx&gt;1&lt;/ixx&gt;
 &lt;ixy&gt;0&lt;/ixy&gt;
 &lt;ixz&gt;0&lt;/ixz&gt;
 &lt;iyy&gt;1&lt;/iyy&gt;
 &lt;iyz&gt;0&lt;/iyz&gt;
 &lt;izz&gt;1&lt;/izz&gt;
 &lt;/inertia&gt;
 &lt;/inertial&gt;
 &lt;collision name='collision'&gt;
 &lt;geometry&gt;
 &lt;box&gt;
 &lt;size&gt;0.1 0.1 0.1&lt;/size&gt;
 &lt;/box&gt;
 &lt;/geometry&gt;
 &lt;max_contacts&gt;10&lt;/max_contacts&gt;
 &lt;surface&gt;
 &lt;contact&gt;
 &lt;ode/&gt;
 &lt;/contact&gt;
 &lt;bounce/&gt;
 &lt;friction&gt;
 &lt;ode/&gt;
 &lt;/friction&gt;
 &lt;/surface&gt;
 &lt;/collision&gt;
 &lt;visual name='visual'&gt;
 &lt;geometry&gt;
 &lt;box&gt;
 &lt;size&gt;0.1 0.1 0.1&lt;/size&gt;
 &lt;/box&gt;
 &lt;/geometry&gt;
 &lt;/visual&gt;
 &lt;sensor name='camera' type='camera'&gt;
 &lt;camera name='__default__'&gt;
 &lt;horizontal_fov&gt;1.047&lt;/horizontal_fov&gt;
 &lt;image&gt;
 &lt;width&gt;320&lt;/width&gt;
 &lt;height&gt;240&lt;/height&gt;
 &lt;/image&gt;
 &lt;clip&gt;
 &lt;near&gt;0.1&lt;/near&gt;
 &lt;far&gt;100&lt;/far&gt;
 &lt;/clip&gt;
 &lt;/camera&gt;
 &lt;plugin name="gazebo_light_sensor_plugin" filename="libgazebo_light_sensor_plugin.so"&gt;
 &lt;cameraName&gt;camera&lt;/cameraName&gt;
 &lt;alwaysOn&gt;true&lt;/alwaysOn&gt;
 &lt;updateRate&gt;10&lt;/updateRate&gt;
 &lt;imageTopicName&gt;rgb/image_raw&lt;/imageTopicName&gt;
 &lt;depthImageTopicName&gt;depth/image_raw&lt;/depthImageTopicName&gt;
 &lt;pointCloudTopicName&gt;depth/points&lt;/pointCloudTopicName&gt;
 &lt;cameraInfoTopicName&gt;rgb/camera_info&lt;/cameraInfoTopicName&gt;
 &lt;depthImageCameraInfoTopicName&gt;depth/camera_info&lt;/depthImageCameraInfoTopicName&gt;
 &lt;frameName&gt;camera_depth_optical_frame&lt;/frameName&gt;
 &lt;baseline&gt;0.1&lt;/baseline&gt;
 &lt;distortion_k1&gt;0.0&lt;/distortion_k1&gt;
 &lt;distortion_k2&gt;0.0&lt;/distortion_k2&gt;
 &lt;distortion_k3&gt;0.0&lt;/distortion_k3&gt;
 &lt;distortion_t1&gt;0.0&lt;/distortion_t1&gt;
 &lt;distortion_t2&gt;0.0&lt;/distortion_t2&gt;
 &lt;pointCloudCutoff&gt;0.4&lt;/pointCloudCutoff&gt;
 &lt;robotNamespace&gt;/&lt;/robotNamespace&gt;
 &lt;/plugin&gt;
 &lt;/sensor&gt;
 &lt;self_collide&gt;0&lt;/self_collide&gt;
 &lt;kinematic&gt;0&lt;/kinematic&gt;
 &lt;gravity&gt;1&lt;/gravity&gt;
 &lt;/link&gt;
 &lt;/model&gt;
 &lt;/world&gt;
&lt;/sdf&gt;

</code></pre>
<h2>Create a launch file</h2>
<p>Now comes the final step: to create a launch that will upload everything for you. Save the following code as <em>main.launch</em> inside the <em>launch</em> directory of your package.</p>
<pre><code>&lt;launch&gt;
 &lt;!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched --&gt;
 &lt;include file="$(find gazebo_ros)/launch/empty_world.launch"&gt;
 &lt;arg name="verbose" value="true"/&gt;
 &lt;arg name="world_name" value="$(find gazebo_light_sensor_plugin)/worlds/light.world"/&gt;
 &lt;!-- more default parameters can be changed here --&gt;
 &lt;/include&gt;
 &lt;/launch&gt;</code></pre>
<h2>Ready to run!</h2>
<p>Now launch the world. Be sure that a roscore is running or your machine, and that the GAZEBO_PLUGIN_PATH environment var includes the path to the new plugin.</p>
<p>Now execute the following command:</p>
<pre><code>roslaunch gazebo_light_sensor_plugin main.launch</code></pre>
<p>You can see what the camera is observing by running the following command:</p>
<pre><code>rosrun image_view image_view image:=/camera/rgb/image_raw</code></pre>
<img decoding="async" class="aligncenter size-full wp-image-58136" src="http://robohub.org/wp-content/uploads/2015/05/Screenshot-from-2015-05-20-173457.png" alt="Screenshot-from-2015-05-20-173457" width="319" height="273" />
<div style="clear:both"></div>
<p>You can also have the value of luminance by watching the published topic:</p>
<pre><code>rostopic echo /gazebo_light_sensor_plugin/lightSensor</code></pre>
<p>&nbsp;</p>
<h2><img decoding="async" class="aligncenter size-full wp-image-58135" src="http://robohub.org/wp-content/uploads/2015/05/Screenshot-from-2015-05-20-173532.png" alt="Screenshot-from-2015-05-20-173532" width="205" height="165" /></h2>
<div style="clear:both"></div>
<h2>Conclusion</h2>
<p>Now you have a plugin for your Gazebo simulations that can measure (very roughly) the light detected. You can use it in you local copy of Gazebo or even inside The Construct.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to calculate a robot&#8217;s forward kinematics in 5 easy steps</title>
		<link>https://robohub.org/how-to-calculate-a-robots-forward-kinematics-in-5-easy-steps/</link>
		
		<dc:creator><![CDATA[Alex Owen-Hill]]></dc:creator>
		<pubDate>Wed, 25 Nov 2015 19:48:00 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/how-to-calculate-a-robots-forward-kinematics-in-5-easy-steps/</guid>

					<description><![CDATA[<div> 
 <a href="http://blog.robotiq.com/how-to-calculate-a-robots-forward-kinematics-in-5-easy-steps" title="" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"> <img src="http://blog.robotiq.com/hubfs/hd_diagram.jpg"></a> 
</div>    
<p><strong>Calculating the Forward Kinematics is often a vital first step to using a new robot in research. While there are some good tutorials available online, up until now there hasn't been a simple step-b</strong><strong>y-step guide for calculating Forward Kinematics. In this post, we provide a simple guide along with some tips on calculating the kinematics of any robotic manipulator.</strong></p> 
<p><strong></strong></p>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="aligncenter size-full wp-image-56700" src="http://robohub.org/wp-content/uploads/2015/11/forward_kinematics.jpg" alt="forward_kinematics" width="900" height="600" srcset="https://robohub.org/wp-content/uploads/2015/11/forward_kinematics.jpg 900w, https://robohub.org/wp-content/uploads/2015/11/forward_kinematics-425x283.jpg 425w, https://robohub.org/wp-content/uploads/2015/11/forward_kinematics-450x300.jpg 450w" sizes="(max-width: 900px) 100vw, 900px" />Calculating the forward kinematics is often a vital first step to using a new robot in research. While there are some good tutorials available online, up until now there hasn&#8217;t been a simple step-by-step guide for calculating forward kinematics. In this post, we provide a simple guide along with some tips on calculating the kinematics of any robotic manipulator.<span id="more-56684"></span></p>
<p>Calculating kinematics is a cornerstone skill for robotics engineers.  <a href="http://blog.robotiq.com/kinematics-why-robots-move-like-they-do" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Kinematics can sometimes be a pain,</a> however, being told to &#8220;go and calculate the Forward Kinematics&#8221; is almost robotics research shorthand for &#8220;go and get familiar with this robot&#8221;. It&#8217;s the vital first step when using any new robot in research, particularly for manipulators.</p>
<p>Even though I had learned the theory of kinematics in university, it wasn&#8217;t until I had calculated various kinematic solutions for a few real research robots that the whole process started to feel intuitive. Even then, because I was not calculating kinematics every day I had to go back to my notes to &#8220;remind myself&#8221; how to do it every time. It would have been really helpful to have a step-by-step guide to remind myself which stages to go through, without having to read through hundreds of pages of academically written equations in text books. A sort of kinematics &#8220;cheat sheet&#8221; would have been useful.</p>
<p>This post is exactly that sort of cheat sheet. For now, we&#8217;ll primarily focus on the Devanit-Hartenberg (DH) approach to forward kinematics, as it&#8217;s the most common, and we&#8217;ll get to inverse kinematics in a future post.</p>
<p>&nbsp;</p>
<p><strong>Step 1: Get a Pencil and Paper</strong></p>
<img decoding="async" class="alignleft size-medium wp-image-56697" src="http://robohub.org/wp-content/uploads/2015/11/kinematics-425x313.png" alt="kinematics" width="425" height="313" srcset="https://robohub.org/wp-content/uploads/2015/11/kinematics-425x313.png 425w, https://robohub.org/wp-content/uploads/2015/11/kinematics-408x300.png 408w, https://robohub.org/wp-content/uploads/2015/11/kinematics.png 496w" sizes="(max-width: 425px) 100vw, 425px" />
<p>It can be tempting to jump straight for the computer when starting out with a new robot. However, even if the robot looks like a &#8220;standard&#8221; 6R manipulator, I always sit down with a pencil and paper to draw out the kinematic diagram. This simple task forces you to carefully consider the actual physical configuration of the robot, avoiding false assumptions that can wreak havoc later on during coding.</p>
<p>There are various ways to draw a kinematic chain. Pick whichever style you prefer. I favor simple cylinders for the revolute joints and lines for the links. Do a Google Image Search for <a href="https://www.google.com/search?newwindow=1&amp;site=&amp;tbm=isch&amp;source=hp&amp;biw=1366&amp;bih=667&amp;q=kinematic+diagram&amp;oq=kinematic+diagram&amp;gs_l=img.3..0l4j0i30l3j0i8i30j0i24l2.1858.8878.0.9132.17.15.0.0.0.0.296.1733.0j5j4.9.0....0...1.1.64.img..8.9.1721.saMLURuVAKo" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">&#8220;kinematic diagram&#8221;</a> and see some of the different styles available.</p>
<p>As you draw, work out which way each joint moves and draw this motion as double-ended arrows onto the diagram.</p>
<p>&nbsp;<br />
<strong>Step 2: Figure Out Your Axes</strong></p>
<p>The next key step is to draw the axes onto each joint. The DH approach assigns a different axis to each movable joint.</p>
<p>If you set up your axes correctly then working with the robot will be easy. Set them up incorrectly and you will suffer countless headaches. These axes will be required by simulators, inverse kinematic solvers, and even other researchers (nobody wants to solve a forward kinematic problem if someone else has already done it).</p>
<p>The z-axis should lie on the axis of rotation, for a revolute joint, or axis of extension, for a prismatic joint. The x-axis should lie along the &#8220;common normal&#8221;, which is the shortest orthogonal line between the previous z-axis and the current z-axis. Have a look at the video below to see how to set them up:</p>
<div class="keep-aspect"><iframe title="Denavit-Hartenberg Reference Frame Layout" width="500" height="281" src="https://www.youtube-nocookie.com/embed/rA9tm0gTln8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>Personally, I draw the axes using the following coloring: <strong>z-axis (blue)</strong>, <strong>x-axis (red)</strong> and <strong>y-axis (green)</strong>. This is the coloring scheme <a href="http://wiki.ros.org/rviz/DisplayTypes/Axes" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">that&#8217;s used in the RViz visualizer</a> from ROS. Back in my undergraduate days, our lecturer made an axis &#8220;sculpture&#8221; out of three colored straws stuck into a sphere of blue-tack to explain the theory to us. Though this might seem a bit &#8220;playschool,&#8221; it can sometimes actually be helpful as you can position the sculpture next to the physical robot to make sure you&#8217;ve got the axes pointing in the right direction. For a virtual version of this, check out <a href="http://twist-and-shout.appspot.com/#0_0_0_0_0_1_0_0_0_0" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">this interactive tool</a>.</p>
<p>&nbsp;</p>
<h2>Step 3: Remember Your End Effector</h2>
<img decoding="async" class="alignleft size-medium wp-image-56698" src="http://robohub.org/wp-content/uploads/2015/11/Robotiq_gripper_kinematics-385x425.jpg" alt="Robotiq_gripper_kinematics" width="385" height="425" srcset="https://robohub.org/wp-content/uploads/2015/11/Robotiq_gripper_kinematics-385x425.jpg 385w, https://robohub.org/wp-content/uploads/2015/11/Robotiq_gripper_kinematics-272x300.jpg 272w, https://robohub.org/wp-content/uploads/2015/11/Robotiq_gripper_kinematics.jpg 728w" sizes="(max-width: 385px) 100vw, 385px" />
<p>The goal of calculating the forward kinematics is to be able to calculate the end effector pose from the position of the joints.</p>
<p>Most forward kinematic tutorials will generalize the end effector as a single distance from the final joint. This is fine for a simple &#8220;open-close&#8221; gripper. However, as modern grippers are often more complicated than this, it&#8217;s worth considering how the end effector operates. The Robotiq 3-Fingered Adaptive Gripper, for example, has a few different gripping modes. Each mode will correspond to a slightly different desired end effector pose. You should consider the end effector carefully when formulating the kinematic model.</p>
<p><div style="clear:both"></div><br />
&nbsp;</p>
<h2>Step 4: Calculate the DH parameters</h2>
<p>Denavit-Hartenberg parameters are often required to enter the robot model into a simulator and start performing any sort of analysis on it.</p>
<p>The best way to visualize the DH parameters is to once again watch the video above. Have a look one more time with the DH parameters in mind.</p>
<p>The DH parameters break down each joint of the robot into four parameters, each taken with reference to the previous joint. They are calculated in reference to the &#8220;common normal&#8221; described above. Note that if the previous z-axis intersects the current z-axis, which is often the case, the common normal has a length of zero.</p>
<ul>
<li><strong><em>d</em></strong> &#8211; the distance between the previous x-axis and the current x-axis, along the common normal</li>
<li><strong><em>θ</em></strong> &#8211; the angle around the z-axis between the previous x-axis and current x-axis.</li>
<li><strong>a (or r)</strong> &#8211; the length of the common normal</li>
<li><strong>α</strong> &#8211; the angle around the common normal to between the previous z-axis and current z-axis.</li>
</ul>
<p>Go through each joint on your drawing and write down the DH parameters for each joint. Each joint should have one value, which is a variable representing the actuated joint. For a more detailed explanation and some examples, I recommend <a href="http://petercorke.com/doc/rtb_dh.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">this handout by Peter Corke</a> or <a href="http://www.roboanalyzer.com/uploads/2/5/8/8/2588919/dhparams.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">this chapter from Introduction to Robotics</a>.</p>
<p><strong>Alternatives to the DH parameters &#8212; </strong>The DH approach is the most common approach to forward kinematics, but it&#8217;s not perfect. <a href="http://robotics.stackexchange.com/questions/4610/forward-kinematics-d-h-parameters-for-perpendicular-joint-axes" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">One of its failings is</a> that it doesn&#8217;t handle parallel z-axes very elegantly. There are various alternatives, including Screw Theory representations, Hayati-Roberts and other geometric modelings (<a href="http://www.superior.edu.pk/CEET/pdf/research/DevCS/Paper-Modeling%20Robotic%20Arms-iqbal.jam@gmail.com.pdf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">see this paper for a comparison</a>). Although these may (or may not) be better approaches, most of the kinematic libraries below do accept the DH parameters, and for that reason it&#8217;s a reasonable approach to begin with.</p>
<p>&nbsp;</p>
<h2>Step 5: Choose Your Library</h2>
<p>There are loads of kinematic software libraries, and many of them do far more than just calculate forward kinematics. Most of them include inverse kinematic solvers, dynamics, visualization, motion planning and collision detection, to name just a few features. These libraries will transform your DH parameters into matrices, which are then multiplied together to calculate the relationship between joint positions and end effector pose.</p>
<p>Of course, you can also quite easily &#8220;roll your own&#8221; forward kinematic library using your favorite programming language, if you&#8217;re inclined that way. I&#8217;ve taken this approach myself, but apart from being a good learning exercise it didn&#8217;t offer many more benefits than using an existing library.</p>
<p>Some good development libraries include: <a href="http://www.roboticslibrary.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Robotics Library</a>, <a href="http://www.orocos.org/kdl" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Orocos Kinematics and Dynamics Library</a>, <a href="http://moveit.ros.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS MoveIt</a>, <a href="http://openrave.org/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">OpenRave</a>, <a href="http://www.roboanalyzer.com/tutorials.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">RoboAnalyzer</a> and the <a href="http://petercorke.com/Robotics_Toolbox.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Matlab Robotics Toolbox</a>.</p>
<p>Even though you&#8217;ll usually require inverse kinematics to actually control the robot, computing the forward kinematics is a necessary step to get familiar with any new robotic arm. If you found this post useful, make sure to bookmark it so you can find it when you next encounter a new robot!</p>
<p><em>What is your favorite method of getting familiar with a new robot&#8217;s kinematics? Do you prefer another method over the DH parameters? Have you got any questions on implementing Forward Kinematics in your research robot? Tell us in the comments below.</em></p>
<hr class="xh2  ">
<p><em>Enjoy this post? Find more <a href="http://robohub.org/tag/tutorial/" data-wpel-link="internal">tutorials and robotics how-tos here</a>. </em></p>
<img decoding="async" style="min-height: 1px!important; width: 1px!important; border-width: 0!important; padding: 0!important; margin: 0!important;" src="http://track.hubspot.com/__ptq.gif?a=13401&amp;k=14&amp;r=http%3A%2F%2Fblog.robotiq.com%2Fhow-to-calculate-a-robots-forward-kinematics-in-5-easy-steps&amp;bu=http%253A%252F%252Fblog.robotiq.com&amp;bvt=rss" alt="" width="1" height="1" />
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Simulating in MapleSim</title>
		<link>https://robohub.org/simulating-in-maplesim/</link>
		
		<dc:creator><![CDATA[Clearpath Robotics]]></dc:creator>
		<pubDate>Tue, 19 May 2015 18:07:29 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Simulation]]></category>
		<guid isPermaLink="false">http://robohub.org/simulating-in-maplesim/</guid>

					<description><![CDATA[<p>By Ilia Baranov A couple&#160;challenges&#160;with robotics is that robots are expensive and they usually depend on batteries. What if you want to run an experiment with 100 robots, running for 10 hours? To help answer this question,&#160;ROS has built in support for robot simulation in the form of Gazebo. While this works quite well, it [&#8230;]</p>
<p>The post <a rel="nofollow external noopener noreferrer" href="http://www.clearpathrobotics.com/blog/simulating-clearpath-robots-in-maplesim/" data-wpel-link="external" target="_blank">Simulating Clearpath Robots in MapleSim</a> appeared first on <a rel="nofollow external noopener noreferrer" href="http://www.clearpathrobotics.com/" data-wpel-link="external" target="_blank">Clearpath Robotics Inc.</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><em><img decoding="async" class="aligncenter size-full wp-image-49728" src="http://robohub.org/wp-content/uploads/2015/05/maplesim.png" alt="maplesim" width="700" height="323" srcset="https://robohub.org/wp-content/uploads/2015/05/maplesim.png 700w, https://robohub.org/wp-content/uploads/2015/05/maplesim-425x196.png 425w, https://robohub.org/wp-content/uploads/2015/05/maplesim-500x231.png 500w" sizes="(max-width: 700px) 100vw, 700px" />By Ilia Baranov</em></p>
<p>Robots are expensive and they usually depend on batteries. What if you want to run an experiment with 100 robots, running for 10 hours? To help answer this question, ROS has built in support for robot simulation in the form of Gazebo. While this works quite well, it is currently unable to simulate physical properties like batteries, temperature, surface roughness. If your robotics research depends on accurate models, you may want to consider looking at MapleSim® 2015 – a high performance physical modeling and simulation tool developed by Maplesoft<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />.<span id="more-49656"></span><span id="more-4153"></span></p>
<p>Below we can see a video of the <a title="Grizzly" href="http://clearpathrobotics.com/grizzly" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Grizzly RUV</a> taking an open loop control path around a surface. Elements like current and voltage provided by the batteries, surface slipperiness and weight distribution all play a role in where the Grizzly actually ends up. To see what we’re referring to, watch the quick simulation video below:</p>
<p>https://youtu.be/dnhotIAyYBk</p>
<p>The MapleSim model features a 200 Ah lead-acid battery pack with a nominal voltage of 48 V, similar to the Type B battery pack used in the robot, to provide electrical power to move the vehicle on an uneven terrain. The lead acid battery used in the model is part of MapleSim’s Battery Component Library. The physical behaviors of the battery are described by mathematical expressions curve-fitted based on experiment measurements to provide the accurate battery voltage and state of charge during the operations of the robot.</p>
<p>The interaction forces and moments at the tire-terrain contact points are generated based on a 3D tire model. A 3D mathematical expression is used to describe the terrain surface to allow the tire-terrain contact points to be calculated based on the position of the vehicle. This 3D function is also used to generate the STL graphics of the terrain for animation (see Figure 1).</p>
<p>The model also outputs electric motor torques, speeds, and battery state of charge as shown below:</p>
<img decoding="async" class="aligncenter size-full wp-image-49723" src="http://robohub.org/wp-content/uploads/2015/05/Results_window-1024x619.png" alt="Results_window-1024x619" width="1024" height="619" srcset="https://robohub.org/wp-content/uploads/2015/05/Results_window-1024x619.png 1024w, https://robohub.org/wp-content/uploads/2015/05/Results_window-1024x619-425x257.png 425w, https://robohub.org/wp-content/uploads/2015/05/Results_window-1024x619-496x300.png 496w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>Setting up the simulation involves using the Grizzly RUV MapleSim model, available at the bottom of this post. The graphical representation is easy to understand and also quick to modify.</p>
<img decoding="async" class="aligncenter size-full wp-image-49726" src="http://robohub.org/wp-content/uploads/2015/05/unnamed.png" alt="unnamed" width="623" height="543" srcset="https://robohub.org/wp-content/uploads/2015/05/unnamed.png 623w, https://robohub.org/wp-content/uploads/2015/05/unnamed-425x370.png 425w, https://robohub.org/wp-content/uploads/2015/05/unnamed-344x300.png 344w" sizes="(max-width: 623px) 100vw, 623px" />
<p>&nbsp;</p>
<p>Maple and MapleSim provide a testing and analysis environment based on the virtual prototypes of the model. A number of analysis can be performed:</p>
<ul>
<li><strong><em>Virtual testing and analysis:</em></strong> an engineer can easily test the operations of the robot for any design in a virtual environment through simulations in MapleSim. Using Maple, different terrain surface conditions and tire force models to fit different test scenarios can be generated. As an example, the plot below shows different battery energy consumption (state of charge) rates under different terrain conditions.</li>
</ul>
<img decoding="async" class="aligncenter size-full wp-image-49725" src="http://robohub.org/wp-content/uploads/2015/05/graph.png" alt="graph" width="723" height="451" srcset="https://robohub.org/wp-content/uploads/2015/05/graph.png 723w, https://robohub.org/wp-content/uploads/2015/05/graph-425x265.png 425w, https://robohub.org/wp-content/uploads/2015/05/graph-481x300.png 481w" sizes="(max-width: 723px) 100vw, 723px" />
<ul>
<li><strong><em>Battery optimization:</em></strong> the developed MapleSim model can be coupled with Maple’s powerful optimization toolboxes to determine the optimal battery size and optimize the Battery Management System (BMS) to minimize energy consumption, reduce battery temperature, and increase battery service life.</li>
<li><strong><em>Motor sizing:</em></strong> the robot is equipped with four electric motors that are independently controlled to provide wheel torques and steering maneuvers. The seamless integration with Maple will allow the motor sizing optimization to be performed based on MapleSim simulations.</li>
<li><strong><em>Chassis design and payload distribution:</em></strong> the virtual prototype of the system will allow engineers to easily vary payload locations and distributions and analyze their effects, e.g., roll-over, stability, controllability, etc., on certain tasks.</li>
<li><strong><em>Path planning:</em></strong> Using Maple, different terrain surface conditions and tire force models to fit different test scenarios can be generated for path planning.</li>
<li><strong><em>Model-based controller design:</em></strong> the MapleSim model will allow the control strategies to be designed and tested for accuracy before being deployed on a real vehicle.</li>
<li><strong><em>Localization and mapping:</em></strong> the high-fidelity dynamic model of the robot will allow state estimation algorithms, such as Kalman filter and other Bayesian-based filtering algorithms, to be performed at a high accuracy.</li>
<li><strong><em>Optimized code generation:</em></strong> optimized C code can be generated from the MapleSim model for purpose of implementations of control, localization, and path planning strategies.</li>
</ul>
<p><a href="http://www.maplesoft.com/products/maplesim/ModelGallery/detail.aspx?id=310" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">See here for more information on simulating the Grizzly in MapleSim.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Arduino for Makers #2: Deconstructing Arduino programs</title>
		<link>https://robohub.org/arduino-for-makers-2-deconstructing-arduino-programs/</link>
		
		<dc:creator><![CDATA[Myke Predko]]></dc:creator>
		<pubDate>Thu, 09 Apr 2015 21:42:27 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Arduino for Makers]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/arduino-for-makers-2-deconstructing-arduino-programs/</guid>

					<description><![CDATA[In this new tutorial series, robotics educator and author Myke Predko introduces you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. In this tutorial, Myke dives into how to program your Arduino so that you can plan an effective software architecture and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em><img decoding="async" class="aligncenter size-full wp-image-48158" src="http://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout.jpg" alt="Simple-Arduino-Pinout" width="800" height="355" srcset="https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout.jpg 800w, https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout-425x188.jpg 425w, https://robohub.org/wp-content/uploads/2015/04/Simple-Arduino-Pinout-500x221.jpg 500w" sizes="(max-width: 800px) 100vw, 800px" />In this new tutorial series, robotics educator and author Myke Predko introduces you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. In this tutorial, Myke dives into how to program your Arduino so that you can plan an effective software architecture and monitor your application. Look for new tutorials every 2-3 weeks, or see all the tutorials in this series <a href="http://robohub.org/tag/arduino-for-makers/" data-wpel-link="internal">here</a>. </em><br />
<span id="more-48154"></span></p>
<p><em> <img decoding="async" class="aligncenter size-full wp-image-48160" src="http://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool.png" alt="Picture 1 - Initial Arduino Program Development Tool" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool.png 1280w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/04/Picture-1-Initial-Arduino-Program-Development-Tool-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" /></em></p>
<p>Welcome back. In this article, I want to discuss some of the particulars of programming an Arduino so that you better understand what is happening when your program is built. I’ll also discuss how to best architect your software. The Arduino software approach is somewhat unusual compared to other devices and, for beginners at least, takes away the need to do the high level design of the application. As a result, there are a few things to understand and keep in the back of your mind if you want your application to run without anything unexpected happening. In this article, I will provide you with a couple of simple applications to illustrate how Arduino software works, as well as a way to monitor the operation of the application.</p>
<p>In case you found the opening paragraph ominous and were wondering the Arduino is a potential minefield when it comes to software development, let me reassure you that it is as easy to program as any other device I’ve worked with and has been designed to allow for very sophisticated applications. It balances the needs of the beginner and expert application developer quite nicely.</p>
<p>When you’re creating with real time applications (applications that respond to different inputs), the common basic architecture is:</p>
<ul>
<li>System Initialization (“setup()”)
<ul>
<li>Define and initialize system and state variables</li>
<li>Setup hardware interfaces</li>
</ul>
</li>
<li>Repeat input/output processing code (“loop()”)
<ul>
<li>Get inputs</li>
<li>Process inputs with/update system and state variables</li>
<li>Drive outputs</li>
</ul>
</li>
</ul>
<p>The Arduino development software eliminates the need to come up with this program type, instead using the “setup()” and “loop()” methods, which provide this capability for you. As can be seen in Figure 1, when you first start the Arduino development tool or start a new “sketch” .ino (which I usually hear called an “ee-no”) file, the basic code with “setup()” and “loop()”are created – it is now up to you to put in the code for these two methods.</p>
<p>You may have heard that Arduino programming is really C++. However, when you compare example C++ programs to the Arduino .ino code, you will find that though there are some similarities, they really don’t look the same. This is because the .ino code is appended to the end of the C++ file containing the following “main()”:</p>
<pre>#include &lt;Arduino.h&gt;

void setup();
void loop();

int main(void)
{
 setup();

#if defined(USBCON)
USBDevice.attach();
#endif

setup();
for (;;) {
  loop();
  if (serialEventRun) serialEventRun();
 }
 return 0;
}

// user .ino file is appended here
</pre>
<p>In the “main()” code, you can see the calls to the “setup()” and “loop()” methods, along with a few other pieces that need to be explained.</p>
<p>The first is the “#include &lt;Arduino.h&gt;” statement, in which the basic operations provided by the Arduino system are defined. “#include” statements copy in the contents of the specified file before the file is compiled.</p>
<p>Next are the “USBCON” and “USBDevice” statements. These are required if an Arduino USB Host Shield is used in the application. An Arduino USB Host Shield is a shield that enables the Arduino application to be augmented with USB hubs, keyboards, mice, joysticks, thumb drives and other devices.</p>
<p>We will be discussing the “for” statement and looping in a later article, but I wanted to point out that the “for(;;)” statement is a way of creating an infinite loop. When execution reaches this statement, the statements inside the curly braces (“{“ &amp; “}”) that follow will be repeated as long as the Arduino is running.</p>
<p>I will discuss the “Serial Events” in a bit more detail below, but its purpose is to poll the Arduino’s serial communications hardware and perform any necessary operations. This is an important function for helping you to understand how your application is working.</p>
<p>Finally, the “return 0;” statement is put there as a matter of form – execution will never reach it because of the infinite loop above it. Many compilers will flag a warning or an error if a return statement is not at the end of your code, so putting it in will avoid this potential problem.</p>
<p>To demonstrate the operation of the “setup()” and “loop()” methods, I created the <a href="http://robohub.org/wp-content/uploads/2015/04/Console_Test.zip" data-wpel-link="internal">Console_Test</a> application, which you can copy and paste into the Arduino development system:</p>
<pre>// Console_Test - Message from "setup()" and "loop()"
//
// myke predko
void setup() {
 Serial.begin(9600);       // Initialize Serial Library
 Serial.println("Hello world!"); // Output with New Line
}

void loop() {
 Serial.println("Loop Line"); // Output with New Line
}</pre>
<p>This application performs the following actions:</p>
<ul>
<li>Enables “Serial Events”, and outputs a message indicating that it is up and running</li>
<li>Every time the “loop()” method is called, outputs a message</li>
</ul>
<p>To test out this application, start up the Arduino development system and copy the following statements into “setup()”:</p>
<pre>Serial.begin(9600);       // Initialize Serial Library
Serial.println("Hello world!"); // Output with New Line
</pre>
<p>and the following statement into “loop()”:</p>
<pre>Serial.println("Loop Line"); // Output with New Line
</pre>
<p>Next, save the sketch as “Console_Test” and then transfer it to your Arduino using the “Upload” button shown in Figure 1. To see the application running and outputting the messages, click on the “Open Serial Monitor” button at the top right corner of Figure 1. After a few seconds, the Arduino will reset and restart running the application. You will see a display like Figure 2 for a second or so … at least until the repeating “Loop Line” messages cause the “Hello World!” message to scroll off the screen.</p>
<p>The “Serial.begin” statement loads in and starts (“instantiates” in Object Orientated speak) the “Serial” object, which is used for serial communications between the Arduino’s processor and the host PC. Serial communications are set at 9,600 bits per second (bps), which is actually 960 bytes per second (as ten bits are required for sending each byte of data). The “Serial.println” statements send the included string of characters to the host PC.</p>
<p>Serial Events are a great way to show that your application is working and to provide instructions to the Arduino during operation, but there are a couple of things to be wary of.</p>
<p>If you look at the “main()” code above, you will see that Serial Events only execute after a “loop()” operation. In the Arduino, Serial Events are not interrupt-driven; the <em>receive</em> buffer is only checked after a “loop()” and while the <em>send</em> buffer is being transmitted. The hardware receive registers in the ATMega, the processor used in the Arduino, can really only store one byte at a time safely, so the “loop()” code must execute in less time than it takes to receive a single byte (which is 10.4 milliseconds). This is not a major issue but it does mean that you should make your “loop()” code execute as quickly as possible – this is especially true if you work at higher speeds. Normally, I like to have communications at a minimum of 115,200 bps, which means that if I were to run at this communications speed in an Arduino, my “loop()” code must always execute in less than 87 microseconds to avoid the possibility of losing characters.</p>
<p>When you’re starting out, running Arduino “Serial” communications at 9,600 bits per second will probably be fast enough for most applications. As long as you don’t have long delays in your “loop()” code, you should not have any issues.</p>
<p>The second potential issue to watch for is the size of the “Serial” <em>send</em> and <em>receive</em> buffers, which are only 64 bytes in size. These are in software, and are independent of the hardware registers. Sending a message longer than 64 bytes will result in parts of it being “truncated” (cut off) and allowing the <em>receive</em> buffer to grow beyond 64 bytes will result in incoming data being lost. This may seem like an unlikely occurrence, but it can happen if all the bytes in the send message(s) in “setup()” are longer than 64 bytes, as they aren’t sent until “loop()” is first executed. It is possible to increase the size of the “Serial” <em>send</em> and <em>receive</em> buffers, but with a bit of care in your programs, there will be no need to.</p>
<p>While it is not important at this point in time, everything that is loaded into the Arduino is built during the transfer operation. This includes “Libraries” and any other code that you want to bring in to your Sketches. The advantage of doing this is to avoid the need for separate build processes; it also allows the code to be modified easily. You may notice that the time the Arduino development tool takes to compile your application seems unreasonably long – that is because it is going out and getting all possible library and include file code, and compiling it along with your application before building an executable with only the necessary pieces.</p>
<p>I realize that there is a lot of information here. It can all be boiled down to the following statements for the beginning user:</p>
<ol>
<li>Application setup is put in “setup()”</li>
<li>Repeating code for the application is put in “loop()” and must execute as quickly as possible</li>
<li>“Serial” is used for providing information about the execution of a program</li>
</ol>
<p>… but, I wanted to provide background information for individuals who may have had some programming experience on different platforms and wanted to understand how the Arduino works “behind the curtains”. For completely new users, I’m hoping that the information here will help you when you start doing your own applications and things go a bit wonky.</p>
<img decoding="async" class="aligncenter size-full wp-image-48159" src="http://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program.png" alt="Picture 2 - Looping Arduino Program" width="663" height="378" srcset="https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program.png 663w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-425x242.png 425w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-175x100.png 175w, https://robohub.org/wp-content/uploads/2015/04/Picture-2-Looping-Arduino-Program-500x285.png 500w" sizes="(max-width: 663px) 100vw, 663px" />
<p><strong>Example Programs:</strong></p>
<ul>
<li><a href="http://robohub.org/wp-content/uploads/2015/04/Console_Test.zip" data-wpel-link="internal">Console_Test</a></li>
</ul>
<p><strong>Next Article:</strong> Arduino Integer Data Types</p>
<p><strong>Websites for Further Reading:</strong></p>
<ul>
<li><a href="http://arduino.cc/en/Hacking/BuildProcess" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Hacking/BuildProcess</a> “Aduino Build Process” explaining the nuts and bolts of how things go together</li>
<li><a href="https://code.google.com/p/arduino/wiki/BuildProcess" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://code.google.com/p/arduino/wiki/BuildProcess</a> A practical explanation of how the build process works</li>
<li><a href="http://arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader</a> Arduino Bootloader description and information</li>
<li><a href="http://arduino.cc/en/reference/libraries" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/reference/libraries</a> Arduino Libraries</li>
<li><a href="http://www.instructables.com/id/HOW-TO-use-the-ARDUINO-SERIAL-MONITOR/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.instructables.com/id/HOW-TO-use-the-ARDUINO-SERIAL-MONITOR/</a> How-To use the Arduino Serial Monitor</li>
<li><a href="http://arduino.cc/en/Main/ArduinoUSBHostShield" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/Main/ArduinoUSBHostShield</a> Arduino USB Host Shield</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Arduino for Makers #1: Setting up a development station</title>
		<link>https://robohub.org/arduino-for-makers-1-setting-up-a-development-station/</link>
		
		<dc:creator><![CDATA[Myke Predko]]></dc:creator>
		<pubDate>Mon, 09 Mar 2015 19:43:44 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Arduino for Makers]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/arduino-for-makers-1-setting-up-a-development-station/</guid>

					<description><![CDATA[In this new tutorial series, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em>In this new <a href="http://robohub.org/tag/arduino-for-makers/" data-wpel-link="internal">tutorial series</a>, robotics educator and author Myke Predko will introduce you to the basics of Arduino with simple projects that can be created in just a few minutes with inexpensive and easy-to-obtain parts. Along the way, you will learn how to get the most out of electronics, how to create software that is easy to understand and debug, and you will develop the toolset you need to determine whether or not the Arduino is the right choice for your own project, and if so, how to implement it efficiently. The series is for anyone interested in Arduino, from high school students to professional engineers. As a follow up to his <a href="http://robohub.org/arduino-for-makers-0-introduction-to-the-series/" data-wpel-link="internal">introduction to the series</a>, in this tutorial Myke gives directions for setting up your own Arduino development station. Look for new lessons every 2-3 weeks.</em><br />
<span id="more-46942"></span></p>
<p><em> <img decoding="async" class="aligncenter size-full wp-image-46943" src="http://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit.png" alt="Figure 1 - Basic Development Circuit" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-1-Basic-Development-Circuit-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" /></em></p>
<p>Most “getting started” Arduino tutorials start by getting to you build a flashing LED application. While the application I present here is similar, rather than just getting the Arduino’s built-in LED to flash as a “one off” application, we will be setting up the parts and tools for projects that we will implement in the future. While I provide you with the tools to create your first Arduino application, you’ll be preparing for creating your own Arduino-based robots down the line.</p>
<p>Before we get started, let’s talk about some basic electrical rules you will need to understand for this project. Chances are you already know them, but it never hurts to spend a minute and review:</p>
<ol>
<li>Current flows from positive voltage (marked with red) to negative voltage (marked with black, and often referred to as “ground” or “Gnd”).</li>
<li>Current flows through an LED in only one direction (which causes it to light) and the negative connection is normally marked with a flat on its package.</li>
</ol>
<p>As I go on with the article series, I will expand upon these electrical rules, but this is all you have to know for now. If you look at Figure 1 at the start of this article, you will see that positive voltage from the Arduino has a red connection, the negative (Gnd) has a black connection, and the LED has a flat side that indicates for the direction of current flow through the device.</p>
<p>The parts needed for this first iteration of your Arduino development station are:</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/B006H06TVG/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B006H06TVG&amp;linkCode=as2&amp;tag=therobpod-20&amp;linkId=FIACLJYPVX45INUR" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Arduino Uno (R3 or R3 SMD)</a>. When you start out, I recommend that you use the “R3” version with the long rectangular chip in a socket rather than the small, flat square chip. The socketed chip can be replaced if it is ever damaged and it is about $5.00 cheaper.</li>
<li>Breadboard for quickly creating (and taking apart) your circuits.</li>
<li>5mm PTH red LED. This common LED consists of a red “bead” that lights when current passes through it. As noted above, current only flows through an LED in one direction with the negative connection marked with a flat on the side of the package.</li>
<li>100 Ohm, 1/4Watt resistor. This part reduces the current that will flow through the LED. While you can get a single 100 Ohm resistor, I recommend that you get a kit of resistors so that you have a stock of different values that can be applied in different circumstances.</li>
<li>22 gauge wire. This is for connections – it is worth purchasing a breadboard wiring kit with precut and stripped wires for the breadboard.</li>
</ul>
<p>There are many places where these parts can be bought. At the end of the article, I have provided pointers to <a href="https://www.sparkfun.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Sparkfun</a> and their part numbers for the components listed above. Sparkfun is an excellent supplier and one that I feel confident recommending – but I should point out that you may want to explore local electronics shops in your area. None of the components are hard to get and chances are you can buy the components locally for about the same price without having to wait for shipping.</p>
<img decoding="async" class="aligncenter size-full wp-image-46944" src="http://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals.png" alt="Figure 2 - Breadboard internals" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-2-Breadboard-internals-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" />
<p>The “Breadboard” is a type of electronic circuit board in which wires and component leads can be pushed into (and pulled out of) to make simple circuits quickly. As can be seen in Figure 2, the middle holes are connected together vertically while the holes on the outside rows are connected horizontally. I place components in the central area and let the vertical connections connect components together while the horizontal connections are used for “power rails”. Note that I connect the ground power rails on both sides of the breadboard, but only provide power to one side; I will be discussing the reason for this in a future article.</p>
<p>The “5V” and “Gnd” connections from the Arduino to the Breadboard power rails are a convention that I will be using for future articles. This setup allows for fast wiring of application circuitry while allowing for high power devices to be supplied separately and not from the Arduino. Many Arduino applications use its power supply in ways that could lead to burning it out or worse. This wiring convention and reasons behind it will be discussed in future articles.</p>
<p>With the electronics parts together, there are a few tools that I recommend that you buy at this time:</p>
<ul>
<li>Plastic kit box to provide for quick clean up and transportation to other locations. This should have separate compartment for various parts and tools. I like the <a href="http://www.amazon.com/gp/product/B002RL9E16/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002RL9E16&amp;linkCode=as2&amp;tag=therobpod-20&amp;linkId=PUNO4JWWZIGSFDMS" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Stanley Sortmaster</a> because the compartment separators can be set to allow storage of larger parts, and there is very little chance that the small parts in one compartment will find their way into another.</li>
<li>6’ A-B USB Cable.</li>
<li>Needle nose pliers.</li>
<li>Wire strippers. These can double as wire cutters.</li>
</ul>
<p>All these components can be purchased at a local dollar store. The USB Cable really doesn’t belong as a “tool”, but I wanted to make the point of looking for it at a dollar store – it will be considerably cheaper at a dollar store than at a specialty electronics store.</p>
<p>With the parts and tools available, you can now wire the circuit as shown in Figure 1. The circuit is quite simple: an LED with 100 Ohm resistor is connected to the “5V” output of the Arduino and the Arduino’s pin “3”. When pin “3” outputs a “LOW” voltage, current flows through the LED and it lights. When pin “3” outputs a “HIGH” voltage, current no longer flows through the LED and it no longer lights. This action can be tested by connecting the Arduino to your PC using the USB power (which provides power to the circuit) followed by disconnecting the wire from the Arduino’s pin 3 (the LED’s negative (flat) side) and connecting it to the 5V rail or one of the two Gnd rails on the breadboard.</p>
<p>As a side point, I highly recommend designing your circuits so they can be tested easily without requiring any Arduino software. I guarantee you that it will save hours of wondering why Arduino code doesn’t seem to be working when the real problem is that there is something wrong with the electrical circuit.</p>
<p>With the application built, you’re now ready to create the Arduino code to test everything out. At the end of the article, I have provided the download page for the Arduino software development environment (often called “Arduino Software”) (referred to here as the “Arduino Sketchpad”) and there are specific instructions for installing the software. It can be loaded into Windows PCs, Macs or Linux systems, and just takes a few minutes to install.</p>
<img decoding="async" class="aligncenter size-full wp-image-46945" src="http://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad.png" alt="Figure 3 - Arduino Sketchpad" width="1280" height="720" srcset="https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad.png 1280w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-425x239.png 425w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-1024x576.png 1024w, https://robohub.org/wp-content/uploads/2015/03/Figure-3-Arduino-Sketchpad-500x281.png 500w" sizes="(max-width: 1280px) 100vw, 1280px" />
<p>The Arduino Sketchpad’s many options can be somewhat overwhelming to new users, and for that reason, I suggest that beginners focus on the five icons that are labeled in Figure 3; these are the only controls that will be required for quite a while.</p>
<p>When you have your Arduino Sketchpad up and running, cut and paste in the following program:</p>
<pre>// flash - Flash LED on Pin 3
//
// myke predko


void setup() {
 pinMode(3, OUTPUT); // Make Pin 3 an Output
}


void loop() {
 digitalWrite(3, HIGH); // Pin 3 is high voltage (LED off)
 delay(250); // Wait 1/4s
 digitalWrite(3, LOW); // Pin 3 is low voltage (LED ON)
 delay(250); // Wait 1/4s
}
</pre>
<p>Then, click the “Save Sketch” icon to save the Sketch (which is what the Arduino application is called), and then click on the “Transfer to Arduino” (aka “Upload”). After a few seconds, you will get the “Done uploading” message and the LED should start flashing (if it doesn’t then use the hint above for debugging the application – chances are you have the LED orientated the wrong way or the resistor connected to the wrong power rail).</p>
<p>Now, you have a working Arduino development station. I know it doesn’t seem like much right now, but in the coming weeks, we’ll look at using this as a base for learning more about Arduino and creating your own robots.</p>
<p><strong>Further Reading:</strong></p>
<ul>
<li><a href="http://arduino.cc/en/main/software" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://arduino.cc/en/main/software</a> Arduino Software Download Page</li>
<li><a href="http://forum.arduino.cc/index.php?board=2.0" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://forum.arduino.cc/index.php?board=2.0</a> Arduino “Installation &amp; Troubleshoot” Forum</li>
<li><a href="http://www.ladyada.net/learn/arduino/lesson1.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.ladyada.net/learn/arduino/lesson1.html</a> First project tutorial</li>
<li><a href="http://electronicsclub.info/leds.htm" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://electronicsclub.info/leds.htm</a> Introduction to Light Emitting Diodes (LEDs)</li>
<li><a href="http://www.electronics-tutorials.ws/resistor/res_9.html" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">http://www.electronics-tutorials.ws/resistor/res_9.html</a> Resistor Tutorial and Summary</li>
</ul>
<p><strong>Parts:</strong></p>
<ul>
<li><a href="https://www.sparkfun.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/</a> for parts:
<ul>
<li><a href="https://www.sparkfun.com/products/11021" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/11021</a> Arduino Uno &#8211; R3</li>
<li><a href="https://www.sparkfun.com/products/9590" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/9590</a> LED &#8211; Basic Red 5mm</li>
<li><a href="https://www.sparkfun.com/products/10969" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/10969</a> 1/4W Resistor Kit</li>
<li><a href="https://www.sparkfun.com/products/9567" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/9567</a> Breadboard &#8211; Translucent</li>
<li><a href="https://www.sparkfun.com/products/124" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">https://www.sparkfun.com/products/124</a> Jumper Wire Kit</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p><strong>Previous Article: </strong><a href="http://robohub.org/arduino-for-makers-0-introduction-to-the-series/" data-wpel-link="internal">Arduino for Makers #0: Introduction to the series</a><strong><br />
</strong><strong>Next Article:</strong> Arduino Programing deconstructed</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>New open source Turtlebot tutorial aims to bring robotic development to the masses</title>
		<link>https://robohub.org/new-open-source-turtlebot-tutorial-aims-to-bring-robotic-development-to-the-masses/</link>
		
		<dc:creator><![CDATA[Mark Silliman]]></dc:creator>
		<pubDate>Thu, 05 Mar 2015 20:48:48 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ROS]]></category>
		<guid isPermaLink="false">http://robohub.org/new-open-source-turtlebot-tutorial-aims-to-bring-robotic-development-to-the-masses/</guid>

					<description><![CDATA[Critical mass is required to start any revolution and robotics will be no different. The newly published open-source project learn.turtlebot.com is designed to introduce high school students and the web development community to ROS, and allow them a fast track to experiencing its uses. The tutorials take developers from the initial setup of TurtleBot through [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="aligncenter size-full wp-image-46883" src="http://robohub.org/wp-content/uploads/2015/03/turtlebot-tutorial.jpeg" alt="turtlebot-tutorial" width="929" height="509" srcset="https://robohub.org/wp-content/uploads/2015/03/turtlebot-tutorial.jpeg 929w, https://robohub.org/wp-content/uploads/2015/03/turtlebot-tutorial-425x232.jpeg 425w, https://robohub.org/wp-content/uploads/2015/03/turtlebot-tutorial-500x273.jpeg 500w" sizes="(max-width: 929px) 100vw, 929px" />Critical mass is required to start any revolution and robotics will be no different. The newly published open-source project <a href="http://learn.turtlebot.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">learn.turtlebot.com</a> is designed to introduce high school students and the web development community to ROS, and allow them a fast track to experiencing its uses.<span id="more-46882"></span></p>
<p>The tutorials take developers from the initial setup of TurtleBot through programming a web app to control it. The final demo is to bring coffee to people around an office, but my ultimate goal is for creative new users to learn from this simple idea and modify at their whim to generate inventive uses and expansions.</p>
<p>I produced this free series in hopes of bringing robotics technology to the web development community. As we recently saw with 3D printers, web developers have a long tradition of embracing emerging technologies. My goal, as a member of both the open-source robotics and web development communities, is to encourage web developers to start learning robotics so that we can see the same sort of creativity and popularity take off.</p>
<div class="keep-aspect"><iframe title="Robot delivers fresh coffee when you tap your phone" width="500" height="281" src="https://www.youtube-nocookie.com/embed/ni49uYq4cF4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p></p>
<p>The way I see it, if we can give developers a taste of ROS’ power, they will invest the time to learn ROS properly. Today robotics stands on the foundation built by many brilliant people and engaged, innovative communities; now it is time to mine the untapped potential of developers not previously involved with robotics. By sparking developers’ interest and teaching them the basics of ROS, I hope to break down even more barriers and put us that much closer to making the robot revolution a reality.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ROS, Arduino, and a Husky simulation</title>
		<link>https://robohub.org/ros-arduino-and-a-husky-simulation/</link>
		
		<dc:creator><![CDATA[Clearpath Robotics]]></dc:creator>
		<pubDate>Fri, 23 Jan 2015 18:21:54 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Husky]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/ros-arduino-and-a-husky-simulation/</guid>

					<description><![CDATA[<p>By Martin Cote The Arduino family of micro controllers has quickly become a go-to board for hobbyists due to its ease of use. Often times roboticists must create communication protocols to allow their embedded hardware to communicate with a computer. One of the most powerful aspects of ROS is that it can communicate with a [&#8230;]</p>
<p>The post <a rel="nofollow external noopener noreferrer" href="http://www.clearpathrobotics.com/blog/arduino-ros/" data-wpel-link="external" target="_blank">ROS, Arduino, and a Husky Simulation</a> appeared first on <a rel="nofollow external noopener noreferrer" href="http://www.clearpathrobotics.com/" data-wpel-link="external" target="_blank">Clearpath Robotics Inc.</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><em>By Martin Cote</em></p>
<p>The Arduino family of micro controllers has quickly become a go-to board for hobbyists due to its ease of use. Often times roboticists must create communication protocols to allow their embedded hardware to communicate with a computer. One of the most powerful aspects of ROS is that it can communicate with a large variety of hardware. That’s where rosserial comes in! Rosserial is a general protocol for sending ROS messages over a serial interface, such as the UART on Arduino. This allows you to easily interface any sensors attached to Arduino into your ROS environment. Read on to learn more!<span id="more-45252"></span></p>
<p>This tutorial will get you started  by setting up the Arduino IDE and installing the rosserial libraries. Then, we’ll test it out by driving the Husky simulation using a neat trick with the Arduino board. It should goes without saying you’ll need an Arduino to complete this tutorial. We’ll also be using a Husky simulator, so make sure to run through our “Drive a Husky” tutorial if you haven’t done so yet.</p>
<h2><span class="wysiwyg-font-size-large">Setup</span></h2>
<p>The first step is to set up your Arduino environment, begin by installing the Arduino IDE and rosserial using:</p>
<pre>sudo apt-get install arduino arduino-core ros-hydro-rosserial ros-hydro-rosserial-arduino</pre>
<p>Once you open up the Arduino IDE for the first time, a directory named “sketchbook” will be created in your home directory. Now we need to import the rosserial library into your arduino IDE. If your sketchbook directory is empty, you may need to create a directory named “libraries” inside of it.</p>
<pre>mkdir ~/sketchbook/libraries
cd ~/sketchbook/libraries
rosrun rosserial_arduino make_libraries.py .</pre>
<p>Restart your Arduino IDE and you should see the ros_lib part of your libraries!</p>
<img decoding="async" class="aligncenter size-full wp-image-45325" src="http://robohub.org/wp-content/uploads/2015/01/ros_lib-check.png" alt="ros_lib-check" width="645" height="774" srcset="https://robohub.org/wp-content/uploads/2015/01/ros_lib-check.png 645w, https://robohub.org/wp-content/uploads/2015/01/ros_lib-check-354x425.png 354w, https://robohub.org/wp-content/uploads/2015/01/ros_lib-check-250x300.png 250w" sizes="(max-width: 645px) 100vw, 645px" />
<p>&nbsp;</p>
<p>You’ll want to ensure that your Ubuntu user is part of the “Dailout” group, which grants you access to serial ports. You can check by using</p>
<pre>groups "username”</pre>
<p>If you don’t see “dailout”, you can easily add yourself using</p>
<pre>sudo gpasswd --add "username" dialout</pre>
<p>One last step to make our lives easier will be to create udev rules so your Arduino is  recognized when plugged in and the correct permissions are set. For more information on udev rules check out ou<a href="https://support.clearpathrobotics.com/hc/en-us/articles/203252569-Udev-Rules" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">r udev article </a>. Begin by plugging in your Arduino.</p>
<p><strong><strong>NOTE:</strong></strong>If you are using a virtual machine, you will have to connect Arduino to the virtual machine after plugging it in.</p>
<img decoding="async" class="aligncenter size-full wp-image-45324" src="http://robohub.org/wp-content/uploads/2015/01/attaching-device-1024x571.jpg" alt="attaching-device-1024x571" width="1024" height="571" srcset="https://robohub.org/wp-content/uploads/2015/01/attaching-device-1024x571.jpg 1024w, https://robohub.org/wp-content/uploads/2015/01/attaching-device-1024x571-425x236.jpg 425w, https://robohub.org/wp-content/uploads/2015/01/attaching-device-1024x571-500x278.jpg 500w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>You can confirm your system is actually connected to Arduino by running</p>
<pre>ls -l /dev</pre>
<p>Depending on your specific Arduino board, you should either see a line with ttyAMC# or ttyUSB#, where # is a number. This will also tell you the current <a href="https://help.ubuntu.com/community/FilePermissions" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">permissions</a> for your Arduino. Chances are you wouldn’t be able to upload code to your Arduino at the moment because you don’t sufficient permissions, but we will soon solve that by creating a new udev rule!</p>
<p>The udev rule will require the product and vendor ID to be able to identify when our arduino is connected which you can easily find using</p>
<pre>lsusb</pre>
<p>You should see a line similar to</p>
<pre>Bus 002 Device 005: ID 2341:0043</pre>
<p>To confirm this is indeed your Arduino, disconnect it and run the command again, taking note which entry has disappeared. Remember the ID numbers, in this case, 2341 is the vendor ID and 0043 is the product ID. Now venture over to your udev rules at:</p>
<pre>cd /etc/udev/rules.d/</pre>
<p>and create our new rules file, the naming conventions for rules files follows “##-name.rules”. Chose a number that isn’t in use!</p>
<pre>sudo gedit 97-arduino.rules</pre>
<p>Copy the following into your new rules file, replacing #### with your product ID and vendor ID. For more information about what these tags mean, check out our <a href="https://support.clearpathrobotics.com/hc/en-us/articles/203252569-Udev-Rules" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">article</a> on udev rules.</p>
<pre>SUBSYSTEMS=="usb", ATTRS{idProduct}=="###", ATTRS{idVendor}=="####", SYMLINK+="arduino",MODE="0777",</pre>
<p>All that is left is to update your udev rules and reboot your system</p>
<pre>udevadm trigger
sudo reboot</pre>
<p>You should now see “arduino” as an entry in <code class="western">ls -l /dev</code> with full permissions! (rwxrwxrwx)</p>
<h2><strong><span class="wysiwyg-font-size-large">Code</span></strong></h2>
<p>We’re now set to upload our code to Arduino! The code is fairly straight forward, however if you have any difficulties following along, check out our <a href="https://support.clearpathrobotics.com/hc/en-us/articles/201644249-Creating-a-workspace-package-and-publisher" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">“Creating a publisher” tutorial.</a> Copy the following code into the Arduino IDE and click upload. If your udev rules were set correctly you should be able to upload without any errors.</p>
<p><em>If you encounter any errors, verify your arduino is coming up as “arduino” in a ls -l /dev and proper permissions are set. You may also have to point the Arduino IDE towards the correct USB port in tools -&gt; serial port.</em></p>
<pre>#include &lt;ArduinoHardware.h&gt;
#include &lt;ros.h&gt;
#include &lt;geometry_msgs/Twist.h&gt;

ros::NodeHandle nh;

geometry_msgs::Twist msg;

ros::Publisher pub("husky/cmd_vel", &amp;msg);

void setup()
{
 nh.initNode();
 nh.advertise(pub);
} void loop()
{
 if(digitalRead(8)==1)
 msg.linear.x=-0.25;
 
 else if (digitalRead(4)==1)
 msg.linear.x=0.25;
 
 else if (digitalRead(8)==0 &amp;&amp; digitalRead(4)==0)
 msg.linear.x=0;
 
 pub.publish(&amp;msg);
 nh.spinOnce();
 }</pre>
<h2><span class="wysiwyg-font-size-medium">Driving Husky</span></h2>
<p>Now that Arduino is loaded with our code and publishing velocity commands, we can pass these messages along into our ROS environment. We’ll start by launching a Husky simulation:</p>
<pre>roslaunch husky_gazebo husky_empty_world.launch</pre>
<p>All that’s left is to attach the Arduino into our ROS environment using:</p>
<pre>rosrun rosserial_python serial_node.py _port:=/dev/arduino</pre>
<p>We’re ready to try it out! Go ahead and touch the digital pin 8 and you should see Husky drive forward! Similarly if you touch digital pin 4 Husky will drive backwards.</p>
<img decoding="async" class="aligncenter size-full wp-image-45323" src="http://robohub.org/wp-content/uploads/2015/01/ArduinoUno_r2_front450px.jpg" alt="ArduinoUno_r2_front450px" width="450" height="315" srcset="https://robohub.org/wp-content/uploads/2015/01/ArduinoUno_r2_front450px.jpg 450w, https://robohub.org/wp-content/uploads/2015/01/ArduinoUno_r2_front450px-425x297.jpg 425w, https://robohub.org/wp-content/uploads/2015/01/ArduinoUno_r2_front450px-428x300.jpg 428w" sizes="(max-width: 450px) 100vw, 450px" />
<p>This trick is made possible by a phenomenon known as <a href="http://en.wikipedia.org/wiki/Parasitic_capacitance" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">parasitic capacitance</a>, which is usually an unwanted effect in electronics design, but serves nicely for the purpose of our example. That being said, this isn’t the most reliable method, and is intended to provide a simple example with minimal equipment.  If you are having difficulties moving your simulated Husky, try using <code class="western">rostopic echo /husky/cmd_vel</code> to verify some commands are in fact being sent to Husky when you touch the pins.</p>
<p>Be sure to go through the rest of our ROS tutorials on our <a href="http://support.clearpathrobotics.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">knowledge base</a>. If you want to learn more about rosserial, be sure to visit the rosserial page of the <a href="http://wiki.ros.org/rosserial" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">ROS wiki</a>.</p>
<p>Looking for other Clearpath tutorials? You might like <a href="http://robohub.org/archives/authors/clearpath-robotics/" data-wpel-link="internal">these ones</a>! Or visit <a title="support" href="http://www.support.clearpathrobotics.com/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">www.support.clearpathrobotics.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ROS 101: A practical example</title>
		<link>https://robohub.org/ros-101-a-practical-example/</link>
		
		<dc:creator><![CDATA[Clearpath Robotics]]></dc:creator>
		<pubDate>Wed, 05 Feb 2014 21:30:20 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[ROS101 Tutorial]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/?p=26465</guid>

					<description><![CDATA[In the previous ROS 101 post, we provided a quick introduction to ROS to answer questions like What is ROS? and How do I get started? Now that you understand the basics, here’s how they can apply to a practical example. Follow along to see how we actually ‘do’ all of these things … First, you will need to run Ubuntu, [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="http://robohub.org/wp-content/uploads/2014/01/ROS101.jpg" alt="ROS101_Clearpath" width="520" height="260" class="alignnone size-full wp-image-26299" srcset="https://robohub.org/wp-content/uploads/2014/01/ROS101.jpg 520w, https://robohub.org/wp-content/uploads/2014/01/ROS101-300x150.jpg 300w, https://robohub.org/wp-content/uploads/2014/01/ROS101-500x250.jpg 500w" sizes="(max-width: 520px) 100vw, 520px" />
<p>In the previous <a title="ROS 101: How to Guide" href="http://robohub.org/ros-101-intro-to-the-robot-operating-system/" target="_blank" data-wpel-link="internal">ROS 101 post</a>, we provided a quick introduction to ROS to answer questions like <em>What is ROS? </em>and <em>How do I get started? </em>Now that you understand the basics, here’s how they can apply to a practical example. Follow along to see how we actually ‘do’ all of these things …<span id="more-26465"></span></p>
<p>First, you will need to run Ubuntu, and have ROS installed on it. For your convenience, you can download our easy-to-use image here:</p>
<p><a title="Public Learn ROS Disk" href="https://s3.amazonaws.com/CPR_PUBLIC/LEARN_ROS/Learn_ROS-disk1.vmdk.gz" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://s3.amazonaws.com/CPR_PUBLIC/LEARN_ROS/Learn_ROS-disk1.vmdk</a><br />
<a title="Public Learn ROS ovf" href="https://s3.amazonaws.com/CPR_PUBLIC/LEARN_ROS/Learn_ROS.ovf" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">https://s3.amazonaws.com/CPR_PUBLIC/LEARN_ROS/Learn_ROS.ovf</a></p>
<p>Login (username): user<br />
Password: learn</p>
<p>Get VMWare Player, and use the virtual disk above. If you don’t want to use the provided image, follow the tutorial here (after installing Ubuntu 12.04):</p>
<p><a title="Ubunto Installation" href="http://wiki.ros.org/hydro/Installation/Ubuntu" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">http://wiki.ros.org/hydro/Installation/Ubuntu</a></p>
<p>Throughout the rest of the tutorials, we will be referencing the <a title="ROS Cheat Sheet" href="http://www.clearpathrobotics.com/ros-cheat-sheet" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">ROS cheatsheet available here</a>.<em><br />
</em></p>
<p>Open a new Terminal Window (Ctrl + Alt + T).<br />
In the new terminal, type roscore (And press enter).<br />
This should produce something similar to the below.</p>
<img decoding="async" class="size-full wp-image-26466" alt="ROSpic1" src="http://robohub.org/wp-content/uploads/2014/02/ROSpic1.png" width="724" height="553" srcset="https://robohub.org/wp-content/uploads/2014/02/ROSpic1.png 724w, https://robohub.org/wp-content/uploads/2014/02/ROSpic1-300x229.png 300w, https://robohub.org/wp-content/uploads/2014/02/ROSpic1-392x300.png 392w" sizes="(max-width: 724px) 100vw, 724px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 1</div>
<p>What you have just done is started the ROS Master as we described above. We can now experiment with some ROS commands.<br />
Open a new Terminal, and type in rostopic. This will give you a list of all the options that the rostopic command can do. For now, we are interested in rostopic list<br />
Type in rostopic list. (And press enter). This should give you a window like the following:</p>
<img decoding="async" class="size-full wp-image-26467" alt="rospic2" src="http://robohub.org/wp-content/uploads/2014/02/rospic2.png" width="553" height="337" srcset="https://robohub.org/wp-content/uploads/2014/02/rospic2.png 553w, https://robohub.org/wp-content/uploads/2014/02/rospic2-300x182.png 300w, https://robohub.org/wp-content/uploads/2014/02/rospic2-492x300.png 492w" sizes="(max-width: 553px) 100vw, 553px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 2</div>
<p>The two entries listed above are ROS’s built in way of reporting and aggregating debug messages in the system. What we want to do is publish and subscribe to a message.<br />
You can open a new Terminal again, or open a new tab on the same terminal window (Ctrl + Shift + T).<br />
In the new Terminal, type in: rostopic pub /hello std_msgs/String “Hello Robot”</p>
<img decoding="async" class="size-full wp-image-26468" alt="ROSpic3" src="http://robohub.org/wp-content/uploads/2014/02/ROSpic3.png" width="642" height="369" srcset="https://robohub.org/wp-content/uploads/2014/02/ROSpic3.png 642w, https://robohub.org/wp-content/uploads/2014/02/ROSpic3-300x172.png 300w, https://robohub.org/wp-content/uploads/2014/02/ROSpic3-500x287.png 500w" sizes="(max-width: 642px) 100vw, 642px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 3</div>
<p>Let’s break down the parts of that command.<br />
rostopic pub – This commands ROS to publish a new topic.<br />
/hello – This is the name of the new topic. (Can be whatever you want)<br />
std_msgs/String – This is the topic type. We want to publish a string topic. In our overview examples above, it was an image data type.<br />
“Hello Robot” – This is the actual data contained by the topic. I.E. the message itself.<br />
Going back to the previous Terminal, we can execute rostopic list again.<br />
We now have a new topic listed! We can also echo the topic to see the message. rostopic echo /hello</p>
<img decoding="async" class="size-full wp-image-26469" alt="rospic4" src="http://robohub.org/wp-content/uploads/2014/02/rospic4.png" width="642" height="369" srcset="https://robohub.org/wp-content/uploads/2014/02/rospic4.png 642w, https://robohub.org/wp-content/uploads/2014/02/rospic4-300x172.png 300w, https://robohub.org/wp-content/uploads/2014/02/rospic4-500x287.png 500w" sizes="(max-width: 642px) 100vw, 642px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 4</div>
<p>We have now successfully published a topic with a message, and received that message.<br />
Type Ctrl + C to stop echoing the /hello topic.<br />
We can also look into the node that is publishing the message. Type in rosnode list. You will get a list similar to the one below. (The exact numbers beside the rostopic node may be different)</p>
<img decoding="async" class="size-full wp-image-26470" alt="rospic5" src="http://robohub.org/wp-content/uploads/2014/02/rospic5.png" width="642" height="477" srcset="https://robohub.org/wp-content/uploads/2014/02/rospic5.png 642w, https://robohub.org/wp-content/uploads/2014/02/rospic5-300x222.png 300w, https://robohub.org/wp-content/uploads/2014/02/rospic5-403x300.png 403w" sizes="(max-width: 642px) 100vw, 642px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 5</div>
<p>Because we asked rostopic to publish the /hello topic for us, ROS went ahead and created a node to do so. We can look into details of by typing rosnode info /rostopic_…..(whatever numbers)<br />
TIP: In ROS, and in Linux in general, whenever you start typing something, you can press the Tab key to auto-complete it. If there is more than one entry, double tap Tab to get the list. In the above example, all I typed was rosnode info /rost(TAB)</p>
<img decoding="async" class=" size-full wp-image-26471" alt="rospic6" src="http://robohub.org/wp-content/uploads/2014/02/orspic6.png" width="642" height="477" srcset="https://robohub.org/wp-content/uploads/2014/02/orspic6.png 642w, https://robohub.org/wp-content/uploads/2014/02/orspic6-300x222.png 300w, https://robohub.org/wp-content/uploads/2014/02/orspic6-403x300.png 403w" sizes="(max-width: 642px) 100vw, 642px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 6</div>
<p>We can get info on our topic the same way, by typing rostopic info /hello.</p>
<img decoding="async" class="size-full wp-image-26472" alt="rospic7" src="http://robohub.org/wp-content/uploads/2014/02/rospic7.png" width="642" height="477" srcset="https://robohub.org/wp-content/uploads/2014/02/rospic7.png 642w, https://robohub.org/wp-content/uploads/2014/02/rospic7-300x222.png 300w, https://robohub.org/wp-content/uploads/2014/02/rospic7-403x300.png 403w" sizes="(max-width: 642px) 100vw, 642px" />
<div style="clear: both;"></div>
<div class="minitext">ROS Figure 7</div>
<p>You will notice that the node listed under “Publishers:” is the same node we requested info about.</p>
<p>Up till now, we have covered the fundamentals of ROS, how to use rostopic, rosnode.</p>
<p>Next time, we will compile a short example program, and try it out.</p>
<p>&nbsp;</p>
<div class="divideronpost"></div>
<p><em>See all the ROS101 tutorials <a href="http://robohub.org/tag/ros101-tutorial/" data-wpel-link="internal">here</a>. If you liked this article, you may also be interested in:</em></p>
<ul>
<li><a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">Up and flying with the AR.Drone and ROS: Getting started</a></li>
<li><a href="http://robohub.org/taking-your-first-steps-in-robotics-with-the-thymio-ii/" data-wpel-link="internal">Taking your first steps in robotics with the Thymio II</a></li>
<li><a title="Permalink to Discovering social robotics with the Aisoy1" href="http://robohub.org/discovering-social-robotics-with-the-aisoy1/" rel="bookmark" data-wpel-link="internal">Discovering social robotics with the Aisoy1</a></li>
<li><a title="Permalink to Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft" href="http://robohub.org/parrot-ar-drone-app-harnesses-crowd-power-to-fast-track-vision-learning-in-robotic-spacecraft/" rel="bookmark" data-wpel-link="internal">Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a href="http://eepurl.com/t-UEf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">sign up for our weekly newsletter</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ROS 101: Intro to the Robot Operating System</title>
		<link>https://robohub.org/ros-101-intro-to-the-robot-operating-system/</link>
		
		<dc:creator><![CDATA[Clearpath Robotics]]></dc:creator>
		<pubDate>Wed, 29 Jan 2014 16:15:22 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ROS]]></category>
		<category><![CDATA[ROS101 Tutorial]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://robohub.org/?p=26290</guid>

					<description><![CDATA[Clearpath Robotics brings us a new tutorial series on ROS! Since we practically live in the Robot Operating System (ROS), we thought it was time to share some tips on how to get started with ROS. We’ll answer questions like where do I begin? How do I get started? What terminology should I brush up on? Keep [&#8230;]]]></description>
										<content:encoded><![CDATA[<img decoding="async" src="http://robohub.org/wp-content/uploads/2014/01/ROS101.jpg" alt="ROS101_Clearpath" width="520" height="260" class="alignnone size-full wp-image-26299" srcset="https://robohub.org/wp-content/uploads/2014/01/ROS101.jpg 520w, https://robohub.org/wp-content/uploads/2014/01/ROS101-300x150.jpg 300w, https://robohub.org/wp-content/uploads/2014/01/ROS101-500x250.jpg 500w" sizes="(max-width: 520px) 100vw, 520px" />
<p><em><a href="http://www.clearpathrobotics.com" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">Clearpath Robotics</a> brings us a new tutorial series on ROS!</em></p>
<p>Since we practically live in the Robot Operating System (ROS), we thought it was time to share some tips on how to get started with ROS. We’ll answer questions like <em>where do I begin? How do I get started? What terminology should I brush up on?</em> Keep an eye out for this ongoing ROS 101 blog series that will provide you with a top to bottom view of ROS that will focus on introducing basic concepts simply, cleanly and at a reasonable pace. This guide is meant as a groundwork for new users, which can then be used to jump into in-depth data at <a title="ROS Wiki" href="http://wiki.ros.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">wiki.ros.org</a>. If you are totally unfamiliar with ROS, Linux, or both, this is the place for you!<span id="more-26290"></span></p>
<h2><strong>The ROS Cheat Sheet</strong></h2>
<p>This ROS Cheat Sheet is filled with tips and tricks to help you get started and to continue using once you’re a true ROS user. This version is written for ROS Hydro Medusa. <a title="ROS Cheat Sheet-Hydrov1" href="http://www.clearpathrobotics.com/ros-cheat-sheet" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Download the ROS Cheat Sheet here</a>.</p>
<h2><strong>What is ROS?</strong></h2>
<p><a title="ROS.org" href="http://www.ros.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">ROS (Robot Operating System)</a> is a BSD-licensed system for controlling robotic components from a PC. A ROS system is comprised of a number of independent nodes, each of which communicates with the other nodes using a publish/subscribe messaging model. For example, a particular sensor’s driver might be implemented as a node, which publishes sensor data in a stream of messages. These messages could be consumed by any number of other nodes, including filters, loggers, and also higher-level systems such as guidance, pathfinding, etc.</p>
<h2><strong>Why ROS?</strong></h2>
<p>Note that nodes in ROS do not have to be on the same system (multiple computers) or even of the same architecture! You could have a Arduino publishing messages, a laptop subscribing to them, and an Android phone driving motors. This makes ROS really flexible and adaptable to the needs of the user. ROS is also open source, maintained by many people.</p>
<h2><strong>General Concepts</strong></h2>
<p>Let’s look at the ROS system from a very high level view. No need to worry how any of the following works, we will cover that later.</p>
<p>ROS starts with the ROS Master. The Master allows all other ROS pieces of software (Nodes) to find and talk to each other. That way, we do not have to ever specifically state “Send this sensor data to that computer at 127.0.0.1. We can simply tell Node 1 to send messages to Node 2.</p>
<img decoding="async" class="size-full wp-image-26294" alt="ros101-1" src="http://robohub.org/wp-content/uploads/2014/01/ros101-1.png" width="853" height="534" srcset="https://robohub.org/wp-content/uploads/2014/01/ros101-1.png 853w, https://robohub.org/wp-content/uploads/2014/01/ros101-1-300x187.png 300w, https://robohub.org/wp-content/uploads/2014/01/ros101-1-479x300.png 479w" sizes="(max-width: 853px) 100vw, 853px" />
<div class="minitext">Figure 1</div>
<p>How do Nodes do this? By publishing and subscribing to Topics.</p>
<p>Let’s say we have a camera on our Robot. We want to be able to see the images from the camera, both on the Robot itself, and on another laptop.</p>
<p>In our example, we have a Camera Node that takes care of communication with the camera, a Image Processing Node on the robot that process image data, and a Image Display Node that displays images on a screen. To start with, all Nodes have registered with the Master. Think of the Master as a lookup table where all the nodes go to find where exactly to send messages.</p>
<img decoding="async" class="size-full wp-image-26295" alt="ros101-2" src="http://robohub.org/wp-content/uploads/2014/01/ros101-2.png" width="965" height="673" srcset="https://robohub.org/wp-content/uploads/2014/01/ros101-2.png 965w, https://robohub.org/wp-content/uploads/2014/01/ros101-2-300x209.png 300w, https://robohub.org/wp-content/uploads/2014/01/ros101-2-430x300.png 430w" sizes="(max-width: 965px) 100vw, 965px" />
<div class="minitext">Figure 2</div>
<p>In registering with the ROS Master, the Camera Node states that it will Publish a Topic called /image_data (for example). Both of the other Nodes register that they are Subscribed to the Topic /image_data.</p>
<p>Thus, once the Camera Node receives some data from the Camera, it sends the /image_data message directly to the other two nodes. (Through what is essentially TCP/IP)</p>
<img decoding="async" class="size-full wp-image-26296" alt="ros101-3" src="http://robohub.org/wp-content/uploads/2014/01/ros101-3.png" width="965" height="693" srcset="https://robohub.org/wp-content/uploads/2014/01/ros101-3.png 965w, https://robohub.org/wp-content/uploads/2014/01/ros101-3-300x215.png 300w, https://robohub.org/wp-content/uploads/2014/01/ros101-3-417x300.png 417w" sizes="(max-width: 965px) 100vw, 965px" />
<div class="minitext">Figure 3</div>
<p>Now you may be thinking, what if I want the Image Processing Node to request data from the Camera Node at a specific time? To do this, ROS implements Services.</p>
<p>A Node can register a specific service with the ROS Master, just as it registers its messages. In the below example, the Image Processing Node first requests /image_data, the Camera Node gathers data from the Camera, and then sends the reply.</p>
<img decoding="async" class="size-full wp-image-26297" alt="ros101-4" src="http://robohub.org/wp-content/uploads/2014/01/ros101-4.png" width="927" height="658" srcset="https://robohub.org/wp-content/uploads/2014/01/ros101-4.png 927w, https://robohub.org/wp-content/uploads/2014/01/ros101-4-300x212.png 300w, https://robohub.org/wp-content/uploads/2014/01/ros101-4-422x300.png 422w" sizes="(max-width: 927px) 100vw, 927px" />
<div class="minitext">Figure 4</div>
<p>We will have another tutorial &#8220;ROS 101 &#8211; Practical Example&#8221; next week.</p>
<p>&nbsp;</p>
<div class="divideronpost"></div>
<p><em>See all the ROS101 tutorials <a href="http://robohub.org/tag/ros101-tutorial/" data-wpel-link="internal">here</a>. If you liked this article, you may also be interested in:</em></p>
<ul>
<li><a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">Up and flying with the AR.Drone and ROS: Getting started</a></li>
<li><a href="http://robohub.org/taking-your-first-steps-in-robotics-with-the-thymio-ii/" data-wpel-link="internal">Taking your first steps in robotics with the Thymio II</a></li>
<li><a title="Permalink to Discovering social robotics with the Aisoy1" href="http://robohub.org/discovering-social-robotics-with-the-aisoy1/" rel="bookmark" data-wpel-link="internal">Discovering social robotics with the Aisoy1</a></li>
<li><a title="Permalink to Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft" href="http://robohub.org/parrot-ar-drone-app-harnesses-crowd-power-to-fast-track-vision-learning-in-robotic-spacecraft/" rel="bookmark" data-wpel-link="internal">Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a href="http://eepurl.com/t-UEf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">sign up for our weekly newsletter</a>.</em></p>
<p><em> </em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Taking your first steps in robotics with the Thymio II</title>
		<link>https://robohub.org/taking-your-first-steps-in-robotics-with-the-thymio-ii/</link>
		
		<dc:creator><![CDATA[Mike Hamer]]></dc:creator>
		<pubDate>Wed, 25 Dec 2013 21:29:43 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Thymio]]></category>
		<guid isPermaLink="false">http://robohub.org/?p=24768</guid>

					<description><![CDATA[Perhaps you were inspired by Sharon Marzouk and her experiences using the Thymio II in the classroom to motivate independent learning and discovery, or perhaps you saw the Thymio II on our Holiday Gift Ideas and just couldn&#8217;t resist. Either way, you&#8217;ve got your hands on a Thymio II and are wondering how to get [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Perhaps you were inspired by <a title="Posts by Sharon Marzouk" href="http://robohub.org/author/sharonmarzouk/" rel="author" data-wpel-link="internal">Sharon Marzouk</a> and her experiences <a title="Classroom robotics: Motivating independent learning and discovery" href="http://robohub.org/classroom-robotics-motivating-independent-learning-and-discovery/" data-wpel-link="internal">using the Thymio II in the classroom to motivate independent learning and discovery</a>, or perhaps you saw the Thymio II on our <a title="Still looking for last-minute holiday gifts? 15 ideas for robot fans" href="http://robohub.org/still-looking-for-last-minute-holiday-gifts-15-ideas-for-robot-fans/" data-wpel-link="internal">Holiday Gift Ideas</a> and just couldn&#8217;t resist. Either way, you&#8217;ve got your hands on a Thymio II and are wondering how to get started!<span id="more-24768"></span></p>
<p><a href="https://aseba.wikidot.com" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"><img decoding="async" width="700" height="465" class="alignright size-medium wp-image-25026" style="width: 60%;" alt="thymio-ball-balancing" src="http://robohub.org/wp-content/uploads/2013/12/thymio-ball-balancing.jpg" srcset="https://robohub.org/wp-content/uploads/2013/12/thymio-ball-balancing.jpg 700w, https://robohub.org/wp-content/uploads/2013/12/thymio-ball-balancing-300x199.jpg 300w, https://robohub.org/wp-content/uploads/2013/12/thymio-ball-balancing-451x300.jpg 451w" sizes="(max-width: 700px) 100vw, 700px" /></a>If that&#8217;s the case, or if you&#8217;re simply interested in learning more about the Thymio, head over to <a href="https://aseba.wikidot.com" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">Thymio &amp; Aseba</a>. There you can find an <a href="https://aseba.wikidot.com/en:thymioprogram" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">excellent guide</a> on using the visual programming language (VPL) bundled with Aseba, to program the Thymio II. This guide includes an introduction to the Thymio II and the VPL, and contains a number of small projects of increasing complexity, designed to gradually introduce new features, sensors, actuators and ideas to the reader.</p>
<div style="clear: both;"></div>
<p>On the Thymio &amp; Aseba site, you will also find numerous <a href="https://aseba.wikidot.com/en:thymioexamples#toc1" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">project examples</a> (for example ball balancing, as pictured above), many of which include Aseba source code examples and an implementation discussion. You can also find various constructions, which take advantage of the Thymio&#8217;s LEGO Technic interoperability to build many weird and wonderful creations including cranes, funicular railways, walking robots and more.</p>
<p>Of these many project examples, three projects really stood out to me:</p>
<ol>
<li><a href="https://aseba.wikidot.com/en:thymiopenduleplot" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">The simple pendulum</a>, where the Thymio&#8217;s accelerometer is used to investigate the dynamics of a swinging pendulum;</li>
<li><a href="https://aseba.wikidot.com/en:thymiostaticbalance" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">The scales</a> (shown below), where mechanical scales are built and the Thymio&#8217;s distance sensor used to digitize the weight measurement; and</li>
<li><a href="https://aseba.wikidot.com/en:thymioreflexpapier" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">The reflectivity measure</a>, which uses the Thymio&#8217;s IR sensor to measure optical reflectivity of various objects at known distances, automated using the Thymio&#8217;s wheels to drive an arm mechanism.</li>
</ol>
<p>These three examples demonstrate that robots, although <em>cool</em> in their own right, are also an excellent tool for learning more about the world around us.</p>
<div style="clear: both;"></div>
<img decoding="async" width="700" height="715" class="aligncenter size-full wp-image-25034" alt="thymio-scales" src="http://robohub.org/wp-content/uploads/2013/12/thymio-scales.jpg" style="width:100%" srcset="https://robohub.org/wp-content/uploads/2013/12/thymio-scales.jpg 700w, https://robohub.org/wp-content/uploads/2013/12/thymio-scales-293x300.jpg 293w, https://robohub.org/wp-content/uploads/2013/12/thymio-scales-32x32.jpg 32w, https://robohub.org/wp-content/uploads/2013/12/thymio-scales-64x64.jpg 64w" sizes="(max-width: 700px) 100vw, 700px" />
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Up and flying with the AR.Drone and ROS: Handling feedback</title>
		<link>https://robohub.org/up-and-flying-with-the-ar-drone-and-ros-handling-feedback/</link>
		
		<dc:creator><![CDATA[Mike Hamer]]></dc:creator>
		<pubDate>Mon, 01 Jul 2013 14:14:19 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[AR Drone]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[UAVs & drones]]></category>
		<guid isPermaLink="false">http://robohub.org/?p=16026</guid>

					<description><![CDATA[This is the third tutorial in the Up and flying with the AR.Drone and ROS series. In this tutorial we will: Learn about the AR.Drone&#8217;s state feedback (and how it is handled by ROS) Learn about the AR.Drone&#8217;s tag detection Program our first ROS nodes: A subscriber and a publisher In the previous tutorials we: Installed ROS, the AR.Drone driver [&#8230;]]]></description>
										<content:encoded><![CDATA[<link href="syntax_highlight.css" rel="stylesheet" media="all" type="text/css" />
<style type="text/css"><!--
.maintext p {
	margin-top: 1em !important;
	margin-bottom: 1em !important;
}
.maintext pre {
	margin-top: 1em !important;
	margin-bottom: 1em !important;
}
.maintext v {
	font-family:monospace !important;
	/*background-color:#EEE;*/
}
.maintext ol li {
	margin-top: 1em !important;
}
.maintext ol li ul {
	margin: 0px !important;
	padding: 0px !important;
}
.maintext ol li ul li{
	margin: 0.5em !important;
}
--></style>
<a href="https://github.com/mikehamer/ardrone_tutorials" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"><img decoding="async" class="size-full wp-image-16027" alt="ARDroneSubscribingFeedback" src="http://robohub.org/wp-content/uploads/2013/07/ARDroneHandlingFeedback900400.png" width="216" height="166" /></a>
<div style="clear: both;"></div>
<p>This is the third tutorial in the <em>Up and flying with the AR.Drone and ROS</em> series.</p>
<p>In this tutorial we will:</p>
<ol>
<li>Learn about the AR.Drone&#8217;s state feedback (and how it is handled by ROS)</li>
<li>Learn about the AR.Drone&#8217;s tag detection</li>
<li>Program our first ROS nodes: A subscriber and a publisher</li>
</ol>
<p><span id="more-16026"></span></p>
<p>In the previous tutorials we:</p>
<ol>
<li>Installed ROS, the AR.Drone driver and AR.Drone keyboard controller then flew the AR.Drone using the provided keyboard controller (<a href="/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">link</a>)</li>
<li>Learned about ROS communication, setup and then flew the AR.Drone using a joystick (<a href="/up-and-flying-with-the-ar-drone-and-ros-joystick-control/" data-wpel-link="internal">link</a>)</li>
</ol>
<p>In the next tutorials, we will:</p>
<ul>
<li>Write a controller to enable tag following</li>
<li>Write a controller for the drone which allows us to control drone velocity, rather than body angle</li>
</ul>
<h2><strong>What you&#8217;ll need for the tutorial</strong></h2>
<ol>
<li>An AR.Drone!</li>
<li>A computer or laptop with WiFi</li>
<li>Linux, either the ARDroneUbuntu virtual machine, or a custom installation</li>
<li>Either the keyboard or joystick controller from the previous tutorials</li>
</ol>
<p>I also assume that you&#8217;ve completed either the <a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">keyboard</a> or <a href="http://http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-joystick-control/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">joystick</a> tutorial, which detail how to setup the software, connect to the drone, etc, and provide a method of controlling the AR.Drone from your computer.</p>
<div class="aligncenter" style="background-color: #eee; padding: 5px; margin: 10px; margin-top: 4em; border: 1px solid #666; width: 90%;">
<p style="text-align: center; margin-top: 0; padding-top: 0;"><strong>Warning!</strong></p>
<p>In this tutorial, we will be flying the AR.Drone. <strong>Flying inside can be dangerous</strong>. When flying inside, you should always use the propeller-guard and fly in the largest possible area, making sure to stay away from walls and delicate objects. Even when hovering, the drone tends to drift, so always land the drone if not being flown.</p>
<p style="margin: 0px;">I accept no responsibility for damages or injuries that result from flying the drone.</p>
</div>
<h2><strong>Updating</strong></h2>
<h3>If you have not completed the <a href="http://http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-joystick-control/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">joystick</a> tutorial:</h3>
<p>Please go back and update your installation according to the instructions listed there.</p>
<h3>If you downloaded the ARDroneUbuntu virtual machine:</h3>
<p>To update your installation for this tutorial, click the &#8220;Update Tutorials&#8221; button in the ARDroneUbuntu Virtual Machine</p>
<h3>If you use a custom installation:</h3>
<p>At the terminal, enter the following:</p>
<pre>$ roscd ardrone_autonomy
$ git pull
$ roscd ardrone_tutorials
$ git pull
$ roscd
$ rosmake ardrone_tutorials</pre>
<h2><strong>AR.Drone State Feedback &#8211; A First Look</strong></h2>
<h3>Preparation:</h3>
<ol>
<li>Find the Orange-[Green|Yellow|Blue]-Orange tag that came with the AR.Drone.</li>
<li>In your ARDroneUbunutu virtual machine (or custom installation), open a new terminal window and type:
<pre>$ roscd ardrone_tutorials/launch</pre>
</li>
<li>If you intend to fly with the keyboard, type:
<pre>$ geany keyboard_controller_with_tags.launch</pre>
<p>Otherwise, if you intend to fly with the joystick:</p>
<pre>$ geany joystick_controller.launch</pre>
</li>
<li>Now find the line:
<pre>&lt;param name="enemy_colors" value="3" /&gt;</pre>
</li>
<li>And change the value to &#8220;1&#8221;, &#8220;2&#8221;, or &#8220;3&#8221;, depending on whether your tags are Orange-Green-Orange, Orange-Yellow-Orange or Orange-Blue-Orange respectively.</li>
</ol>
<h3>Tag Detection and Feedback Data</h3>
<ol>
<li>Run the system (but don&#8217;t takeoff with the drone!) using either the <a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">keyboard_controller</a>:
<pre>$ roslaunch ardrone_tutorials keyboard_controller_with_tags.launch</pre>
<p>or the <a href="http://http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-joystick-control/" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">joystick_controller</a>:</p>
<pre>$ roslaunch ardrone_tutorials joystick_controller.launch</pre>
</li>
<li>Open a new terminal window and type:
<pre>$ rostopic list</pre>
<ul>
<li>This list shows all the active ROS &#8220;topics&#8221; used for communication to and from the AR.Drone</li>
</ul>
</li>
<li>In the same terminal window, type:
<pre>$ rostopic echo /ardrone/navdata</pre>
<ul>
<li>This echoes the AR.Drone&#8217;s feedback data into the terminal window.</li>
<li>Note that many items will be zero because the AR.Drone is not yet flying</li>
</ul>
</li>
<li>Move the Orange-Color-Orange tag in front of the AR.Drone&#8217;s front camera. It should be detected, and the console output (from the previous step), should update to reflect this detection.
<ul>
<li>Note the tags_xc and tags_yc values. These represent the x/y location of the tag within the image.</li>
<li>The video display window will show a dot at these coordinates, and the distance measurement above the dot</li>
</ul>
</li>
<li>Now place the tag somewhere that can be seen by the flying drone. After this is done, take off with the drone.</li>
<li>Watch the console output. What happens if you fly forwards? sideways? What variable changes if you rotate the drone?</li>
</ol>
<h3>Plotting the AR.Drone&#8217;s State</h3>
<ol>
<li>A more intuitive way of representing this feedback data is using a plot. PressCtrl-C to terminate the echo process from the last stage, and then type:
<pre>$ rxplot /ardrone/navdata/rotX,/ardrone/navdata/rotY</pre>
<ul>
<li>This launches a plotting window showing the AR.Drone&#8217;s estimated roll (rotX) and pitch (rotY).</li>
<li>Similar plots could, for example, be generated for yaw (rotZ), x and y velocity (vx and vy), altitude (altd), etc.</li>
</ul>
</li>
<li>Similarly to displaying the AR.Drone&#8217;s feedback data, we can use the plotting method to investigate how we are controlling the drone:
<pre>$ rxplot /cmd_vel/linear/y,/cmd_vel/linear/x</pre>
<ul>
<li>This plots the roll (linear/y) and pitch (linear/x) commands.</li>
<li>Note that these are scaled with a value of $\pm1$ being the maximum commandable angle (set by the euler_angle_max in the launch file).</li>
<li>Note also that the direction of AR.Drone movement is commanded (ie. move <em>along</em> the x-axis = /cmd_vel/linear/x = commanded pitch), whereas the AR.Drone&#8217;s feedback data is named with reference to axis of rotation (ie. tilt <em>around</em> y-axis = /ardrone/navdata/rotY = feedback pitch).</li>
</ul>
</li>
</ol>
<h3>Logging Data</h3>
<ol>
<li>To log data, we can use the inbuilt ROS command <a href="http://www.ros.org/wiki/rosbag/Tutorials/Recording%20and%20playing%20back%20data" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">rosbag</a>:
<pre>$ rosbag record -O ARDroneFlight.bag /ardrone/navdata /cmd_vel</pre>
<ul>
<li>This will record the topics /ardrone/navdata and /cmd_vel to a &#8220;bag-file&#8221;, stamped with the current date and time.</li>
<li>Leave this process running for a few seconds, fly the AR.Drone around, and when finished press Ctrl-C to terminate.</li>
<li>Recording all topics is possible with rosbag record -a, however this also records the AR.Drone&#8217;s HD video stream, thus bag-files will quickly become very large</li>
<li>The advantage of using rosbag to log data, is that bag-files can be replayed at a later time, and interact very nicely with the existing ROS infrastructure.</li>
</ul>
</li>
<li>Land the AR.Drone and close any windows / terminate any processes relating to the controller. Now, into the terminal window that ran the AR.Drone controller, type:
<pre>$ roscore</pre>
<p>Now open a new terminal window and type:</p>
<pre>$ rxplot /cmd_vel/linear/y,/cmd_vel/linear/x</pre>
<p>Now finally (ignoring the warning from the previous step), switch back to the terminal window that you used to run the rosbag command and type:</p>
<pre>$ rosbag play ARDroneFlight.bag</pre>
<p>Does the flight look familiar? It should! This is the flight you recorded in the last step! Use Ctrl-C to terminate the above processes.</li>
</ol>
<h2><strong>Custom Data Handling</strong></h2>
<p>In the last section, we investigated the AR.Drone&#8217;s feedback data by using ROS&#8217;s inbuilt plotting (rxplot) and logging (rosbag) commands. In this section, you will learn how we get this feedback data into your own application by writing a custom ROS Node. This node will be used to compare the commanded roll and pitch angles with the AR.Drone&#8217;s roll and pitch estimates, thus laying the foundations for the next tutorial, where we will use this feedback data to programmatically control the AR.Drone.</p>
<h3>Messages, Topics and Nodes</h3>
<p>In ROS terminology, a program is known as a <em>Node</em>. To interact with other nodes (for example the AR.Drone driver), each node will have some <em>subscribers</em>, which listen for information messages on a specific <em>topic</em> (communications channel); and some <em>publishers</em>, which send messages to a specific <em>topic</em>.</p>
<p>These messages can be anything. An example that we saw in the previous section was the <em>Navdata</em> message, which is sent over the /ardrone/navdata topic and contains feedback data from the AR.Drone.</p>
<p>We will now investigate this message a little further. Open up a new terminal window and type</p>
<pre>rosmsg show ardrone_autonomy/Navdata</pre>
<p>You should be presented with the following output:</p>
<pre>$ rosmsg show ardrone_autonomy/Navdata
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
float32 batteryPercent
uint32 state
int32 magX
int32 magY
int32 magZ
int32 pressure
int32 temp
float32 wind_speed
float32 wind_angle
float32 wind_comp_angle
float32 rotX
float32 rotY
float32 rotZ
int32 altd
float32 vx
float32 vy
float32 vz
float32 ax
float32 ay
float32 az
uint32 tags_count
uint32[] tags_type
uint32[] tags_xc
uint32[] tags_yc
uint32[] tags_width
uint32[] tags_height
float32[] tags_orientation
float32[] tags_distance
float32 tm</pre>
<p>This listing shows us the various members of the Navdata message, including their datatypes. Note that the Navdata message has a header, which includes the time the message is sent.</p>
<h3>Minimum Viable Subscriber</h3>
<p>Open up a new terminal window and type:</p>
<pre>$ roscd ardrone_tutorials
$ geany src/minimum_viable_subscriber.py</pre>
<p>Up will pop a geany window, ready for your to edit the new file. Enter the following into the new geany window, then save and close the file:</p>
<pre><code data-language="python">import roslib
import rospy

roslib.load_manifest('ardrone_tutorials')

from ardrone_autonomy.msg import Navdata

def ReceiveData(data):
  print '[{0:.3f}] Pitch: {1:.3f}'.format(data.header.stamp.to_sec(), data.rotY)

rospy.init_node('minimum_viable_subscriber')
sub_Navdata = rospy.Subscriber('/ardrone/navdata', Navdata, ReceiveData)

while not rospy.is_shutdown():
  pass</code></pre>
<p>We will now use the previously recorded bag-file to test the node that we&#8217;ve just written.</p>
<ol>
<li>In one terminal window, enter:
<pre>$ roscore</pre>
<p>Which begins the roscore process, which coordinates the interactions between nodes.</li>
<li>Now in a new terminal window type:
<pre>$ roscd ardrone_tutorials
$ python src/minimum_viable_subscriber.py</pre>
<p>This will launch the node that we&#8217;ve just programmed.</li>
<li>Finally, in a third terminal window, begin the bag-file playback with:
<pre>$ rosbag play ARDroneFlight.bag</pre>
<ul>
<li>Note you must be in the same directory as the bag-file for the above command to work</li>
</ul>
</li>
<li>If you switch back to the terminal window in which our new node is running, you should see a stream of time-stamped printouts with the drone&#8217;s pitch, for example:
<pre>[1353596639.491] Pitch: 4.375
[1353596639.511] Pitch: 4.128
[1353596639.531] Pitch: 3.750
[1353596639.552] Pitch: 3.304
[1353596639.571] Pitch: 3.063</pre>
</li>
</ol>
<h3>Minimum Viable Subscriber: A Closer Look</h3>
<p>If you made it through the previous section, congratulations, you have successfully written and tested a ROS node, which listens for Navdata measurements from the AR.Drone (or equivalently: a recorded flight) and outputs a time-stamped pitch measurement. But how does it all work?</p>
<p>Lets take a look at the source-code from the previous section, line by line:</p>
<pre><code data-language="python">import roslib
import rospy</code></pre>
<p>With these two lines, we import the standard ROS packages, required for every ROS node.</p>
<pre><code data-language="python">roslib.load_manifest('ardrone_tutorials')</code></pre>
<p>Once the required packages are imported, load the <a href="http://ros.org/wiki/Manifest" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"><em>manifest</em> file</a>. This file details the dependencies of the current project (for example, that ardrone_tutorials is dependent on the AR.Drone driver, ardrone_autonomy), which through the above command are loaded into the path.</p>
<pre><code data-language="python">from ardrone_autonomy.msg import Navdata</code></pre>
<p>Once the project dependencies have been loaded, we can import those which are needed by the current node. In the above case, we load the Navdata message definition from the ardrone_autonomy package.</p>
<pre><code data-language="python">def ReceiveData(data):
  print '[{0:.3f}] Pitch: {1:.3f}'.format(data.header.stamp.to_sec(), data.rotY)</code></pre>
<p>Here we define a callback function to handle the Navdata messages. This function prints a formatted string containing the message&#8217;s timestamp and the AR.Drone&#8217;s pitch angle. This callback function will be used later in the program.</p>
<pre><code data-language="python">rospy.init_node('minimum_viable_subscriber')</code></pre>
<p>Before issuing any commands to the rospy package, we need to initialize a ROS node.</p>
<pre><code data-language="python">sub_Navdata = rospy.Subscriber('/ardrone/navdata', Navdata, ReceiveData)</code></pre>
<p>We can now subscribe the node to various topics. Above we subscribe the node to the /ardrone/navdata topic, which carries Navdata messages. Received messages should then be handled by the previously-defined ReceiveData function.</p>
<pre><code data-language="python">while not rospy.is_shutdown():
  pass</code></pre>
<p>Because our program is relying on callbacks for data processing, we need to stop the program from terminating. The above defines a loop that runs until the node is shut down (for example with Ctrl-C). In most situations the above loop would perform some sort of processing, however in our example, we simply pass (do nothing).</p>
<h2>Publishing Data</h2>
<p>In this section we will introduce the concept of publishing data to a topic (the opposite of subscribing). We will be using this more extensively in the next tutorial, where we will be programmatically controlling the AR.Drone by publishing messages to the /cmd_vel topic.</p>
<h3>Minimum Viable Publisher</h3>
<p>The goal of this section is to create a minimum_viable_publisher.py file such that Navdata messages are averaged over a second and the average pitch published to the (new) /ardrone/average_pitch topic. Modify the file as follows:</p>
<pre><code data-language="python">import roslib
import rospy

roslib.load_manifest('ardrone_tutorials')

from ardrone_autonomy.msg import Navdata
from std_msgs.msg import String

messages = []

def ReceiveData(data):
  messages.append(data)

rospy.init_node('minimum_viable_publisher')
sub_Navdata = rospy.Subscriber('/ardrone/navdata', Navdata, ReceiveData)
pub_Average = rospy.Publisher('/ardrone/average_pitch', String)

r = rospy.Rate(1)
while not rospy.is_shutdown():
  if len(messages)&gt;0:
    avg = sum([m.rotY for m in messages])/len(messages)
    messages = []

    avgmsg = String()
    avgmsg.data = 'Average Pitch: {0:.3f}'.format(avg)
    pub_Average.publish(avgmsg)
  r.sleep()</code></pre>
<p>You can run the program using the following series of commands:</p>
<ol>
<li>In one terminal, run:
<pre>$ roscore</pre>
</li>
<li>In the next terminal, run the new program
<pre>$ roscd ardrone_tutorials
$ python src/minimum_viable_publisher.py</pre>
</li>
<li>We now echo the published data to the topic we&#8217;ve created:
<pre>$ rostopic echo /ardrone/average_pitch</pre>
</li>
<li>And finally, like we&#8217;ve done twice before, we begin the playback of our recorded flight
<pre>$ rosbag play ARDroneFlight.bag</pre>
</li>
<li>Switching back to the terminal in which we ranrostopic echo, you should see a new message with the average pitch appearing once a second:
<pre>data: Average Pitch: 0.649
---
data: Average Pitch: 1.078
---
data: Average Pitch: 3.781
---
data: Average Pitch: 3.285
---</pre>
</li>
</ol>
<h3>Minimum Viable Publisher: A Closer Look</h3>
<p>Comparing minimum_viable_publisher.py to minimum_viable_subscriber.py from the last section, we can see many similarities:</p>
<pre><code data-language="python">from ardrone_autonomy.msg import Navdata
from std_msgs.msg import String</code></pre>
<p>We additionally import the String message, required for our new topic.</p>
<pre><code data-language="python">messages = []
def ReceiveData(data):
  messages.append(data)</code></pre>
<p>We have updated the navdata callback function to save the messages in a queue, rather than process them straight away.</p>
<p><strong>Note:</strong> because we&#8217;re accessing the messages list in both a callback function and the main loop, we should be using Python&#8217;s threading.Lock to control access to the list and prevent race conditions. See ardrone_tutorials/src/drone_video_display.py for an example.</p>
<pre><code data-language="python">pub_Average = rospy.Publisher('/ardrone/average_pitch', String)</code></pre>
<p>We create a new publisher, responsible for publishing messages of the String type to the /ardrone/average_pitch topic. Note that we do not need to explicitly initialize this topic, it will be initialized automatically on first usage.</p>
<p>The biggest change is in the program&#8217;s main loop, which I will now cover in a little more detail:</p>
<pre><code data-language="python">r = rospy.Rate(1)</code></pre>
<p>Firstly we define a Rate object. We use this to control the frequency of the main processing loop. In our case, we want to print a message every second, thus we want a frequency of $1 \text{Hz}$.</p>
<pre><code data-language="python">while not rospy.is_shutdown():
  if len(messages)&gt;0:
    avg = sum([m.rotY for m in messages])/len(messages)
    messages = []

    avgmsg = String()
    avgmsg.data = 'Average Pitch: {0:.3f}'.format(avg)
    pub_Average.publish(avgmsg)</code></pre>
<p>If messages have been received, we calculate the average pitch using a python list comprehension to extract the pitch (.rotY) from every Navdata message. We then empty the messages queue.</p>
<p>We then construct a new String message and set its data property, before publishing it to the topic we previously created.</p>
<pre><code data-language="python">r.sleep()</code></pre>
<p>Finally, we tell the rate object to sleep. This command will calculate how long it needs to sleep, such that the desired loop frequency is achieved.</p>
<h2>Conclusions</h2>
<p>I hope you&#8217;ve enjoyed working through this tutorial and learning about data flow in the ROS environment. In the next tutorial, which I will release in a month&#8217;s time, we will use what we have learned today to programmatically control the AR.Drone, while at the same time learning about PID control.</p>
<p>If you have any questions about the tutorial, please leave me a comment below and I will get back to you as soon as possible!</p>
<p>You can see all the tutorials in here: <a href="http://robohub.org/tag/parrot-ar-drone-tutorial/" data-wpel-link="internal">Up and flying with the AR.Drone and ROS</a>.</p>
<p><em>If you liked this article, you may also be interested in:</em></p>
<ul>
<li><a title="Permalink to Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft" href="http://robohub.org/parrot-ar-drone-app-harnesses-crowd-power-to-fast-track-vision-learning-in-robotic-spacecraft/" rel="bookmark" data-wpel-link="internal">Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft</a></li>
<li><a href="http://robohub.org/taking-your-first-steps-in-robotics-with-the-thymio-ii/" data-wpel-link="internal">Taking your first steps in robotics with the Thymio II</a></li>
<li><a title="Permalink to Discovering social robotics with the Aisoy1" href="http://robohub.org/discovering-social-robotics-with-the-aisoy1/" rel="bookmark" data-wpel-link="internal">Discovering social robotics with the Aisoy1</a></li>
<li><a title="Permalink to Classroom robotics: Motivating independent learning and discovery" href="http://robohub.org/classroom-robotics-motivating-independent-learning-and-discovery/" rel="bookmark" data-wpel-link="internal">Classroom robotics: Motivating independent learning and discovery</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a href="http://eepurl.com/t-UEf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">sign up for our weekly newsletter</a>.</em></p>
<p><em> </em></p>
<p><script type="text/x-mathjax-config">// <![CDATA[
MathJax.Hub.Config({
  TeX: { equationNumbers: { autoNumber: "AMS" } }
});
// ]]&gt;</script></p>
<p><script type="text/x-mathjax-config">// <![CDATA[
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
// ]]&gt;</script></p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Up and flying with the AR.Drone and ROS: Joystick control</title>
		<link>https://robohub.org/up-and-flying-with-the-ar-drone-and-ros-joystick-control/</link>
		
		<dc:creator><![CDATA[Mike Hamer]]></dc:creator>
		<pubDate>Sat, 05 Jan 2013 04:47:10 +0000</pubDate>
				<category><![CDATA[education]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[AR Drone]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[UAVs & drones]]></category>
		<guid isPermaLink="false">http://robohub.org/?p=7071</guid>

					<description><![CDATA[This is the second tutorial in the Up and flying with the AR.Drone and ROS series. In this tutorial we will: Talk about the ROS communication hierarchy Setup a joystick to work with ROS Fly the AR.Drone with a joystick In the previous tutorial we: Installed ROS, the AR.Drone driver and AR.Drone keyboard controller then flew the AR.Drone using the [&#8230;]]]></description>
										<content:encoded><![CDATA[<style type="text/css"><!--
#fstxfloat * {   line-height: 1.5em } #fstxfloat p {   margin-top: 1em;   margin-bottom: 1em; } #fstxfloat pre {   margin-top: 1em;   margin-bottom: 1em; } #fstxfloat ol, #fstxfloat ul {   margin: 10px !important;   padding: 0px !important;   padding-left: 15px !important; } #fstxfloat h2 {   margin-top:2.5em;   font-weight:bold;   font-size:16px; }
--></style>
<a href="https://github.com/mikehamer/ardrone_tutorials" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer"><img decoding="async" class="aligncenter size-full wp-image-6626" title="ARDroneKeyboardControl" alt="" src="http://robohub.org/wp-content/uploads/2013/01/ARDroneJoystickControl.png" width="323" height="216" /></a>
<div style="clear: both;"></div>
<p>This is the second tutorial in the <em>Up and flying with the AR.Drone and ROS</em> series.</p>
<p>In this tutorial we will:</p>
<ol>
<li>Talk about the ROS communication hierarchy</li>
<li>Setup a joystick to work with ROS</li>
<li>Fly the AR.Drone with a joystick</li>
</ol>
<p><span id="more-7071"></span></p>
<p>In the <a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">previous tutorial</a> we:</p>
<ol>
<li>Installed ROS, the AR.Drone driver and AR.Drone keyboard controller then flew the AR.Drone using the provided keyboard controller (<a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">link</a>)</li>
</ol>
<p>In the next tutorials, we will:</p>
<ul>
<li>Look more closely at the data sent back from the drone and play with the on-board tag detection (<a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-handling-feedback/" data-wpel-link="internal">link</a>)</li>
<li>Write a controller for the drone to enable tag following</li>
<li>Write a controller for the drone which allows us to control drone velocity, rather than body angle</li>
</ul>
<h2><strong>What you&#8217;ll need for the tutorial</strong></h2>
<p>To complete this tutorial you will need:</p>
<ol>
<li>An AR.Drone!</li>
<li>A computer or laptop with WiFi</li>
<li>Linux, either the ARDroneUbuntu virtual machine, or a custom installation</li>
<li>A  (linux compatible) USB joystick or control pad</li>
</ol>
<p>I also assume that you&#8217;ve completed the <a href="http://robohub.org/up-and-flying-with-the-ar-drone-and-ros-getting-started/" data-wpel-link="internal">previous tutorial</a>, which details how to setup the software, connect to the drone, etc.</p>
<div class="aligncenter" style="background-color: #eee; padding: 5px; margin: 10px; margin-top: 4em; border: 1px solid #666; width: 90%;">
<p style="text-align: center; margin-top: 0; padding-top: 0;"><strong>Warning!</strong></p>
<p>In this tutorial, we will be flying the AR.Drone. <strong>Flying inside can be dangerous</strong>. When flying inside, you should always use the propellor-guard and fly in the largest possible area, making sure to stay away from walls and delicate objects. Even when hovering, the drone tends to drift, so always land the drone if not being flown.</p>
<p style="margin: 0px;">I accept no responsibility for damages or injuries that result from flying the drone.</p>
</div>
<h2><strong>Updating</strong></h2>
<p>It has been three weeks since the launch of the first tutorial and I am very happy with the response so far. The tutorial has been viewed over 720 times and ARDroneUbuntu downloaded over 50 times. I was also given the honor of partaking in <a href="http://www.robotgarden.org/" target="_blank" data-wpel-link="external" rel="follow external noopener noreferrer">RobotGarden&#8217;s</a> very first Quadrocoptor Workshop, where we worked through the tutorial (and ironed out the bugs) together.</p>
<p>This response has taught me a few things about how to structure a tutorial series, and how to release a virtual machine. Based on what I have learned, I will be restructuring the source-code for the following tutorials. I will also be updating the virtual machine to reflect these changes.</p>
<p>When writing the first tutorial, I thought it would be better to have a separate repository for each tutorial to keep everything atomic and isolated to ensure the addition of a new tutorial would not affect anything in the past – However having learned from the video-hangout with RobotGarden, I realize this could cause an update nightmare down the track. For this reason, I have decided to operate from a <a href="https://github.com/mikehamer/ardrone_tutorials" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">single repository</a> and will maintain a stable branch for each tutorial, with the master branch always synchronized with the stable version of the latest tutorial. The source-code for each tutorial will also contain all source-code required to run the previous tutorials.</p>
<h2><strong>What this means for you:</strong></h2>
<ul>
<li><strong>If you downloaded the ARDroneUbuntu virtual machine before the release of this tutorial</strong>, you will need to click the &#8220;Update Tutorials&#8221; button <strong>twice</strong>. After this, your virtual machine will be updated to reflect the new changes.</li>
<li><strong>If you installed the tutorials manually</strong>, you will need to run the following at the terminal:
<pre># roscd
# rm -rf ardrone_tutorials_getting_started
# git clone https://github.com/mikehamer/ardrone_tutorials</pre>
</li>
<li><strong>If you have not yet downloaded the VM</strong>, no problems! I have released an up-to-date version that you can download <a href="http://bit.ly/VqtDql" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">from here</a></li>
</ul>
<p>Sorry for any hassle caused by the above, I hope this new structure will allow me to more easily deliver the next tutorials!</p>
<h2><strong>So without further ado, lets check out some data!</strong></h2>
<ol>
<li>Connect to the AR.Drone as detailed in the first tutorial (remembering to disconnect other network adaptors if they use the 192.168.1.x address range)</li>
<li>From within your Linux installation, launch two terminal windows (ARDroneUbuntu users, refer to the first tutorial if you&#8217;re not sure what I mean)</li>
<li>In the first window, launch the KeyboardController from the first tutorial, using the command:
<pre>$ roslaunch ardrone_tutorials keyboard_controller.launch</pre>
</li>
<li>Wait for everything to load and the video display to become active, then in the second terminal window enter the command:
<pre>$ rostopic list</pre>
<p>This command lists all active &#8220;topics&#8221;, the communication channels through which ROS programs (called &#8220;nodes&#8221;) communicate.</li>
<li>To view the currently running ROS Nodes, type:
<pre>$ rxgraph</pre>
<p>The window that appears will show a network of nodes, and how they are connected through the topics that we saw in the previous step.</li>
<li>When you&#8217;re ready, close this window. We&#8217;re now going to have a look at the messages that are being sent between nodes. At the terminal, type:
<pre>$ rostopic echo /ardrone/navdata</pre>
<p>The navdata message is published by the AR.Drone driver at a rate of 50Hz.</li>
<li>Press Ctrl-C to stop echoing the navdata message then switch to the other terminal window and press Ctrl-C again, to stop the roscore program</li>
</ol>
<h2><strong>So what are we setting up today?</strong></h2>
<p>After that whirlwind tour of the ROS communication hierarchy, lets take a look at what we&#8217;ll be building today:</p>
<a href="http://robohub.org/wp-content/uploads/2013/01/ROSCommunication.png" data-wpel-link="internal"><img decoding="async" class="aligncenter size-full wp-image-7336" title="ROSCommunication" alt="" src="http://robohub.org/wp-content/uploads/2013/01/ROSCommunication.png" width="800" height="278" srcset="https://robohub.org/wp-content/uploads/2013/01/ROSCommunication.png 800w, https://robohub.org/wp-content/uploads/2013/01/ROSCommunication-300x104.png 300w, https://robohub.org/wp-content/uploads/2013/01/ROSCommunication-500x173.png 500w" sizes="(max-width: 800px) 100vw, 800px" /></a>
<div style="clear: both;"></div>
<p>As shown above, today we&#8217;ll be setting up the joy_node (a standard ROS package) to listen for input from a joystick or control-pad. This input will be converted into a ROS message, then sent to our controller over the <em>joy</em> topic.</p>
<p>Our controller subscribes to the <em>joy</em> topic and reacts to the received messages by translating joystick movement into drone movement commands, which are then published to the <em>cmd_vel</em> topic; and button presses to takeoff, land, or emergency commands, which are each published to a respective channel.</p>
<p>The ardrone_driver receives these various commands and then sends them via the wireless network to the physical drone, which in turn sends back a video stream. This video stream is published by the ardrone_driver onto the <em>/ardrone/image_raw</em> topic, from where it is received and subsequently displayed by our controller.</p>
<h2><strong>Setting up a joystick</strong></h2>
<p>Firstly, we need to connect the joystick and set it up to work with ROS.</p>
<ol>
<li>Open a terminal window (or reuse one from before), then type:
<pre>$ ls /dev/input</pre>
</li>
<li>Take note of the <strong>jsX</strong> devices (where X is a number). These are not your joystick.</li>
<li>Now connect your joystick to the computer and again type:
<pre>$ ls /dev/input</pre>
</li>
<li>If you see a new <strong>jsX</strong> device appear, congratulations, you&#8217;ve successfully connected the joystick, take note of which device this is, then progress to the next section of the tutorial</li>
<li>If no new jsX device appears when you connect the joystick, you&#8217;re most likely using a virtual machine and may need to add the USB device manually.</li>
<li>If you are using the ARDroneUbuntu virtual machine, open the Machine &gt; Settings window, then the Ports &gt; USB tab. With the joystick plugged in, add a new USB device. Your joystick should appear in the dropdown list.</li>
<li>Click OK, then unplug the joystick from the computer</li>
<li>Repeat steps 3 and 4, plugging the joystick into a different USB port if it is not detected in step 4.</li>
</ol>
<h2><strong>Testing the joystick</strong></h2>
<p>Now that we have the joystick installed, let&#8217;s check to make sure everything is working. Type the following at a terminal, substituting <strong>jsX</strong> for the joystick device you previously identified:</p>
<pre>$ jstest /dev/input/jsX</pre>
<p>If you are greeted with a &#8220;jstest: Permission denied&#8221; error, type:</p>
<pre>$ sudo chmod a+r /dev/input/jsX</pre>
<p>Which enables all users to read the joystick device (ARDroneUbuntu users, the password is: <em>ardrone</em>). After running <em>jstest</em>, moving the joystick should cause the numbers on the screen to update, if not, try running <em>jstest</em> for the other jsX devices. Congratulations, your joystick device is working! Press Ctrl-C to exit.</p>
<h2><strong>Using the joystick with ROS</strong></h2>
<p>Now we&#8217;re ready to integrate the joystick device with the ROS ecosystem using ROS&#8217;s &#8220;Joy&#8221; package.</p>
<ol>
<li>Open up three terminal windows. In the first, launch roscore:
<pre>$ roscore</pre>
</li>
<li>In the second, we launch ROS&#8217;s joystick launcher, replacing jsX with the joystick device you previously identified:
<pre>$ rosparam set joy_node/dev "/dev/input/jsX"
$ rosrun joy joy_node</pre>
</li>
<li>Now in the third terminal window, we echo the Joy messages, sent out by the joy_node that we just launched:
<pre>$ rostopic echo joy</pre>
</li>
<li>If all is working, you should see a Joy message print on the console whenever the joystick is moved (or a button is pressed).</li>
</ol>
<h2><strong>Identifying Control Buttons &amp; Axes</strong></h2>
<p>We now have the task of identifying the various axis and buttons used to fly the drone. All in all, you will need to identify axes to control the AR.Drone&#8217;s roll, pitch, yaw-velocity and z-velocity; and buttons to trigger an emergency, command a takeoff, and command a landing.</p>
<p>To identify the emergency button for example, press the button you would like to trigger an emergency, and watch the terminal to see which button is enabled. In my case, I use the joystick&#8217;s trigger button for emergency (being able to react quickly to an emergency is very important). With the button pressed, the following is printed in the terminal window:</p>
<pre>axes: [-0.0, -0.0, -0.0, -0.0, 0.0, 0.0]
buttons: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]</pre>
<p>From this I can identify that: <em>Emergency = Button 0</em> (note that indexing starts from zero). The process follows similarly for identifying an axis:</p>
<ol>
<li>Press the joystick fully left. The axis that changes  (the first number in the list is axis 0) is the <em>roll axis,</em> the number if changes to is your <em>roll scale </em>(usually + or -1)</li>
<li>Press the joystick fully forward. The axis that changes is your <em>pitch axis</em>, and the number it changes to is the <em>pitch scale </em>(usually + or -1)</li>
<li>Rotate your joystick fully counter clockwise, the axis that changes is your <em>yaw axis</em> and the number it changes to is the <em>yaw scale </em>(usually + or -1)</li>
<li>Push your throttle stick fully forwards. The axis that changes is your <em>z-axis</em> and the number it changes to is the <em>z-scale</em> (usually + or -1).</li>
</ol>
<div>A quick example, I push my joystick fully left and see</div>
<pre>axes: [1.0, -0.0, -0.0, -0.0, 0.0, 0.0]
buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]</pre>
<p>From this I identify that the <em>Roll Axis = 0 </em>and <em>Roll Scale = 1</em>.</p>
<p>After you have identified all axes and buttons, press Ctrl-C in all terminal windows to stop the processes.</p>
<h2><strong>Configuring the Joystick Controller</strong></h2>
<p>In ROS, a &#8220;Launch File&#8221; is used to configure and launch a set of nodes. We&#8217;ve already seen this in the first tutorial (and at the beginning of this one), where we typed:</p>
<pre>$ roslaunch ardrone_tutorials keyboard_controller.launch</pre>
<p>In this command, <em>keyboard_controller.launch</em> configures the ARDrone driver for indoor flight, then launches both the driver and keyboard controller. Similarly in this tutorial, we will be launching the joystick controller (and related nodes) using a launch file.</p>
<p>Go ahead and open a terminal window, then type:</p>
<pre>$ roscd ardrone_tutorials
$ geany launch/joystick_controller.launchtemplate</pre>
<p>This will open the<em> joystick_controller.launch </em>file in the text editor (non ARDroneUbuntu users can use a text editor of choice). You will need to customize this file for your setup.</p>
<ul>
<li>Update line 21 to reflect your joystick device (the /dev/input/jsX that you identified earlier).</li>
<li>Update lines 27-29 to reflect your button mapping</li>
<li>Update lines 32-35 to reflect your axis mapping</li>
<li>Update lines 38-41 to reflect your scales (usually either 1 or -1)<br />
These scaling factors determine for example the drone roll direction when the joystick is tilted along the roll axis. If your drone does the opposite of what you expect, change the sign on the relevant scaling factor (eg 1 becomes -1)</li>
</ul>
<p>Feel free to have a look at some of the parameters used on the drone. The drone&#8217;s control parameters can potentially be increased to allow for more aggressive flight.</p>
<p>Once you&#8217;re happy with the settings, <strong>save this file as joystick_controller.launch</strong>, then close the geany application.</p>
<h2><strong>Finally flying!</strong></h2>
<p>So, after that rather long endeavor (which you should only need to do once), lets fly!</p>
<p>Connect to the drone, disconnect other network devices, then open a terminal and type:</p>
<pre>$ roslaunch ardrone_tutorials joystick_controller.launch</pre>
<p>This will launch the nodes as you configured in launch file. If all goes well, you should now be able to fly the drone using your joystick.</p>
<p>Before commanding the drone to take-off, you should first check that your emergency button works. With the drone still landed, press the emergency button once. All onboard LEDs should turn red. Pushing the button again will reset the drone, and the LEDs will once again turn green. In addition to this, whenever a (mapped) button is pressed, the joystick_controller will print a message to the terminal, such as &#8220;Emergency Button Pressed&#8221;. This is a further indication that things are working!</p>
<p>You&#8217;re now ready to take off. Have fun!</p>
<h2>Going Further</h2>
<p>The above child&#8217;s play? Heres some ideas for exploring the ROS and ARDrone environment:</p>
<ul>
<li>While the joystick controller is running, open a new terminal window and type:
<pre>$ rxgraph</pre>
<p>This will display the node communication diagram that we investigated at the start of the post</li>
<li>Take a look at the data being sent back from the drone:
<pre>$ rostopic echo /ardrone/navdata</pre>
</li>
<li>Plot your flight speeds (or any other data of interest) with:
<pre>$ rxplot /ardrone/navdata/vx,/ardrone/navdata/vy</pre>
</li>
<li>Adjust drone parameters in the joystick_controller.launch file to fly more aggressively</li>
</ul>
<h2><strong>Troubleshooting</strong></h2>
<ul>
<li><strong>The joystick doesn&#8217;t do anything<br />
</strong>Check that the joystick device you configured in the launch file corresponds to your joystick. To do this, repeat the section &#8220;Testing the Joystick&#8221;</li>
<li><strong>My joystick device is correct, but the joystick doesn&#8217;t do anything<br />
</strong>Assuming you&#8217;ve gone through the &#8220;Testing the Joystick&#8221; section successfully, launch the joystick controller again and in a separate terminal, type:</li>
</ul>
<pre>$ rostopic echo joy</pre>
<p>Assuming everything is configured correctly, this will print joystick messages to the terminal when the joystick is removed.</p>
<ul>
<li>If nothing is printed, check to make sure you&#8217;ve configured the correct joystick device in the launch file, and that the joystick permissions are correct (see &#8220;Testing the Joystick&#8221;).</li>
<li>If something is printed, check to make sure your axis and button mappings in the launch file are correct. If this is the case, leave a comment to this tutorial and I will be happy to help!</li>
</ul>
<p>&nbsp;</p>
<ul>
<li><strong>The drone does the opposite of what I expect<br />
</strong>For example flying backwards when the joystick is tilted forwards. To solve this, determine the axes that respond counterintuitively then invert the sign of the respective scaling factors in the launch file. For example, if the pitch axis (forward-backward) is the opposite of what you would expect, the ScalePitch parameter would change from 1 to -1.</li>
<li><strong>I cannot connect to the drone<br />
</strong>Check that your computer is connected to the drone via wireless, and that all other network devices are disconnected</li>
<li><strong>The drone will not take off</strong></li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Are all the onboard LEDs red? If so, try pressing the emergency button. Do they toggle to green? Perfect &#8211; you&#8217;re ready to fly!</li>
<li>If the LEDs are green and the drone still won&#8217;t take off, check that your button mapping is correct in the launch file</li>
</ul>
<p>&nbsp;</p>
<ul>
<li><strong>Other issues?<br />
</strong>If you have any questions, or comments about what you would like to see in the next tutorials, please send me a message or leave a comment to this post!</li>
</ul>
<p>You can see all the tutorials in here: <a href="http://robohub.org/tag/parrot-ar-drone-tutorial/" data-wpel-link="internal">Up and flying with the AR.Drone and ROS</a>.</p>
<p><em>If you liked this article, you may also be interested in:</em></p>
<ul>
<li><a title="Permalink to Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft" href="http://robohub.org/parrot-ar-drone-app-harnesses-crowd-power-to-fast-track-vision-learning-in-robotic-spacecraft/" rel="bookmark" data-wpel-link="internal">Parrot AR.Drone app harnesses crowd power to fast-track vision learning in robotic spacecraft</a></li>
<li><a href="http://robohub.org/taking-your-first-steps-in-robotics-with-the-thymio-ii/" data-wpel-link="internal">Taking your first steps in robotics with the Thymio II</a></li>
<li><a title="Permalink to Discovering social robotics with the Aisoy1" href="http://robohub.org/discovering-social-robotics-with-the-aisoy1/" rel="bookmark" data-wpel-link="internal">Discovering social robotics with the Aisoy1</a></li>
<li><a title="Permalink to Classroom robotics: Motivating independent learning and discovery" href="http://robohub.org/classroom-robotics-motivating-independent-learning-and-discovery/" rel="bookmark" data-wpel-link="internal">Classroom robotics: Motivating independent learning and discovery</a></li>
</ul>
<p><em>See all <a href="http://robohub.org/" data-wpel-link="internal">the latest robotics news</a> on Robohub, or <a href="http://eepurl.com/t-UEf" data-wpel-link="external" target="_blank" rel="follow external noopener noreferrer">sign up for our weekly newsletter</a>.</em></p>
<p><em> </em></p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: robohub.org @ 2026-10-16 06:51:10 by W3 Total Cache
-->