-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to run kangaroo driver node but not error when it was compile. #3
Comments
You shouldn't need to modify the port setting in Some other things to watch out for:
|
Yeah. I used the delink to connect kangaroo to PC. Then I checked the port by typing /dev/tty . I found ACM0. Then I chomd 777 /dev/ttyACM0. The baud rate for kangaroo is 9600 and I did change it in the kangaroo_driver.cpp. |
Sir.Sorry to disturb you again. Does ACM0 look a little wired? Is it supposed to be something like USBX? |
Okay, so if you look at the code here: https://github.com/smd-ros-devel/kangaroo_x2_driver/blob/master/src/kangaroo_driver.cpp#L504, you can see where your error is being thrown. Now, the error message that we are giving you in our driver is not very good (sorry about that). We actually are able to read from the serial, but the real issue is that the Kangaroo told us there was an error and did not return meaningful data otherwise. Taking a look at http://www.dimensionengineering.com/datasheets/KangarooPacketSerialReference.pdf, specifically under the section "Error Codes", we see that the error code you are getting back is error code 3. Referencing the other kangaroo manual (http://www.dimensionengineering.com/datasheets/KangarooManual.pdf), we see that error code 3 means "Control error, channel disabled. Check to make sure your feedback sources are working and the system matches how it was set up during the tune. " Okay, so now we know for sure that A) you are actually able to successfully send and receive data from the Kangaroo, and therefore B) it is not an issue with the baud rate, port number, etc. Now, there are several things that could be going wrong, and we are going to need more information in order to fully diagnose it. Could you describe in more detail what's happening with the error message? Is it only happening once, or are you being flooded with the error messages? Also, could you show us the code you are using to run the node so that we can get a better idea of what could be happening? Thanks! |
To @mattamert . Yeah. It happens all time whenever I run the kangaroo_driver node. And another point is that my kangaroo motion controller only has one motor connected. Is it the reason that error happened? |
Sorry, the code that I was referring to were your ROS params (it's been over a year since I've touched ROS related stuff, so I'm very rusty at this). Only having one motor connected is probably the reason the error messages are occurring. The driver assumes that there are two motors, and when the driver sends a message to the Kangaroo, it sends one for each channel. This is because the driver was not, at the time, meant to be extensible; it was written in only a few days and meant to be only used for our specific robot. (We were in a time crunch for a competition). Try connecting a second motor to the other channel, and see if that fixes the problem. I am hesitant about modifying the code right now to support only one motor because I do not have access to the equipment necessary to test the changes. However, if you do not have access to a second motor controller, I can probably point you to the lines of code you will have to remove to support only one motor. I hope this helps! |
@mattamert Yeah . I will try it when school starts. Thanks for you help. Both you and @cottsay are all so kind and patient. It makes me feel confident in completing this project. |
Hi.Today in lab I want to use the ROS in virtual box to control the motor connect to the kangaroo and sabertooth set. The node is compiled successfully and I did find out the port which has been using and make it available. Besides, I have modified the port setting inside the kangaroo_driver.cpp. Everything seems perfect. When I tried to run the node, it shows "fail to read from the serial. Sent start signals to clear." The address of the code used is https://github.com/smd-ros devel/kangaroo_x2_driver/blob/master/src/kangaroo_driver.cpp .
The text was updated successfully, but these errors were encountered: