Finally able to compile at least some code examples in VSCode. Working through the tutorials, hoping to finally set the wheels moving on my “robot” - just CORE2+ROS (Tinkerboard) and two motors and encoders. Following code fine, until I get to the step “Build your project and upload it to device”. Build, OK. Upload - that’s where I die.
Web IDE interaction has never worked at all, so not willing to waste more time there. So I have this code, which is built with catkin on the Tinkerboard. But how to load from there on to the Core2? One trivial code test from hFramework (servos) built and uploaded and ran using VScode on a Macbook and uploaded via serial connection, so I know it works.
ROS runs, examples runs except there is obviously nothing alive on the Core2, and even the serial connection from /opt/husarion/tools/rpi-linux/ros-core2-client /dev/ttyCORE2 fails to connect.
Can someone help be bridge the gap from compiled program on Tinkerboard to how to download it onto the Core2 and start it running as a member of the ROS world? Vacation quickly slipping away…I just want to see the wheels move and know the twist messages are getting to the Core2.
Thanks for any help.
Did you try with USB cable from Tinkerboard to Core2? As far as I remember somewhere in the forum is described how to copy a compiled program to the Core2.
Thanks so much Michael.
I was able to execute this procedure after removing the USB camera (which did work OK with the web IDE). It downloaded OK, but when I run roscore on the Tinkerboard, rosnode list only shows rosout. Is there anything in particular I have to do to kick off the code on the Core2? (Of course, entirely possible that my code is hosed.)
At least the solution to upload from the Tinker to the Core2 is solved in my brain.
Did you run serial bridge?
With running serial bridge, in
rosnode list you should get:
Yes I did, but with /dev/ttyS1 that I read in another thread (Problem with bridging CORE2 to ROS network - #6 by zielmicha)
I had also run ‘systemctl disable husarion-shield’ and rebooted; when I ran the command I got continual messages like:
Connecting to /dev/ttyS1 at 500000 baud…
But it never connects. Maybe it is just and issue of /dev/ttyS1 vs. /dev/ttyCORE2?
Can you confirm that the start of main should look like below for this configuration?
//platform.begin(&RPi); // comment this line
nh.getHardware()->initWithDevice(&RPi); // change here
And also in this case am I OK to run roscore on the Tinkerboard? (I tried that, and also using an external system that was configured with Husarnet as master in earlier attempts to get running)
Thanks for your help. Hoping for a breakthrough this weekend! I will check the /dev/ port used when I get home.
Got home and tried using /dev/ttyCORE2. Different, I think slightly better. Seems to connect, but then repeats these errors every ~15 seconds:
thealy@telepresencebot-2202:~$ /opt/husarion/tools/rpi-linux/ros-core2-client /dev/ttyCORE2
[INFO] [1530921558.430174]: ROS Serial Python Node
[INFO] [1530921558.467864]: Connecting to /dev/ttyCORE2 at 500000 baud
[ERROR] [1530921575.582529]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
rosnode list shows both /rosout and /serial_node, but rqt_graph just shows them both as isolated items - no sign of .cmd_vel or /diagnostics as shown in the tutorial.
I ran rosrun teleop_twist_keyboard teleop_twist_keyboard.py and it gives some feedback to the screen, but no action on the motors:
Blue, green and red LED lit solid - no blinking.
According to your change in th code from:
you are initializing Core2 to work offline, without connection to cloud. Consequently you need to disable to cloud connection also on TinkerBoard, in command line execute:
systemctl disable husarion-shield
and reboot. Keep in mind, that from now, your device will not be detected by the cloud. You can revert this change with:
systemctl enable husarion-shield
To verify, that you disconnected from cloud successfully:
You will get list of devices, among others, there will be
/dev/ttyS1 and there will be NO
Now you can connect:
As for the ‘rqt_graph’, to see all topics that are published, uncheck
Dead sinks and
Debug check-boxes on top of the window.
As for the
teleop_twist_keyboard output, what you see on screen, is just an information what data is published to