robomaster_s1_can_hack icon indicating copy to clipboard operation
robomaster_s1_can_hack copied to clipboard

Can you clatify the can bus connections for this setup?

Open console-beaver opened this issue 5 years ago • 11 comments

We are trying to use this code, but it doesn't work in our setup. We still can control gimbal/blaster via Robomaster app and can capture the canbus packets from the "intelligent" controller, but we cannot control motors ("motion" controller) via both joystick and Robomaster app.

Can you please clarify how to you connect Can Bus'es in your setup?

console-beaver avatar Dec 16 '19 14:12 console-beaver

Hi @console-beaver . I have the same problem. I can't controll motors (gimbal is working). I use 2 CAN-BUS and I use the oldest code version. Can you tell how did you solve a problem? It's really important for me. Thanks 👍

Radziula7 avatar Nov 16 '20 21:11 Radziula7

Generally speaking, the old code with two CAN Bus connections where the controller was sandwiched between CAN Busses as a pass-thru, had alot of issues. I'm now using the newer code which got rid of "Intelligent controller" and it works for me.

Also make sure you keep holding L2 button on your controller, otherwise it wont send any messages.

console-beaver avatar Nov 16 '20 23:11 console-beaver

Generally speaking, the old code with two CAN Bus connections where the controller was sandwiched between CAN Busses as a pass-thru, had alot of issues. I'm now using the newer code which got rid of "Intelligent controller" and it works for me.

Also make sure you keep holding L2 button on your controller, otherwise it wont send any messages.

I had the same problem, but when i change code on the newest (one CAN) robot didn't respond.

krvcz avatar Nov 17 '20 07:11 krvcz

125486964_2860655454218088_3963727592021439660_n @console-beaver look at this photo. Did you have the same problem when you used code "Intelligent controller"? I use this code and robot dosen't respond. Thanks for anwser 👍

Radziula7 avatar Nov 17 '20 12:11 Radziula7

Where you are getting these messages from? ds4drv? Make sure you start ds4drv with elevated privileges, i.e. via sudo.

console-beaver avatar Nov 17 '20 17:11 console-beaver

Where you are getting these messages from? ds4drv? Make sure you start ds4drv with elevated privileges, i.e. via sudo.

The same problem . Roscore is working and when i want roslaunch then i see the same error. I think ROS is working, but it's something wrong in robomaster ros code

EDIT: sudo ds4drv work fine

krvcz avatar Nov 17 '20 17:11 krvcz

@console-beaver , I had problem when i tried start "roslaunch ros_robomaster_s1_bridge robomaster_s1_bridge_joy.launch". Drives ds4drv work good. I don't know what is a problem. What do you think, what is not ok ? Thanks :)

Radziula7 avatar Nov 18 '20 16:11 Radziula7

@krvcz, @Radziula7 make sure that you are using the older version of robomaster_s1_bridge_joy ROS code. The old version uses udp protocol to communicate with the bridge controller, the newer version uses USB.

console-beaver avatar Nov 18 '20 17:11 console-beaver

@console-beaver. I also uploaded the newest code version and I connected the wires correctly (robomaster led is blue). I uploaded program in ros and I tried testing ros program, robomaster didn't move :(

Radziula7 avatar Nov 18 '20 17:11 Radziula7

Try to troubleshoot the joystick controls, to make sure it's working under linux.

  1. Make sure your remote controller type is correctly set in robomaster_s1_bridge_joy.launch, i.e. ps3/ps4/xbox/etc

  2. Make sure that /dev/input/js0 and /dev/hidraw0 devices are being created with correct permissions, so your user can read them, i.e.:

root@nx-tegra194:~# ls -la /dev/input/js0 crw-rw-r--+ 1 root input 13, 0 Aug 31 16:53 /dev/input/js0

root@nx-tegra194:~# ls -la /dev/hidraw0 crw------- 1 root root 509, 0 Aug 31 16:35 /dev/hidraw0

  1. Test the remote control with jstes, i.e.:

sudo jstest /dev/input/js0

console-beaver avatar Nov 18 '20 17:11 console-beaver

@console-beaver thanks for your advice. Can I ask you when i have a problem ? :)

Radziula7 avatar Nov 18 '20 18:11 Radziula7