SetCollisionLevel does not work via pythonAPI


#1

I added to the python API a command to set the collision level. Below you can see the communication between PC and robot:

Send to 192.168.1.6:29999: SetCollisionLevel(3)
Receive from 192.168.1.6:29999: 0,{},SetCollisionLevel(3);

It looks like that the “SetCollisionLevel()” command is correctly applied and acknowledged by the robot. However, the collision level is not updated in the Dobot Studio Pro and I think that the collision level is not changed at all.

Could it be that the current firmware (1.5.6.0) does not support to use “SetCollisionLevel()” via python or any other API yet?


#2

Yes, the interface used to change CollisionLevel in TCP/IP is different from the interface used in DobotStudio, so it doesn’t change in the input command software, but it actually works. You can run the Python script to try it out


#3

Thanks, I will test it.


#4

I did a test on this as well, and do not see any effect. Any updates on this topic?


#5

As far as I remember, the command indeed took effect and the collision sensitivity changed but because there was no direct visual feedback in the program I cannot confirm it by 100%. Often, it could also help to check the changelog of the firmware to see whether there has been some update regarding the effect. If you like to cross-check with our code have a look at our SweepMe! Dobot MG400 driver: https://sweep-me.net/device/216/Dobot_MG400


#6

Thanks for the response.
I can see that it states in the link that:
’ The collision level cannot be set via the driver and must be changed in Dobot Studio Pro’?

I tried to implement the SetColiisionLevel to the python API, and as you also write in the top, it does respond with a message that indicates that it worked. I tried to ‘push’ the robot by hand, and noted that there was not any difference between 0 (off) and 5 (high sens). Doing the same within Dobot Studio Pro did work.

I’m thinking of using this functionallity with setting sensitivity to do a check, whether the robot has managed to grip an object using the suction cup, or if it failed. When it has gripped, i want it to do a controlled collision, to set it into collision error mode, and read the error code. If the error code is present, it means that the object was gripped. Therefor, its important that i can change the sensitivity on the fly.


#7

oops, thanks for the hint. I need to update the driver description. Still, it could depend on the firmware and how the commands are processed. We are using now 1.5.7 or newer.

Regarding the collision, I had a similar question (Resume after collision) but no answer so far. I think it is difficult to implement with the current set of functions, because once you disable the alarm and like to resume, it is likely that the collision is detected again. I did not test much into this direction, but I am not sure whether this will work reliably. Any update report would be nice if you are able to make some progress. I also spoke with a german distributor of the robots and they did not know a working solution as well.