# Go1 Math to motion

**URL:** <https://community.droneblocks.io/t/go1-math-to-motion/662>\
**Category:** Robots\
**Created:** [January 9, 2023, 4:47am UTC](https://community.droneblocks.io/t/go1-math-to-motion/662 "2023-01-09T04:47:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fritz](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/fritz/32/422_2.png) [@Fritz](https://community.droneblocks.io/u/Fritz)\
**Post date:** [January 9, 2023, 4:47am UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/1 "2023-01-09T04:47:38Z")

</div>

After a bunch of failures (lack of knowledge and bad typing) I finally got @dbaldwin 's go1-math-motion to run. The example makes a very nice circle. Thanks for making the demo and for the help.

https://www.youtube.com/watch?v=iosqs8fJ26g

---

<div class="post-metadata">

**Author:** ![dbaldwin](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbaldwin](https://community.droneblocks.io/u/dbaldwin)\
**Post date:** [January 9, 2023, 3:51pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/2 "2023-01-09T15:51:16Z")

</div>

Yes @Fritz! Nice work! I want to get the figure 8 code working better next. It requires a bit more space to run and is not perfect, but it works.

---

<div class="post-metadata">

**Author:** ![Fritz](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/fritz/32/422_2.png) [@Fritz](https://community.droneblocks.io/u/Fritz)\
**Post date:** [January 9, 2023, 4:08pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/3 "2023-01-09T16:08:26Z")

</div>

@dbaldwin Thanks. Will be looking for your next example. Also, on the Quadrupet Has Arrived! thread, your forum bot has marked most of my posts as spam. Could you fix that, thanks.

---

<div class="post-metadata">

**Author:** ![dbaldwin](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbaldwin](https://community.droneblocks.io/u/dbaldwin)\
**Post date:** [January 9, 2023, 7:15pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/4 "2023-01-09T19:15:12Z")

</div>

Ugh sorry about that and thanks for pointing it out. We’ve “un-spammed” them. These bots think they’re so smart!

---

<div class="post-metadata">

**Author:** ![Marnonel6](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/marnonel6/32/376_2.png) [@Marnonel6](https://community.droneblocks.io/u/Marnonel6)\
**Post date:** [January 15, 2023, 6:49pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/5 "2023-01-15T18:49:27Z")

</div>

Hi @dbaldwin,

I am a MSc In Robotics student at Northwestern. We acquired a Unitree GO1 Edu for our Masters program and are going to use it with ROS2.

I see that your package is in ROS1 and I also saw that this is the case for the Go1. Any chance that you’ve tested ROS2 on your Go1?

We got the walk example and the low level position control to work.

---

<div class="post-metadata">

**Author:** ![I.TeachPolarBears](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/i.teachpolarbears/32/375_2.png) [@I.TeachPolarBears](https://community.droneblocks.io/u/I.TeachPolarBears)\
**Post date:** [January 15, 2023, 7:06pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/6 "2023-01-15T19:06:23Z")

</div>

THanks for asking this. I was looking at tutorials and I was about to start a thread about this as well. If it’s all ROS 1, then is the Python API going to be written in Python 2? I thought I remembered seeing that this was a limitation of ROS 1

---

<div class="post-metadata">

**Author:** ![Marnonel6](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/marnonel6/32/376_2.png) [@Marnonel6](https://community.droneblocks.io/u/Marnonel6)\
**Post date:** [January 15, 2023, 7:32pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/7 "2023-01-15T19:32:33Z")

</div>

Hi @I.TeachPolarBears

Here is a link to a new discussion that we can start on using the Go1 with ROS2.

> [@Go1 development with ROS2 (C++ and Python)](https://community.droneblocks.io/t/go1-development-with-ros2-c-and-python/679):
>
> Go1 development with ROS2.

There is a ROS2 package on Unitree’s Github that we used. Here is a link:

> **[GitHub - unitreerobotics/unitree\_ros2\_to\_real: A ROS2 package you can use to...](https://github.com/unitreerobotics/unitree_ros2_to_real)**
>
> A ROS2 package you can use to control the real Go1 robot - GitHub - unitreerobotics/unitree\_ros2\_to\_real: A ROS2 package you can use to control the real Go1 robot

The repository has a walk (High level) example and a position control (Low level) example.

---

<div class="post-metadata">

**Author:** ![Fritz](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.droneblocks.io/fritz/32/422_2.png) [@Fritz](https://community.droneblocks.io/u/Fritz)\
**Post date:** [January 19, 2023, 9:53pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/8 "2023-01-19T21:53:04Z")

</div>

@dbaldwin Dennis, I tried the figure8 example today and it was a bit wonky, I expected a smooth figure 8, but it stopped and then made a rather abrupt turn. Plus, I think i would need a larger test area. Anyway, looking for the next version. Keep up the good work.

---

<div class="post-metadata">

**Author:** ![dbaldwin](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbaldwin](https://community.droneblocks.io/u/dbaldwin)\
**Post date:** [January 20, 2023, 3:22pm UTC](https://community.droneblocks.io/t/go1-math-to-motion/662/9 "2023-01-20T15:22:20Z")

</div>

Yes you are absolutely right. I modeled the code after this example:

> <https://github.com/BlakeStrebel/Figure-Eight/blob/master/src/figure8_node.py>

I’ve been working to bring the following code over to Go1:

> <https://gitlab.com/voxl-public/support/mavros_test/-/blob/master/catkin_ws/src/mavros_test/src/mavros_test_node.cpp>

It’s a MAVROS example for a drone and I’ve run it on one of mine. It runs very well. In the code there is reference to Bernoulli’s Lemniscate:

> **[Lemniscate of Bernoulli](https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli)**
>
> Pages for logged out editors learn more
> 
> In geometry, the lemniscate of Bernoulli is a plane curve defined from two given points F1 and F2, known as foci, at distance 2c from each other as the locus of points P so that PF1·PF2 = c2. The curve has a shape similar to the numeral 8 and to the ∞ symbol. Its name is from lemniscatus, which is Latin for "decorated with hanging ribbons". It is a special case of the Cassini oval and is a rational algebraic curve of degree 4.
> This lemniscate was...

If you run my example in the turtlesim you’ll see the outline of the figure 8 where it’s sort of compressed on each end. Which would lead to the abrupt turning as you mentioned.

Still learning as I go. Will keep you posted and thanks for mentioning this.
