Closed rohanchandra-cpe closed 1 year ago
@rohanchandra-cpe Can you call ros2 topic list
and paste the output here?
Sure thing. The second image is from my normal Ubuntu environment, and the first image was taken after ssh'ing into the raspberry pi. Should I be doing all of my development inside the Raspberry Pi?
I set up my workspace and did the first Python node exercise outside of the Raspberry Pi, for reference.
@rohanchandra-cpe It looks like there may be some networking issues going on.
Can you confirm that the Create 3 is connected to Wi-Fi by going to the webserver and checking the "Connect" tab? It should display the IP address if connected like this:
If there is no IP address, try connecting the Create 3 again by following these instructions.
It also looks like your PC cannot see the RPi topics. Can you make sure you are using the same ROS_DOMAIN_ID
on both, and call ros2 multicast receive
on your PC, followed by ros2 multicast send
on the RPi to check that multicast packets aren't being blocked by your network?
Regarding development, you should be able to run the tutorial python node on either your PC or the RPi once all of the nodes can communicate with each other properly.
Ok, I ran the tests you wanted me to above:
@rohanchandra-cpe Are you running the robot on a university or corporate network? It's possible that your network blocks multicast packets over Wi-Fi which is used for discovery.
If your network is blocking multicast packets, I would recommend following these instructions to configure your robot to use the FastDDS discovery server.
I am on my home network. We have a 5.0Ghz network and 2.4Ghz network. I have connected the former to the Raspberry Pi and the latter to the Create 3. According to the WiFi that I used to set up the RPi (wifi.sh), it should support multicast (image below).
Your Wi-Fi interface will support multicast, but your router may still block those packets. You can try going to your router gateway and looking for any multicast settings.
Ok, I'm going to try following the FastDDS instructions and see if that makes a difference. I'll let you know. Thanks!
The FastDDS instructions are not working for me. I get up to the point where I need to run
sudo systemctl daemon-reload sudo systemctl enable ip_route.service sudo systemctl start ip_route.service
And I get the error below.
I am running WSL 1.0.3.0. Also, I ran "wsl ~" within the powershell and then run the above commands. I was following this link to try and resolve these issues: https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate
@rohanchandra-cpe Instead of running the ip_route
service, you can manually add the ip route by calling sudo ip route add 192.168.186.0/24 via xxx.xxx.xxx.xxx
, replacing the x's with your RPi IP address. You can add this line to your ~/.bashrc
file to have it run every time a new terminal is opened.
That did not work either. I also tried with 192.168.001.171 and that didn't work either. Is there any other information I can give you to help resolve this error?
Also @roni-kreinin , I already have that exact line you suggested I run in /usr/local/sbin/ip_route.sh on the remote PC.
@rohanchandra-cpe Can you paste the output of ip a
?
@roni-kreinin There appears to be some sensitive information in that output. Is there anything specifically you want to see?
Your Wi-Fi interface. You may need to call something like sudo ip route add 192.168.186.0/24 via 192.168.1.171 dev wlan0
, replacing wlan0
with your interface name.
This is what I currently see after starting a fresh new terminal. I added the above line to my ~/.bashrc file, and it did not cause any errors when I ran it initially.
At one point the robot started driving towards the docking station when I pressed the button with 2 dots on it, but that does not work right now. Am I missing some additional set up steps?
Also, just as an aside, is there any documentation about what the different colors from the light ring mean?
Can you make sure that you can ping the Create 3 from your PC by calling ping 192.168.186.2
? Also try calling ros2 daemon stop
before calling ros2 topic list
. You may need to call ros2 topic list
a couple of times to get the topics to show up. Also, SSH into the RPi and check that you can list the topics there.
Lightring states are shown here.
I am able to ping that IP address. I also did a ros2 daemon stop before calling ros2 topic list. However, nothing has appeared in the ros2 topic list output in neither the RPi nor my remote PC. I only see /parameter_events and /rosout
By the way, I do not see an IP address in the online portal for the Create 3. Is this an issue, or to be expected from a FastDDS setup?
Yes, the Create 3 should not be connected to Wi-Fi for the discovery server setup. Communication with it will be purely over USB-C. That is why we have to add the ip route on your PC.
Lets check a few configurations in your setup to figure out what the issue is. If you could paste the following settings that would be great.
Create 3:
RPi4:
/etc/sysctl.conf
, /etc/turtlebot4_discovery/setup.bash
, /etc/turtlebot4_discovery/discovery_super_client.xml
sudo systemctl status discovery.service
sudo systemctl status turtlebot4.service
PC:
env | grep ROS
/etc/sysctl.conf
/etc/turtlebot4_discovery/setup.bash
/etc/turtlebot4_discovery/discovery_super_client.xml
systemctl stuff
The systemctl
status is showing a time jump from when the services were started. When you call date
on your robot, does it display the correct time and date?
Also can you run htop
and check that the CPU's are not being maxed out?
Hey, sorry for the delay @roni-kreinin . Here are the screenshots you asked for.
date appears to show the correct time and date:
And here is htop on the robot:
@roni-kreinin I am still struggling with this issue. When you get a chance please see the information I attached above. Thank you
Can you try stopping the turtlebot4 service with sudo systemctl stop turtlebot4
, then restarting the discovery server service with sudo systemctl restart discovery
. Once it has restarted, manually launch the turtlebot4 nodes with ros2 launch turtlebot4_bringup lite.launch.py
. Then, open a new terminal in the RPi and run ros2 daemon stop
, then ros2 topic list
. You may need to run ros2 topic list
twice to get a full list of available topics.
@roni-kreinin I did everything you asked for. The screenshot is from the second Rpi terminal you asked me to make. It looks like I got all the topics at first, but then with multiple "ros2 topic list" calls it went away.
Also, if it helps, this is the result of running ros2 launch turtlebot4_bringup lite.launch.py (sorry it is so small)
@rohanchandra-cpe There is likely some configuration that is missing, though I am not seeing anything wrong. Would you be interested in updating to Humble? There is a new setup tool that takes care of all this configuration automatically.
See https://turtlebot.github.io/turtlebot4-user-manual/setup/discovery_server.html#robot
@roni-kreinin hey, sorry for the lapse in responses, been busy with work. Since we last talked I have upgraded my Create3 to Humble 1.0, and I have attempted to update my RPi from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS. This morning I was able to ssh in just fine and confirm that the upgrade worked, however, I ran a sudo reboot (following this link: https://github.com/turtlebot/turtlebot4_setup) and now I can no longer SSH in.
I also cannot access the website for the Create3
@roni-kreinin If I wanted to factory reset the turtlebot4 and start all of the setup from scratch, how would I do that? Also, do you think that would be a good idea?
@rohanchandra-cpe Did you update the RPi4 to Ubuntu 22.04 manually? Or did you use a humble image from http://download.ros.org/downloads/turtlebot4/?
I upgraded it manually.
sudo apt update sudo apt upgrade sudo apt dist-upgrade sudo apt autoremove sudo do-release-upgrade
Can you try to follow https://turtlebot.github.io/turtlebot4-user-manual/setup/basic.html#install-latest-raspberry-pi-image to install the official humble image?
Will I need to ssh into the rpi and do this, because if so, I currently cannot ssh into it. The old IP address I used to ssh to does not work anymore. And if I try to ping it, I just get "Destination Host Unreachable"
No, you will have to remove the SD card from the RPi and flash it with a new image. Note that this will overwrite all data on the SD card, so save any changes you have made before doing so.
Ok, I'll do that and let you know how it goes. Thanks!
It said there wasn't enough space on the microsd for the pi. I noticed a lot of these files above that all have the same date (3/20/23), which is when I did the manual upgrade. Can I safely delete these?
Where are you seeing this error?
Within the file explorer itself
You can't just move the file onto the SD card. You need to image the card with a tool like dcfldd
. Do you have access to a linux machine that you can insert the SD card into?
Ah yes, sorry. I do. Thanks!
I see /dev/sda even when I don't insert the SD Card. Nothing seems to change here when I do insert it (the image is the output of sudo fdisk -l)
Is this running on a VM?
I'm on a Windows PC. I downloaded "Ubuntu 22.04 LTS" from the windows store. That is what this is
This is what I see on the Powershell: The D: is my SD Card
I'm not too familiar with WSL but you can try following a tutorial like this to mount the SD card. https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
@roni-kreinin I flashed the Humble image onto the Raspberry Pi SD Card and put it back on the bot. I was able to run "turtlebot4-setup" and I connected it to my 5Ghz network. However, I am still not able to see the /ip topic
The top window is what happened after I finished running the setup tool. I think the RPI rebooted twice, but that top terminal has not changed at all. The bottom terminal shows what happened after I tried calling "ros2 topic echo /ip"
@roni-kreinin Also, this is what happened when I tried to ping the IP that the RPi used to be on, and SSH in
Run the suggested ssh-keygen
command in the warning message, then try to ssh again.
The top window is what happened after I finished running the setup tool. I think the RPI rebooted twice, but that top terminal has not changed at all. The bottom terminal shows what happened after I tried calling "ros2 topic echo /ip"
The ssh session will freeze because the RPi has changed networks. You can close that terminal.
Ok, I was able to ssh into it. What should I do from here?
Please provide the following information:
Package version: "sudo apt install ros-galactic-desktop" is how I installed ROS2
Expected behaviour Pressing Button1 on the Create3 produces a message in the terminal that says "Button 1 Pressed!" As per this link here: https://turtlebot.github.io/turtlebot4-user-manual/tutorials/first_node_python.html
Actual behaviour No message appears upon pressing the button. Pressing CTRL+C to halt the command yields the error message attached in the image.
To Reproduce Provide the steps to reproduce:
Other notes I am currently attempting to follow the guide for the Turtlebot 4 lite. Specifically the "Creating your first node (Python)" section: https://turtlebot.github.io/turtlebot4-user-manual/tutorials/first_node_python.html. I get to the point where I need to run "ros2 run turtlebot4_python_tutorials turtlebot4_first_python_node." However, nothing happens when I press the first button on the Create3. Instead, when I CTRL+C out of the command, I get the error attached. I have connected the Raspberry Pi to a 5GHz network (wifi.sh) and the Create3 to a 2.4 GHz network. Please let me know how I can resolve this, Thanks!