Coder Social home page Coder Social logo

Comments (6)

at669 avatar at669 commented on September 23, 2024

Hi @NathanielRose,

This does look like an issue with the WSL connection!

First, I would suggest verifying the virtual network interface's IP via running ifconfig in the WSL environment and checking inet. This should be the address used as your ROS_IP value as your rosparam (or in your config/params.yaml, depending on how you've configured this setup), and as the ROS IP Address in your ROS Settings.

If that's already the case, you may also need to configure your firewall to allow traffic between WSL and Windows, adding both Inbound and Outbound rules for WSL traffic.

Finally, if the above don't work, I would try adding the Windows-side virtual address as the Override Unity IP Address in the ROS Settings.

Let me know if any of these methods resolve your issue!

from unity-robotics-hub.

NathanielRose avatar NathanielRose commented on September 23, 2024

Hi @at669 thanks for the support here!

I adjusted the ROS IP address based on the inet address and still receive the same behavior.

image

I received the same results when I turned off my windows firewall completely.

Where would I identify the windows-side virtual address?

from unity-robotics-hub.

at669 avatar at669 commented on September 23, 2024

You can find the address running ipconfig on the Windows side!

However, it looks like the server endpoint is still running with the old address--you'll want to do a rosparam load ./config/params.yaml before your rosrun robotics_demo server_endpoint.py. I would try this before adding the Override Unity IP, but the network settings may vary due to your setup, so you may have to do a bit of debugging and trying the override even after reloading your rosparams. Let me know how it goes!

from unity-robotics-hub.

NathanielRose avatar NathanielRose commented on September 23, 2024

@at669 This worked! I had to run the osparam load ./config/params.yaml beforehand.

I went a bit ahead and was attempting to customize ROS for a different robot.
I am modeling what the team did in the cube ROSpublish tutorial, publishing my robots position & rotations to the TCP endpoint. Unsure if it makes sense to open another ticket but I was running into issue:

I am currently able to write my positions to the Unity console, but unable to publish on the ROS server.
image

When I start my scene I receive this error:

NullReferenceException: Object reference not set to an instance of an object
UR10TrajectoryPlanner.Update () (at Assets/Scripts/UR10TrajectoryPlanner.cs:165)

My UR10MoveItJoints are modeled after the NiryoMoveItJoints.
Any idea why I am getting a NullReferenceException?

from unity-robotics-hub.

at669 avatar at669 commented on September 23, 2024

Glad to hear the rosparams worked!

Any idea why I am getting a NullReferenceException?

My guess would be that the ROSConnection ros variable hasn't been set by the time you call ros.Send(). Since it looks like you've used the ROS Settings workflow, you likely have an Assets/Resources/ROSConnectionPrefab.prefab file that contains your ROS settings. You can refer to this by assigning ros = ROSConnection.instance; in your TrajectoryPlanner's Start() or Awake() functions, which should hopefully resolve the NullReferenceException.

from unity-robotics-hub.

NathanielRose avatar NathanielRose commented on September 23, 2024

This worked, Thanks for the help here @at669 !

from unity-robotics-hub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.