Getting Code Running on Drones

After I got the drones running now it was time to actually write the code to solve some exercises. The goal for this week of the GSoC period was to get 1-2 applications of the drones solved using Visual Circuit.

But before I could do that, I had to get my code to run on the drones.

Running the Scripts

The way JDE Drones works is that we have a widget that allows us to control most aspects of the drone. Drones Widget

What we have to do is write our code in the my_solution.py file

Example of file structure

and click on the Play Code button after takeoff of the drone to run our code.

This worked well enough for the exercises, drone_gymkhana, follow_road and drone_hangar when I tested them. However a problem arose in the exercise drone_cat_mouse. The problem was that the widget itself did not appear when the exercise was launched.

Problem and Solution

When this happened I was quite confused. Since all of my other exercises were working properly I had come to the conclusion that all of my installs were done correctly. In this case I had no idea what exactly was going wrong, I got a hint by using rostopic echo. The output consisted of topics that were pre-fixed by cat/ or mouse/, for each drone respectively. Rostopic output

The difference here was that each drone had the namespace prefixed to its topic. The namespace was cat/ or mouse/. When initializing the DroneWrapper() class in my_solution.py we had to pass the namespace to the class as a parameter.

# DroneWrapper(node_name, namespace)
HAL = DroneWrapper('drone','cat/') 

The above code was what I needed to get the my_solution.py file to execute.

I’m still thinking of a solution to get the widget working. One way is to go into the drone_vel_teleop class manually and set the default namespace as cat/. However this isn’t really a long term solution to the problem.

This blog will be updated if I find a way to get the widget working well. For the time being however my current method is enough to solve the exercise.

Example of Follow Road Working: Follow Road

2022

Summary Report

4 minute read

Late nights, excitement and learning are how I would describe the GSoC period in a few words. These past two months have been a lot of fun, from starting off...

Week 11: Coding Period

1 minute read

Going by the suggestions of my mentors, I spent this week working on the documentation of the blocks and some updates to my blog.

Week 10: Coding Period

1 minute read

This week I looked into MultiProcessing Conditions and finished the video of the FSM.

Week 9: Coding Period

1 minute read

This week saw the completion of the FSM video and the solution to the block size bug.

Week 8: Coding Period

1 minute read

I made more progress with the documentation and some other auxillary bug fixes this week.

Week 7: Coding Period

1 minute read

Another pretty busy week for me personally. This led to a bit of slowdown in the work done. However I started with the documentation editing through Jinja an...

Week 6: Coding Period

2 minute read

This week was quite hectic for me. My college started offline after a while, due to travelling and a few other events the time I could spend on Visual Circui...

Week 5: Coding Period

1 minute read

This was a week where I started to work on the Finite State Machine that I had mentioned in my proposal.

Week 4: Coding Period

3 minute read

This week marked a focus on completing the remaining PRs from last week. I also finished adding a new IMU block and worked on general share() and read() func...

Week 3: Coding Period

2 minute read

This week I finally finished the remaining templates from last week. I also managed to upload my created videos to the JdeRobot YouTube Channel.

Week 2: Coding Period

1 minute read

This week was about identifying and solving some bugs I had noticed during usage of the tool. I also started with the work template updation.

Week 1: Coding Period

1 minute read

This week marked the official beginning of the coding period. Going by last week’s set goals I started on the video creation part first and foremost.

Week 3: Community Bonding

less than 1 minute read

This was the last week of community bonding, however due to other commitments in college I had a hard time working on Visual Circuit.

Week 2: Community Bonding

1 minute read

In my previous posts I had highlighted the challenges I faced while installing Jde Drones and getting code running on it. Next after these steps was to solve...

Getting Code Running on Drones

1 minute read

After I got the drones running now it was time to actually write the code to solve some exercises. The goal for this week of the GSoC period was to get 1-2 a...

Installing JDE Drones

2 minute read

Getting started with my GSoC period, one of my goals during the project was to make drone applications using Visual Circuit. JdeRobot’s Academy already has s...

Back to Top ↑