linorobot/linorobot2_hardware

The firmware was uploaded but nothing's happening.

Shromm-Gaind opened this issue · 27 comments

I have followed the guide on how to configure the hardware of linorobot, and got past the point of uploading firmware onto the Teensy 4.0 (everything up to this point is successful). However, once I try and drive it around and enter the keys to move it forward and backward nothing happens. I have looked at the troubleshooting guide, but I am very confident I am using the Teensy 4.0.

Could you describe what's your setup like (OS, ROS2 Distro)? Are you running any of the OS on a VM?

I am using Ubuntu 20.04.1 and ROS2 Foxy. I am able to get to the point on the terminal where it shows me the keys and how to operate it. The motors are spinning when I am using the calibration software and in the right orientation.

Is the Teensy’s LED flashing even without pressing any keys?

It isn't flashing.

The LED is on when this command is run ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0.

Actually I am having a similar issue where I can spin and sample the motors in calibration but once I upload the robot firmware, the whole world stopped.
After running "pio run --target upload -e teensy31" in folder linoronot2_hardware/firmware, the upload was successful.
However, once the upload is done, my whole ubuntu will just freeze.
The terminal is freezed, and neither my mouse nor keyboard works.
However the system is still running because the time on top of the screen is till working.
If I cut the power of the robot computer and turn it back on, the teensy is simply gone (cannot be detected)
If I try to run "ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM1" (its ttyACM1 because ttyACM0 is taken by the build in arduino of the lattepanda), it says serial port not found.

I am using a LattePanda V1 and a teensy 3.2 (teensy 3.2 should be the same as teensy 3.1 as they share the same chip except that teensy 3.2 has a better power supply, so when uploading the firmware I used teensy31 as the model)

Could you try uploading a simple microros 'hello world' firmware using this https://github.com/linorobot/micro_ros_platformio. Use the same platformio config as linorobot2.

It's supposed to publish an incrementing number on micro_ros_arduino_node_publisher topic.

Thank you for your advice! We've managed to upload the "hello world" firmware. Unfortunately, the nodes are not being set up and the topics are not advertised as shown in these screenshots. We appreciate any advice on how to proceed
Screenshot from 2022-03-24 19-20-46
Screenshot from 2022-03-24 19-21-50
Screenshot from 2022-03-24 19-22-02
.

Looks like you have one more device in the /dev/ttyACM* port. Can you confirm that you are assigning the correct serial port?

I am still having the issue. Where the calibration when run using screen /dev/ttyACM0. I get the wheels to spin forward, I get the encoders values etc. However when I try and run telop nothing is happening, it doesn't even move forward. Is it possible I am configuring it wrong?

I've updated the firmware recently, could you pull and try the latest version?

Will do so, and let you know. Is it possible that the reason for the robot to not move after the calibration is likely due to micro_ros not communicating with the teensy board. Because as far as I can see the calibration doesn't require micro_ros.

yes could be related to this 5220465

hey @Shromm-Gaind. Did my previous answer resolve your issue? Could you try uploading the most recent firmware

I have done so, but teleop_twist_keyboard still doesn't work. I think it is just micro_ros, but when I run the agent, there are no bugs or problems.

are you running teleop_twist_keyboard from the same machine where the agent resides?

does the Teensy's LED flash (fast rate) when you press a control key from teleop_twist_keyboard

No, should it?

Just curious aside from the robot's Teensy controller, are there any USB device connected to the robot's computer? If so, could you remove everything except the Teensy controller? Just to ensure there's no serial port clash or anything.

No, there are no other serial connections

Alright, it seems that the agent is not picking up the Twist msgs. The Teensy's LED is supposed to flash when Twist commands are received. Could you do this simple agent test https://github.com/linorobot/micro_ros_platformio and check if you're able to echo the data.

I believe that it might be my Teensy having some problem at this point. I have a spare one at my uni. Will try that out and let you know.

Alright, let me know how the agent test go. Thanks

I have managed to solve the issue, I did replace the teensy, but that did not work as expected. But, I swapped from using a Intel Nuc to a raspberry pi 4 and it seems to work.

I should have checked earlier if the Nuc was compatible, my fault. Thanks a lot with the help though.

Thanks! Closing this for now