Rpi screen gets black after using this laser_assembler implementation

asked 2022-02-19 20:49:42 -0600

kiru gravatar image

updated 2022-02-19 20:56:46 -0600

I have an rplidar and im working on the raspberry pi 3+ (ubuntu mate 20.04) I am trying to convert the /scan data to pointcloud data. So I followed these instructions:

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

Here is the call_assembler.py file that service_client.launch uses:

#!/usr/bin/env python

import rospy
from laser_assembler.srv import *
from sensor_msgs.msg import PointCloud2

rospy.init_node("test_client") 
rospy.wait_for_service("assemble_scans2")
assemble_scans = rospy.ServiceProxy('assemble_scans2',AssembleScans2)
pub = rospy.Publisher("/pointcloud", PointCloud2, queue_size = 1)
r = rospy.Rate(1)

while not rospy.is_shutdown():
    try:
        resp = assemble_scans(rospy.Time(0,0), rospy.get_rostime())
        print "Got cloud with %u points" % len(resp.cloud.data)
        pub.publish(resp.cloud)

    except rospy.ServiceException, e:
        print "Service call failed: %s" %e

    r.sleep()

Everything seemed to be working until this last step:

After roslaunch laser_assembler_demo service_client.launch, raspberry monitor screen gets black and everything gets much slower.

I get around 6872340 points, maybe this is a huge number for rpi to process?

Got cloud with  6872240 points
Got cloud with  6871580 points
Got cloud with  6872200 points
Got cloud with  6837300 points
Got cloud with  6871620 points
^C[test_client-1] killing on exit
Service call failed: service [/assemble_scans2] returned no response
shutting down the processing monitor...
... shutting down processing monitor complete
done

After some time, the monitor gives this error The panel encountered a problem ...while loading "BriskMenuFactory::BriskMenu"

Note: This happens only when I have done the last step, service_client.launch

edit retag flag offensive close merge delete