L E O ROS

Hello,

I do not know exactly where to start. First of all, thank you for the great support. I’m pretty new to this robotics topic and do not even know ROS and Co. I have spent the last year a great module with web server and a lot of sensors and bus support including IO control in real time via HTML (BI Directional) via Flask to realize. A great thing. An own camera (USB or RASPI port) in high resolution as well as recording and photo function belong to it. An SDR receiver is also included with server.

I cover a variety of possibilities and can easily expand at any time. Currently, IMU, temperature, air pressure, humidity, air quality can be measured and logged (via XLS export). 16 PWM and 6 digital IO’s, 3 relay ports for high current and one external I2C, one ONE wire port and USB port.
A lot to control, measure and regulate.

“The maximum data bandwidth is 8Mbit / s.” with video at 800x600 resolution. A great picture 1 (12mm lens).


Let’s get to the actual problem.

By the way, I’ve read a lot about ROS. I was interested in the possibility of experimenting with stereo cameras. SLAM for example. A great and exciting thing. First experiment with a Kinect are promising, but connected directly to the laptop. With a video from Youtube I did that once with a Raspberry 3b + and brought the System Master -> Client even to run. The performance was so — goes like that. Various possibilities to leave the data on the Raspberry and evaluate it later have also run. Let’s go to LEO. First, the ROS MAster yes and the WEB UI are running. However, you can not establish a connection externally via a ROS SYSTEM. Error messages (can not find a MAster) are discussed in many forums, but only unsatisfactory solved. Thus, this is unfortunately out. Only a REmote desktop connection on the PI (Husarion interface) works (SSH too). You can start Rviz and CO via the desktop - but with a catastrophic performance. So not to use - and I think this way should not be so - would be illogical. On the Rviz surface it immediately stands out that some nodes are there (Camera) but no node for driving or 2 D MAP Goal (or whatever that means) a direct operation is missing. Maybe that’s what I’m doing wrong. But if there is no node ---- strangely, everything goes via WEB UI.

It’s about so-called mission planning in the future, less about 3D stories. If, for example, a lidar is used to drive autonomously or by coordinates. So the actual ROS features. The aim is yes, so yes, the change to the ponulu motors with encoder.

Well, I do not know any more here.

In short, ROS does not find the master (and the nodes ???). Even via Remote Dektop they do not appear as mentioned.

Ip addresses are tested and SSH and Remote Desktop are also working.

And I do not really understand one thing yet. When driving with LEO (WEB UI), the average data bandwidth is 15 MB / s. Why so much, the live cam only works with 640x480 pixels.

In short, ROS does not find the master (and the nodes ???). Even via Remote Dektop they do not appear as mentioned.

I never had a problem with ROS connection. Can you try to replicate the following steps?

I’ll assume you use ubuntu 16.04 with ROS kinetic and are connected to Leo Rover’s WiFi.

First, check if you can resolve husarion hostname:

ping husarion

If it correctly resolved to 10.0.0.1, check your local ip address, for example with

ip addr

The output should look like this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 54:04:a6:37:df:cb brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 74:2f:68:dd:a1:13 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.64/24 brd 10.0.0.255 scope global dynamic wlp3s0
       valid_lft 42808sec preferred_lft 42808sec
    inet6 fe80::65db:f3e6:5381:828a/64 scope link 
       valid_lft forever preferred_lft forever

In this example, the IP is 10.0.0.64.

Now, you need to export ROS environment variables:

export ROS_IP=10.0.0.64
export ROS_MASTER_URI=http://husarion:11311

Change ROS_IP to your IP address.

Then (on the same terminal), try to list available topics:

rostopic list

If everything is correct, the output should print all available topics:

/battery
/camera/camera_info
/camera/image_raw/compressed
/client_count
/cmd_vel
/connected_clients
/diagnostics
/gpio2
/odom
/raspicam_node/parameter_descriptions
/raspicam_node/parameter_updates
/rosout
/rosout_agg
/servo1/angle
/servo1/pwm
/servo2/angle
/servo2/pwm
/servo3/angle
/servo3/pwm
/servo4/angle
/servo4/pwm
/servo5/angle
/servo5/pwm
/servo6/angle
/servo6/pwm
/system/reboot
/system/shutdown

If it still can’t find the ROS Master, please paste the output of this command:

env | grep ROS

And I do not really understand one thing yet. When driving with LEO (WEB UI), the average data bandwidth is 15 MB / s. Why so much, the live cam only works with 640x480 pixels

Did you perhaps mean 15Mbit/s (1.9MB/s)? That’s certainly possible as the camera stream is published as jpeg images. In later version of leo_bringup (update software), we reduced the camera quality a little so the average bandwith is 1.0-1.5MB/s.

Ok, I’ll try that out. If I can post pictures, I’ll show you the traffic in the network. Are actually 15 megabytes per second. I am working on my module with UV4L (WEBRTC) at 800 * 480 or 920 * 560 with max 8 megabytes per second with a great picture. The selection of the resolution is related to the watermark. These resolutions are great.ill follow your instrud

so, the connection is up and i can also see the node with reostopic list. Have a few others. For example, / Camera / camera_info * compressed is missing. I think I flashe on the latest firmware / image. I have 0.1 and everything is actually running. Although Rviz has a connection (35fps) but under “ADD” -> Create Visualization —> By topic are some entries - but the camera is z.b without> function and control or data - nothing to see.

Under “Warnings” is “No image received” "

I use Ubuntu 18.04 LTS with Melody ROS.

Via Remote Desktop to 10.0.0.1 and a started Rviz you have at least a picture under Image. But not more.

Is it possible to control the Rover via Rviz at all? So slowly I do not understand the meaning behind it anymore.

For example, / Camera / camera_info * compressed is missing.

That’s weird, could you connect to raspberry pi and paste the output of these commands?

rostopic list
rosnode list

I will try to reinstall 16.04 . Should be an Problem with ROS and Nvidia Settings. I have massive Problems with ROS and Ubuntu on my Laptop in case of Drivers. Linux is … .

rosnode list (ON LAPTOP)
/leo_system
/raspicam_node
/rosbridge_server
/rosout
/serial_node
/web_video server

rostopic list

/batterie
/client_count
/cmd_vel
/connected clients
/diagnostics
/odom
/raspicam_node/camera_info
/raspicam_node/image_compressed
/raspicam_node/parameter_descriptions
/raspicam_node/parameter uptdates
/rosout
/rosout_agg
/servo1/angle
/servo1/pwm
/servo2/angle
/servo2/pwm
/servo3/angle
/servo3/pwm
/servo4/angle
/servo4/pwm
/servo5/angle
/servo5/pwm
/servo6/angle
/servo6/pwm
/system/reboot
/system/shutdown

yx

I use now the leo_image 2019-07-15 and then i will make a firmware update

Same Problem. No Image , No Pose… . All nodes are loaded

I’m assuming that - I have no idea of ​​ros. Can only work directly on Python / Sockets. Nodes ??? State of affairs is:

rviz starts, nodes are visible —> but nothing happens. When image topic is a black image and Nav Goal … without function. No data in the console and so on. Via Remote Desktop at least under Images an image can be seen (4 FPS).

I´ve played a little bit with rqt. A lot of Warnings a displayed --> no comunication with services . I found out, that the NAME Servise is not running. When you ping Leo (Husarion) - not possible. You have to use the ip 10.0.0.1 instand of husarion

Please add this line to /etc/hosts in your computer:

10.0.0.1 husarion

and try again

:slight_smile: works. I have a stable connection with Video. But how can i navigate ? Or see the Data ?

Leo Rover currently does not provide any rviz related functionality.

To steer the Rover, you can publish Twist to /cmd_vel topic. Here’s an example Python script:

#!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist

# Initialize ROS node
rospy.init_node("test_drive")

# Create ROS publisher
cmd_pub = rospy.Publisher("cmd_vel", Twist, queue_size=1)

# Write a function that drives the Rover with specified
# linear and angular speed for 2 seconds
def drive(linear, angular):
    # Initialize ROS message object
    twist = Twist()
    twist.linear.x = linear
    twist.angular.z = angular
    
    for _ in range(20): # repeat 20 times
        cmd_pub.publish(twist) # publish message
        rospy.sleep(0.1) # sleep for 100ms

# Now let's actually test driving the Rover
# linear speed is in m/s and angular speed in rad/s 
drive(0.2, 0.0)
drive(0.0, 0.0)
drive(-0.2, 0.0)
drive(0.0, 0.0)
drive(0.0, 1.0)
drive(0.0, 0.0)
drive(0.0, -1.0)
drive(0.0, 0.0)

ALL RIGHT. THANK YOU VERY MUCH. Works . :slight_smile:

When I start Rviz on the laptop it connects to LEO. So far so good. However, the model is not loaded (?) Sometimes a part of the model is seen - but the FPS drops to 1. Am I doing something wrong ?

I use the current image with ROS (Kinetic). Does anything have to be built there (Catkin, …)?

To visualize the robot model in RViz, you need to build the leo_description package on your computer. Please take a look at ROS Development guide, especially the Visualizing the model section.

1 Like