# Having issues Configuring ROS on VOXL CAM

Source: https://forum.modalai.com/topic/1186/having-issues-configuring-ros-on-voxl-cam
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl-cam
Posted: 2022-08-05 18:51:42 UTC by Bright Nnadi
Replies: 20 · Views: 7344

## Bright Nnadi · 2022-08-05 18:51:42 UTC

I am having issues configuring ROS on VOXL. A little bit confused with this.

## Reply by Bright Nnadi · 2022-08-05 19:09:41 UTC

I'm connected to the VOXL CAM via adb, however to view the Stereo tracking data I need to configure ROS on the VOXL CAM. when i run this command line  vi ~/my_ros_env-sh, do I have to change anything on there?

## Reply by Bright Nnadi · 2022-08-05 19:34:56 UTC

When I try to rviz, this what pops up
 ![8ef1a988-0bf6-4015-85b8-442376ebe0ce.jpg](https://forum.modalai.com/assets/uploads/files/1659728082198-8ef1a988-0bf6-4015-85b8-442376ebe0ce.jpg)

## Reply by Guest · 2022-08-05 20:04:46 UTC

Localhost refers to the running machine's ip, if you're trying to connect to the voxl's ros instance you need to configure your computer's ros to look for your drones ip.

## Reply by Bright Nnadi · 2022-08-06 01:44:39 UTC (in reply to Guest)

@Alex-Gardner What command lines are my using to for this configuration

## Reply by Bright Nnadi · 2022-08-08 18:31:34 UTC

@Alex-Gardner When setting up the ROS on voxl I am supposed to make any change to the ROS_MASTER_URI /  ROS_IP / ROS_USERNAME. ![04e09103-adc1-4ea2-9bff-d72df26fa474-image.png](https://forum.modalai.com/assets/uploads/files/1659983492439-04e09103-adc1-4ea2-9bff-d72df26fa474-image.png)

## Reply by Bright Nnadi · 2022-08-08 19:08:12 UTC

@Alex-Gardner  Please is it possible to have a meeting with you. I have had the VOXL CAM for a while now and I am still encountering issues setting it up. Please it will be well appreciated if someone from your team can start a remote session with me for guidance.

## Reply by Steve Turner · 2022-08-08 19:31:43 UTC

@Bright-Nnadi 

You need to set your Ubuntu development environment with ROS to point to the ROS Master process on the VOXL.

Check out: https://answers.ros.org/question/35603/ros_master_uri-change-it-and-save-it/

So for example if the IP address of the VOXL is `192.168.1.118` then you need to execute `export ROS_MASTER_URI=http://192.168.1.118:11311` on the Ubuntu system and then run `rviz` from the same terminal.

You then also need to run the MAVROS or MPA ROS Bridge on the VOXL along with the ROS master node.

Start ros master: `roscore`

mavros: https://docs.modalai.com/mavros/

On the voxl you need to edit the ROS_IP to match your voxl's IP address so that other hosts can connect to it.

If this doesn't work, consider examining your firewall on your ubuntu system to make sure it isn't block ROS traffic. If it's a vanilla ROS/Ubuntu install you should be fine.

## Reply by Bright Nnadi · 2022-08-08 20:16:06 UTC (in reply to Steve Turner)

@Steve-Turner I updated the ROS_MASTER_URI but its still saying the same thing and saying it cannot contact ROS master ![9d7d2f01-d129-4a8b-b506-ff4ef018423a.jpg](https://forum.modalai.com/assets/uploads/files/1659989737027-9d7d2f01-d129-4a8b-b506-ff4ef018423a.jpg)

## Reply by Bright Nnadi · 2022-08-08 20:22:05 UTC

Saying the same thing ![0f949cb3-ad26-4db0-b6b4-1a0998e38e3d.jpg](https://forum.modalai.com/assets/uploads/files/1659990084406-0f949cb3-ad26-4db0-b6b4-1a0998e38e3d.jpg)

## Reply by Chad Sweet (ModalAI staff) · 2022-08-10 01:47:54 UTC

Assuming you are trying to run ROS master on your VOXL, first find out what is your VOXL's IP? Let's call that <VOXL IP>

Then, can you ping that IP from the computer you are trying to run Rviz?
```
$ ping <VOXL IP>
```

If so, on VOXL edit your ROS environment
```
export ROS_IP="<VOXL IP>"
```

Then start ROS on the VOXL. Monitor the output of the ROS master when it launches, you should see the "roscore" IP the same as what you just configured. 

If so, configure the ROS environment on your PC

What is the IP of your PC on the same network as the VOXL? We'll call that <PC IP>
 
Configure the PC's ROS environment as such:
```
export ROS_MASTER_URI="http://<VOXL IP>:11311"
export ROS_IP="<PC IP>"
```

Then launch RViz

Note: The instructions above are configuring the master to be the VOXL by pointing both VOXL and the PC to the VOXL's IP address as master. Checkout slides 7,8,9 in the presentation [here](https://webcms3.cse.unsw.edu.au/files/4f2ca0bcc4adbf095d4fd28e7907ad01d4ee6fb3b76d6d6b386aa12aac6e7f87/attachment)

## Reply by Bright Nnadi · 2022-08-10 18:53:32 UTC (in reply to Chad Sweet)

@Chad-Sweet thanks Chad, so I got Rviz working now !![0_1660157598192_05B72248-F814-4C2F-947E-4443E4FB94F3.jpeg](Uploading 45%)

## Reply by Bright Nnadi · 2022-08-10 19:55:49 UTC

Is the IP address of my VOXL CAM 192.168.8.1

## Reply by Bright Nnadi · 2022-08-11 14:03:27 UTC (in reply to Chad Sweet)

@Chad-Sweet I’m connected to the VOXL using Adb not wifi

## Reply by Guest · 2022-08-11 18:36:23 UTC

ROS uses wifi to communicate, not ADB. You'll need to connect the drone and you computer to the same network in order to use ros. This can either be done by connecting the drone to your home/work network or by setting the drone to serve as an AP. Instructions for either can be found [here](https://docs.modalai.com/voxl-wifi/)

## Reply by Kris · 2022-08-18 13:24:04 UTC (in reply to Chad Sweet)

@Chad-Sweet I am also having the same issue. I am not sure what im doing wrong.

This is my PC (my_ros_env.sh)
![PC my_ros_env.sh.png](https://forum.modalai.com/assets/uploads/files/1660828871072-pc-my_ros_env.sh.png) 

This is my VOXL (my_ros_env.sh)
![VOXL my_ros_env.sh.png](https://forum.modalai.com/assets/uploads/files/1660828897791-voxl-my_ros_env.sh.png) 

This is what I get when I try to show my voxl-env
![VOXL env.png](https://forum.modalai.com/assets/uploads/files/1660828930535-voxl-env.png) 

Setting up environment variables for ROS is a little confusing for me.

I am using wifi to communicate with VOXL.
My VOXL IP is the usual 192.168.8.1
My PC IP is 192.168.8.78

I am stuck here. 
Could someone please point me in the right direction?

## Reply by Kris · 2022-08-22 16:34:55 UTC (in reply to Kris)

Just wondering why my voxl environments are all blank everytime I try to view them. Should I " export " the values manually?

## Reply by Kris · 2022-08-22 16:59:31 UTC (in reply to Guest)

My Voxl System Image-
![Voxl System Image Version.png](https://forum.modalai.com/assets/uploads/files/1661187553732-voxl-system-image-version.png)

## Reply by Kris · 2022-08-22 17:11:37 UTC (in reply to Guest)

My current voxl services-
![Voxl Inspect Services.png](https://forum.modalai.com/assets/uploads/files/1661188283045-voxl-inspect-services.png)

## Reply by Guest · 2022-08-22 17:51:30 UTC

Hi,

It looks like you're on a pretty old release of our software stack (3.3.0-0.5), you should download the latest release (3.8.0-0.7) from our [downloads](https://developer.modalai.com/asset/1) page and we'll be better able to support issues that you're having since there's a good chance we've fixed them in the 10 months since the 0.5 release.

## Reply by Kris · 2022-08-23 16:41:54 UTC (in reply to Guest)

@Alex-Gardner  Thank you for your help :)
