introlab / ros_for_ios

How to build the Robot Operating System for the iOS platform.
67 stars 15 forks source link

Demo App Link error #9

Open fxia22 opened 10 years ago

fxia22 commented 10 years ago

I have compiled all the frameworks that this projects need. But the linking with library still fails. Here is my configuration: snip20131216_2 Both of the armv7 and i386 arch fails, it is the boost.framework 's problem. I tried serveral times but them just won't work. I wonder if it is the problem of building the project or building ros snip20131216_5 Here are the screenshot and the log. https://github.com/Eureka22/Eureka22.github.io/blob/master/log/log.txt

Thank you!

Ronan0912 commented 10 years ago

It seems to be an issue with the boost library. Try to download the boost pre-compiled framework from : https://sourceforge.net/projects/ros4ios/

The boost build script has to be updated for the new ios 7 release...

fxia22 commented 10 years ago

Thank you! I managed to fix the boost lib. There are still some problems with the boost 1.5.1 so I use the boost 1.4.9. I compiled the project and run it on my iPhone.

I have another question: the application asks me to type in the ip, but when my ros master has a URI like http://eurekaMac.local:11311, what should I do then?

Ronan0912 commented 10 years ago

Indeed, there are problems with the latest boost versions. Version number need to be manually set.

You have to set the ROS_HOSTNAME environment variable on the computer. For example, if your IP is 192.168.3.10, export ROS_HOSTNAME=192.168.3.10 in the terminal before running the roscore.

fxia22 commented 10 years ago

Thank you,let me have a try.

fxia22 commented 10 years ago

Owing to your help. I can now run the demo App on iphone. I can only use the topic list, other applications such as accelerator control and planner control will cause unexpected exit. Maybe there are some problems with the ros or libboost. I am trying to debug..

But I still cannot run it in the simulator. There are linking problems:

    Undefined symbols for architecture i386:
  "boost::thread::join_noexcept()", referenced from:
      boost::thread::join() in tf(transform_listener.o)
  "boost::thread::start_thread_noexcept()", referenced from:
      boost::thread::start_thread() in tf(transform_listener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I googled it and find tf is not linked with libboost_thread (only linked with lib boost_thread-mt).. I wonder can I compile the tf framework myself, how can I compile it for iphone-simulator?

fxia22 commented 10 years ago

Problem solved, using the precompiled library.

Ronan0912 commented 10 years ago

Good ;-)

If you want to build the boost library for iOS 7 by yourself you need to modify boost.sh (https://github.com/introlab/ros_for_ios/issues/8). To build a specific ros package run the build_ros_package script on the package you want and add the dependencies. You can look a build_image_transport.sh file for an example.

fxia22 commented 10 years ago

Oops, I closed the issue by accident.. Thank you for your advice. Almost everything goes well and I can take my next step. I find everything goes well on the simulator (iPhone 6.1). And when I run the app on iPhone(iPhone 4 ,ios 6.0.1), the link between computer and iphone can be set up, and I can see the publisher and subscriber in the rostopic list -v, but the pub_.publish(cmd); seems don't work, since I cannot subscribed the topic but cannot see the data through rostopic echo.(And the audio and video feed cannot work either) Does it mean the ros framework compiled for armv7 architecture is problematic? Do I have to build the project with the deployment target set to 6.1? Or do I have to run it on iOS 6.1 or above?

I am going to develop this software to make it support multiple iPhones and apply it to our RoboCup@Home Project.

Ronan0912 commented 10 years ago

You can try to change the Wireless interface in the ViewController.m file. Replace "en1" by "en0" (line 119). It should work on the iPhone and the simulator.