ethz-asl / ethzasl_ptam

Modified version of Parallel Tracking and Mapping (PTAM)
http://wiki.ros.org/ethzasl_ptam
235 stars 184 forks source link

ptam remotely from odroid #13

Closed aswinthomas closed 11 years ago

aswinthomas commented 11 years ago

Hi, I am running the odroid branch of ptam on my odroid u2 running linaro 12.11 ubuntu with ros fuerte. Since I cannot view directly, I am trying to use remote_ptam from my laptop running the standard ethzasl_ptam on ubuntu desktop 12.04 with ros groovy.

On my laptop, both direct and remote versions of ptam work well on local host. On the odroid, the program runs fine, but after map initialization there is a segmentation fault. I dont think its got to do with the package, but any hint on a broken package will be helpful.

On my laptop side, I can see that vslam_preview and space key topics of the remote_ptam are registered and I am able to initialize the map. Then I see the grid and the image freezes.

roslaunch: https://dl.dropbox.com/u/8948006/roslaunch-linaro-ubuntu-desktop-8495.log Unfortunately I do not have any ptam specific log. The system doesnt log it. I am not sure why. Any idea on how it can be enabled is appreciated. I am guessing that segmentation fault happens before log. master log: https://dl.dropbox.com/u/8948006/master.log

Thank you Aswin

aswinthomas commented 11 years ago

Sorry the launch file was not clear :https://dl.dropbox.com/u/8948006/launch.txt

simonlynen commented 11 years ago

Hi Aswin,

great you got the odroid branch of ethzasl_ptam to compile.

The error might be related to a bug in ROS. Open the file (..)/ros/serialization.h

Apply this diff (memcpy instead of reinterpret cast/assign) [the line numbers might be different for Groovy):

172 172 { 173 173 template inline static void write(Stream& stream, const Type v) 174 174 { 175 /_reinterpretcast<Type>(stream.advance(sizeof(v))) = v; _/ 175 memcpy(stream.advance(sizeof(v)), &v, sizeof(v)); 176 176 } 177 177
178 178 template inline static void read(Stream& stream, Type& v) 179 179 { 180 /_v = reinterpret_cast<Type>(stream.advance(sizeof(v))); / 180 memcpy(&v, stream.advance(sizeof(v)), sizeof(v));
181 181 } 182 182 183 183 inline static uint32_t serializedLength(const Type t)

Simon

simonlynen commented 11 years ago

Aswin,

I just saw in your log that you had a BUSERROR (-7) not a SIGSEGV (-11) as you wrote. So the above fix will probably resolve the issue. Make sure you recompile (and reinstall) ros after you applied the fix.

Simon

aswinthomas commented 11 years ago

Hi Simon, The problem seems to be in serialization, but your suggestion did not fix the problem. I am not sure if I made the changes correctly.I made the change in the read write function as your mentioned. Since it did not work., I made changes in the next occurrence in the file in line 201. But it doesnt seem to have an effect.

GDB output: https://dl.dropbox.com/u/8948006/gdb.txt serialization file mentioned in the above: https://dl.dropbox.com/u/8948006/serialization.h

Aswin

simonlynen commented 11 years ago

Hi Aswin,

I can send you my serialization header later today. However could you first send a GDB backtrace? (Enter bt to the gdb console after PTAM crashed)

Thank you

Simon

aswinthomas commented 11 years ago

backtrace: https://dl.dropbox.com/u/8948006/gdb_bt.txt

simonlynen commented 11 years ago

Hi Aswin,

Just to be sure: the file in /opt/ros/fuerte/include/ros/serialization.h now reflects the diff I sent you yesterday? Did you recompile and reinstall the ros-underlay? Did you also recompile tf and ethzasl-ptam?

To me it looks like some of the steps above are missing for your setup

Simon

aswinthomas commented 11 years ago

Hi Simon, Yes, I deleted the existing installation and recompiled ros-underlay. And the new serialization.h in /opt/ros/fuerte reflects that.

However, I am not quite confident on rosmake of higher level libraries. They did not compile completely. But I dont think they affect ros as they are not core packages.

Aswin

aswinthomas commented 11 years ago

I have a seperate package "geometry" on my desktop which was downloaded because of the following step in ros installation: rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=fuerte&variant=desktop-full&overlay=no"

Will they be conflicting? Just worried cause I see lot of "geometry" in the backtrace

aswinthomas commented 11 years ago

Hi Simon, Good news!! I did a rosmake -a --pre-clean and it works now!

Most likely as you mentioned, I did not properly recompile tf and ptam again.

Thank you for your patience and support:)

Aswin

simonlynen commented 11 years ago

Great, then happy flying!