# MagniNavLine - Is code available?

**URL:** <https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650>\
**Category:** General Questions\
**Created:** [October 7, 2020, 7:10pm UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650 "2020-10-07T19:10:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasalbini](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/lucasalbini/32/494_2.png) [@lucasalbini](https://forum.ubiquityrobotics.com/u/lucasalbini)\
**Post date:** [October 7, 2020, 7:10pm UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/1 "2020-10-07T19:10:32Z")

</div>

Hello, Good afternoon!

I saw on the facebook page that you were testing a navigation version with a line follower, do you have the code available for this version?

The link of the video that i see is this:

[https://drive.google.com/file/d/1EVdWoPBG-f8YLvVlt8sWUf5fzFCdv2dl/view?fbclid=IwAR0eZM8Oo3\_lUS5twWp7gYA3f2XBnSjdjVsRbRSyjEBt3cmO4Cod2ekkUJw](https://drive.google.com/file/d/1EVdWoPBG-f8YLvVlt8sWUf5fzFCdv2dl/view?fbclid=IwAR0eZM8Oo3_lUS5twWp7gYA3f2XBnSjdjVsRbRSyjEBt3cmO4Cod2ekkUJw)

Thanks,  
Lucas Albini

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [October 8, 2020, 10:27pm UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/2 "2020-10-08T22:27:44Z")

</div>

Once you have a full navigation stack all running then I think you are asking about a script I wrote so I’ll point you to that. The script issues positions to our ‘move\_basic’ code which must be running.

So this code will do NOTHING without a mapped area. In the case of this video it was using our ceiling fiducials but this would also work for a nav stack running with a robot that runs Lidar for room navigation.

Anyway, here is pointer to the location where you will find move\_patterns.py

> **[move\_basic/scripts at kinetic-devel · UbiquityRobotics/move\_basic](https://github.com/UbiquityRobotics/move_basic/tree/kinetic-devel/scripts)**
>
> A minimal navigation node. Contribute to UbiquityRobotics/move\_basic development by creating an account on GitHub.

The script must be supplied the waypoint list. So for your initial look at this always start this script (once full nav stack and move\_basic are all up) like this:

python move\_patterns.py -w line

Mark

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [October 13, 2020, 6:42am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/3 "2020-10-13T06:42:46Z")

</div>

As a followup to this thread it may be of interest to Magni users to see what it takes to get a full navigation stack all running using a Lidar that you would attach to the Magni.

Now posted to our github is another demo which if you end up having an RP Lidar unit and feel like trying it with the Magni to get your feet wet in basic ROS navigation example this is a good start.

This assumes a Magni that you put your RPLidar on top of as described in the README.

If interested: [https://github.com/UbiquityRobotics/demos/tree/master/magni\_lidar](https://github.com/UbiquityRobotics/demos/tree/master/magni_lidar)

The hope is that more is added such as I’m thinking of trying the script I have just mentioned in prior post which should run on this demo once you get to a fully mapped areas and are doing the nav only part of the demo.

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [October 13, 2020, 11:16am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/4 "2020-10-13T11:16:46Z")

</div>

@mjstn2011, this is looking good,

so on top of your instructions, I will need to git clone [https://github.com/UbiquityRobotics/demos/tree/master/magni\_lidar](https://github.com/UbiquityRobotics/demos/tree/master/magni_lidar) to catkin\_ws/src directory as well right?

and also will that mean both the magni\_lidar and rplidar\_ros will reside in the catkin\_ws/src directory?

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [October 14, 2020, 11:06pm UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/5 "2020-10-14T23:06:47Z")

</div>

Please see the readme, there are some other things. This demo is specifically setup for the RPLidar at this time. The readme explains what you will need if you use this demo with the lidar. The demo is not for a point cloud camera, it is very specifically for the very popular RPLidar which is called a ‘scan’ or 2D nav lidar approach for this demo.

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [October 15, 2020, 1:04am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/6 "2020-10-15T01:04:59Z")

</div>

@mjstn2011, yes I have the Slamtec RPLidar A1 as well which I want to test as well,

Yes I have read the readme and that’s why I was asking the question above,

it mentions this set up which I have done

 ![image](https://frm.ubiquityrobotics.com/uploads/default/original/1X/39d052a5ddfc4fcd87e36d597972cf4d7ce30c93.png)

and I got the VM ready as the slave and Magni robot as the master , then the readme goes on to making the map , by launching ( roslaunch magni\_lidar magni\_lidar\_mapmaker.launch),

and my question is do I need to git clone ([demos/magni\_lidar at master · UbiquityRobotics/demos · GitHub](https://github.com/UbiquityRobotics/demos/tree/master/magni_lidar)) magni\_lidar to the catkin\_ws/src directory as well? to run the magni\_lidar\_mapmaker.launch? or is this already in the current image , so I can just launch it ? (I tried and it saids launch file not found)

thanks

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [October 15, 2020, 9:47am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/7 "2020-10-15T09:47:44Z")

</div>

Oh I see, sorry , I was not following your thoughts well enough.

As with all repositories and code in them we basically clone the repository to ~/catkin\_ws/src.

Now in the case of catkin\_ws/src/demos what you need to do since it exists already is:  
cd ~/catkin\_ws/src/demos  
git pull  
cd ~/catkin\_ws  
catkin\_make

And do the other steps for other things that are discussed.  
Because this is totally brand new and only put up there couple days back, no it is not on any pre-existing image. This magni\_lidar package is totally new and never existed before.

Thanks,  
mark

---

<div class="post-metadata">

**Author:** ![inmoov](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/inmoov/32/473_2.png) [@inmoov](https://forum.ubiquityrobotics.com/u/inmoov)\
**Post date:** [October 15, 2020, 11:29am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/8 "2020-10-15T11:29:58Z")

</div>

@mjstn2011, yea ok, that’s what I’m after, now I’m clear on that part thanks,

and another step to clarify once more as well, is that does the RPlidar driver repository ( [https://github.com/sharp-rmf/rplidar\_ros](https://github.com/sharp-rmf/rplidar_ros)) resides in the ~/catkin\_ws/src path and not inside …/demos right? (you did mention all repositories above, so I want to make sure that you were referring to the RPlidar repository. )

thanks

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [October 16, 2020, 4:01am UTC](https://forum.ubiquityrobotics.com/t/magninavline-is-code-available/650/9 "2020-10-16T04:01:21Z")

</div>

Yes, the normal two ways to get ROS code are a clone into catkin\_ws/src or the apt install sort of things. Thus you can notice I said cd ~/catkin\_ws/src and then the the actual command that explains it all but I am ok with explaining it here as well. Suggest you may be interested in reading some more about use of git clone which places the repository right where you happen to be at the time, in this case catkin\_ws/src. The apt install commands put things in folders that are appropriate for the ROS release you are using and those are most always for ROS kinetic under /opt/ros/kinetic but they can be a few layers deep in folders below that point.
