christophebedard / ipad-lidar2ros

Publish iPad Pro LiDAR data & more in ROS 2 - source code & assets only
Apache License 2.0
78 stars 6 forks source link

kGridPoints, RGBuniforms, PointCloudUniforms etc NOT FOUND in Renderer.swift #2

Open shaheer34mts opened 3 months ago

shaheer34mts commented 3 months ago

Hi @christophebedard I have imported all the files in the xcode project, but when I build it gives multiple errors in Renderer.swift file that it cannot find certain variables (kGridPoints, RGBuniforms, PointCloudUniforms ) and many more. Apparantly (I might be wrong) they have been defined in the shadertypes.h file. But it cannot find it.

I have properly linked the bridging-header file in the build configuration as well. but still, it is unable to find those variables. What am I missing/slash doing wrong? I have attached a picture of errors as well 447560115_1541854390010715_8548498549981039894_n

christophebedard commented 3 months ago

They are here: https://github.com/christophebedard/ipad-lidar2ros/blob/master/src/ShaderTypes.h. Your project configuration might be wrong.

shaheer34mts commented 3 months ago

@christophebedard Thanks for the reply. Indeed the issue was with the configuration. I managed to solve it and run the app on my iPhone 13 Pro Max. However, I can't publish the data over ROS. As you can see in the image below, the "switch" for the remote bridge turns on irrespective of the IP address I put in it. However, the switch still turns on even if I don't launch the ros2 web bridge. But, no data is published. Do you know what the problem can be? Thanks for the help again. Image

christophebedard commented 3 months ago

Unfortunately, I never tested it on an iPhone, and I do not have a Mac anymore.

I haven't looked at the code in a long time, but I believe it's the masterSwitch in https://github.com/christophebedard/ipad-lidar2ros/blob/master/src/RosControllerViewProvider.swift.

shaheer34mts commented 3 months ago

@christophebedard Finally I managed to publish the cloud from iPhone 13pro Max over ROS 2. Apparantly the code works when you press the "build" button from x-code, and then put the IP address. But when you just launch the application from mobile by disconnecting it from the Macbook, it stops connecting. Have you encountered this behavior?

christophebedard commented 3 months ago

I don't remember much, but I don't believe so. I'm pretty sure it worked fine for me when not connected to my Mac using a cable. I could deploy the newly-built app to my iPad and launch it without a cable.

Maybe it's related to your network.