Unity-Technologies / Robotics-Nav2-SLAM-Example

An example project which contains the Unity components necessary to complete Navigation2's SLAM tutorial with a Turtlebot3, using a custom Unity environment in place of Gazebo.
Apache License 2.0
339 stars 121 forks source link

ROS2 Communication not working #50

Open Massittha opened 2 years ago

Massittha commented 2 years ago

When I start ROS node , running ros2 launch unity_slam_example unity_slam_example.py, and enter Unity play mode, no communication is initiated. The Rviz map doesn't fill and the arrows on the top left corner in Unity play mode remain red. The terminal keeps showing as the image below image Is there possibly something that I missed?

Thanks

Massittha commented 2 years ago

My bad, I tried running ros2 run ros_tcp_endpoint default_server_endpoint --ros-args -p ROS_IP:=127.0.0.1 -p ROS_TCP_PORT:=7000 and the map started filling up.

However, previously when I tried running the server endpoint using port = 10000 by default, following these tutorials for ROS2 Demo,https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md, everything had been working fine until recently it stopped working for some reasons. So I needed to change the port to get it working again.

What could be the reason for this? And how do you actually determine the port value?

I am completely new to this and have no idea how the port works. I would really appreciate it if anyone could briefly explain or give me some pointers.

Thanks

Hezhexi2002 commented 1 year ago

@Massittha Hi,I also meet the same problem with you when I run the ros2 launch unity_slam_example unity_slam_example.py in the https://github.com/Unity-Technologies/Robotics-Nav2-SLAM-Example/blob/main/readmes/run_example.md: image image image Besides,I also try to run ros2 run ros_tcp_endpoint default_server_endpoint --ros-args -p ROS_IP:=127.0.0.1 -p ROS_TCP_PORT:=7000 you mentioned later But this time it doesn't even show the RViz: image So what should I do to solve the problem,hope you can give me some advice

MetaSonGi commented 1 year ago

Starting the ROS node and running ros2 launch unity_slam_example unity_slam_example.py does not work.

캡처