RoboMasterS1Challenge / robomaster_s1_can_hack

DJI RoboMaster S1 CAN Hack
MIT License
101 stars 23 forks source link

Can you clatify the can bus connections for this setup? #3

Open console-beaver opened 4 years ago

console-beaver commented 4 years ago

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?

Radziula7 commented 3 years ago

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 👍

console-beaver commented 3 years ago

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.

krvcz commented 3 years ago

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.

Radziula7 commented 3 years ago

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 👍

console-beaver commented 3 years ago

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

krvcz commented 3 years ago

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

Radziula7 commented 3 years ago

@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 :)

console-beaver commented 3 years ago

@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.

Radziula7 commented 3 years ago

@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 :(

console-beaver commented 3 years ago

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

Radziula7 commented 3 years ago

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