Punktwolke vom M1M1 exportieren

Hallo, wir wollten den M1M1 Mapper für die Erstellung von Grundrissen verwenden. Grundsätzlich liefert der Sensor über die Android App und RoboStudio schon gute Ergebnisse, nur können wir die erstellten Daten nur als grobe Bilddatei abspeichern, die für uns leider unbrauchbar sind.

Es müsste ja möglich sein, die Punktwolke zumindest als maßstabsgerechte Vektordatei abzuspeichern, oder sogar die Punktwolke an sich.
Kennt evtl. jemand eine Lösung die solch einen Export möglich macht? Für eine Lösung wären wir sehr dankbar!

Hallo LAsCloud,

frohes neues Jahr!

@tahir.mehmood @Sohail May you can check and reply?

1 Like

Hello @LAsCloud
Can you please share some details on how are you using the sensor?
Please share some logs and procedures on how are you using the sensor.

Hi Tahir, at the moment I’m using the sensor only with the Robostudio App (Android & Win).
We wanted to try it with RViz but we’re facing done problems to run ROS with the Slamtec SDK.

At the moment the output is only a stcm file from Robostudio. Unfortunately we were not able to export this format to a dxf or xyz file. That would be perfect.

I don’t think it’s a big deal to export the recorded data as a point cloud, but we’re absolutely newbies in the field of robotic.

Hi @LAsCloud,

Provided that you have a Linux system installed with the correct ROS version (e.g. Ubuntu 20.04 with ROS noetic). All that should remain is to create a catkin_ws, clone the ros package of slamtech, put it on AP mode, and connect it.

This is a tutorial on using slamtech. Can you please elaborate at which stage the issues are occurring?

Regards,
S. O. Sohail

ROS noetic is properly installed on the Ubuntu 20.04 system.
I have done the tutorial but after compiling it with catkin_make the error shows up:
"Invoking “make -j8 -l8” failed.

When I want to start the sensor it shows up:
"RLException: [view_slamware_ros_sdk_server_node.launch] is neither a launch file in package [slamware_ros_sdk] nor is [slamware_ros_sdk] a launch file name
The traceback for the exception was written to the log file"

*Edit: I also can`t find the WiFi from the sensor in my computer. I have connected it with LAN. I don´t see the Wifi on each Win10/Ubuntu System. Its only shown on my Apple/Android devices…don´t know why. Even without any Firewall.

@LAsCloud I think you have two separate problems.

  1. Package building: Usually

make -j8 -l8 failed

Fails because of some package not being built. I will recommend sharing a log file so that we can debug where the problem is. Moreover please share your installation details.

  1. Wifi Connection problems occur usually because of hardware support. I think your MAC supports the WiFi from the sensor but other machines do not.

Ok, here’s the log:

Log

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/robo/catkin_ws/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_99ce9/fast && /usr/bin/make -f CMakeFiles/cmTC_99ce9.dir/build.make CMakeFiles/cmTC_99ce9.dir/build
make[1]: Verzeichnis „/home/robo/catkin_ws/build/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_99ce9.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_99ce9.dir/src.c.o -c /home/robo/catkin_ws/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_99ce9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_99ce9.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_99ce9.dir/src.c.o -o cmTC_99ce9
/usr/bin/ld: CMakeFiles/cmTC_99ce9.dir/src.c.o: in function main': src.c:(.text+0x46): undefined reference to pthread_create’
/usr/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /usr/bin/ld: src.c:(.text+0x63): undefined reference to pthread_join’
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_99ce9.dir/build.make:87: cmTC_99ce9] Fehler 1
make[1]: Verzeichnis „/home/robo/catkin_ws/build/CMakeFiles/CMakeTmp“ wird verlassen
make: *** [Makefile:121: cmTC_99ce9/fast] Fehler 2

Source file was:
#include <pthread.h>

void* test_func(void* data)
{
return data;
}

int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);

return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/robo/catkin_ws/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_85209/fast && /usr/bin/make -f CMakeFiles/cmTC_85209.dir/build.make CMakeFiles/cmTC_85209.dir/build
make[1]: Verzeichnis „/home/robo/catkin_ws/build/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_85209.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_85209.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_85209
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_85209.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_85209.dir/CheckFunctionExists.c.o -o cmTC_85209 -lpthreads
/usr/bin/ld: -lpthreads kann nicht gefunden werden
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_85209.dir/build.make:87: cmTC_85209] Fehler 1
make[1]: Verzeichnis „/home/robo/catkin_ws/build/CMakeFiles/CMakeTmp“ wird verlassen
make: *** [Makefile:121: cmTC_85209/fast] Fehler 2

Because the Wifi: I tried it with 3 different Win10 systems with no positive result. Also I used 2 external Wifi USB dongles, they did not find the SSID also.
On the other hand, all of my Apple devices (14 Pro, iPad, Macbook M1) and also my older Android smartphone could connected to the M1M1 Wifi. Strange.

Edit: I downloaded the Linux SDK GCC9 from https://www.slamtec.com/en/Support. Then I followed the steps from https://developer.slamtec.com/docs/slamware/ros-sdk-en/2.8.2_rtm/

Hello, has anyone an idea to solve the issue?

Hi @LAsCloud

undefined reference to pthread_create’
/usr/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /usr/bin/ld: src.c:(.text+0x63): undefined reference to pthread_join’
collect2: error: ld returned 1 exit status

It seems like pthread library is not found.

You can install the library with:

sudo apt install libpthread-stubs0-dev

I just downloaded the package and build it successfully it run out of the box in Ubuntu 20.04, ROS Noetic.

For Wifi issues, I will ask you to check the hardware versions of the sensor and machines.

Unfortunately the library was already installed.
But I deleted everything and run the command again. Now it seems to be running, there was’nt any error messages:

Summary

[ INFO] [1673007133.219363792]: SlamwareRosSdkServer, work thread begin.
[ INFO] [1673007133.220306415]: try to connect to 192.168.11.1:1445, tryCnt: 1.
[ INFO] [1673007133.221869276]: connect to 192.168.11.1:1445, OK, tryCnt: 1.
[ INFO] [1673007133.221916164]: reset all 11 workers on work loop begin.
[ INFO] [1673007133.225683804]: device_id: A4EE62BCEAEEF79AD2E7F4F97A38A776, hardware_version: 1, software_version: 2.6.0_798_dev-sdp_vre-20190317, sdp_version: 2.0.0_dev-sdp-20161008, sdk_version: 2.8.9_rtm.
[ INFO] [1673007133.230777583]: successed to reinit all workers on work loop begin.
[ INFO] [1673007133.232526131]: try to reinit explore map.
[ INFO] [1673007133.234551828]: explore map initialized, resolution: 0.050000, moreCellCntToExtend: 32.
[ INFO] [1673007133.234599459]: try to sync whold explore map.
[ INFO] [1673007133.236228835]: known area: ((-3.050000, -5.800000), (6.800000, 7.750000)), cell rect: ((-61, -116), (136, 155)), iOnceMaxCellCntWH: 2000.
[ INFO] [1673007133.280280520]: whold explore map synchronized.

When I run the second command to view it in rviz there’s again a error.

RLException: [view_slamware_ros_sdk_server_node.launch] is neither a launch file in package [slamware_ros_sdk] nor is [slamware_ros_sdk] a launch file name
The traceback for the exception was written to the log file

Seems it is not so easy as I thought :wink:

EDIT: Now it works. I used “source /home/USER/catkin_ws/devel/setup.bash”.

So, back to my original question :wink: do you know if its possible to extract the point cloud out of RVIZ for example?

super now I hope you can save a pointcloud. Please have a look here, this package has a lot of utilities for pointclouds.

1 Like

Thanks! Thats a good package, I´ll take a closer look!