I’m new using ROS and I have an issue while trying to use my navio2 (RPI3) with the ROS toolbox of Matlab.
My goal is to get the IMU information of the navio2 in my simulink workspace.
What is working :
- I am connected to the navio2 with matlab
- I can create publisher and subscribers in matlab and see them active in my navio workspace
(using ‘rostopic info /mavros/imu/data’)
- I started to stream the IMU infos and can access to them in the navio2 workspace (using the echo command)
What is not working :
I can’t access to the imu informations in the matlab workspace
When i try to ping the node, i got no response in any direction (matlab to navio and vice versa)
when i ping the matlab node in the matlab workspace i got a response…
Can anyone help me please ?
Unfortunately, we haven’t tested ROS with Matlab.
I’d recommend looking at this post.
You’ve got an interesting project. I’ll appreciate if you share your results after.
Eventually I fixed my problem, here the solution :
- In the File /etc/environemment add a command line
with the IP adress corresponding to the one used by the Navio
- Then you have to edit following file in
I copy here the eventuall mavros.service file i used :
ExecStart=/bin/bash -c “source /opt/ros/kinetic/setup.bash; /usr/bin/python /opt/ros/kinetic/bin/roslaunch mavros apm.launch”
Now that this point is fixed i finally get the IMU data directly in matlab, by subscribing to the /mavros/imu/data node, what is very powerfull. Happy so far.
This brings me to another question :
What node has to be used to control the PWM’s, and how ? I guess I only have to publish on a node like mavros/rcout and send some data ? Can you please help me on that.
Unfortunately, I can’t recommend anything particular but maybe ROS forum can be helpful.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.