Skip to content
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

youbot_driver base_arm_gripper_test problem #16

Closed
ChefOtter opened this issue Apr 6, 2016 · 13 comments
Closed

youbot_driver base_arm_gripper_test problem #16

ChefOtter opened this issue Apr 6, 2016 · 13 comments

Comments

@ChefOtter
Copy link

ChefOtter commented Apr 6, 2016

@frederikhegger
Hi mate,
I have some problem with youbot_driver
I am using ROS Indigo in Ubuntu 14.04 and try to experiment with youbot which i downloaded youbot_driver from github repo.

I cloned youbot_driver in my catkin_ws/src
in catkin_ws
executed catkin_make
source devel/setup.bash
i did also sudo setcap cap_net_raw+ep catkin_ws/devel/lib/youbot_driver/base_arm_gripper_test
after then i execute rosrun youbot_driver base_arm_gripper_test

I am getting following error

Attention! All wheels of the youBot will move during the test. 
The youBot should NOT stand on the ground and the wheels should be in the air! 
Also the arm will move please be carefull!
Are all wheels off the ground? [n/y]
y
terminate called after throwing an instance of 'youbot::FileNotFoundException'
  what():  ../config/youbot-ethercat.cfg file not found
Aborted (core dumped)

but if i do like this, according to readme text in youbot_driver folder

cd catkin_ws/src/youbot_driver/build
in build folder
cmake ..
make
sudo setcap cap_net_raw+ep catkin_ws/devel/lib/youbot_driver/base_arm_gripper_test
rosrun youbot_driver base_arm_gripper_test

I am getting this error which is in following text file
youbot_driver_error.txt

youbot arm moves little bit and then stops and also arm beeps. after all no reaction any more.
Did you have also any error like this on your youbot? Is there any fix or solution for it?
I am very happy about any help or advice
thank you in advance

@ChefOtter ChefOtter changed the title youbot_driver execute problem youbot_driver base_arm_gripper_test problem Apr 6, 2016
@frederikhegger
Copy link
Collaborator

Dear CheffOtter,
the first problem occurs due to the fact that inside the test cases they use

EthercatMaster::getInstance("youbot-ethercat.cfg", "../config/", true);

I.e. if you execute

rosrun youbot_driver base_arm_gripper_test

from any subdirectory of the youbot_driver package, then at least the test start to run, but I get the same errors as you described in the second case.

I will look into this now.

@frederikhegger
Copy link
Collaborator

frederikhegger commented Apr 15, 2016

Dear CheffOtter,
I fixed the second problem with #17.

Please let us know if it worked for you.

Best regards,
Frederik

@ChefOtter
Copy link
Author

ChefOtter commented Apr 15, 2016

Hi Frederik,
thank you for your answer. I tried that on my youbot.
As i described at above there is always same thing.
in catkin_ws executed

catkin_make
source devel/setup.bash
sudo setcap cap_net_raw+ep catkin_ws/devel/lib/youbot_driver/base_arm_gripper_test
then rosrun youbot_driver base_arm_gripper_test

I am getting following error

Attention! All wheels of the youBot will move during the test. 
The youBot should NOT stand on the ground and the wheels should be in the air! 
Also the arm will move please be carefull!
Are all wheels off the ground? [n/y]
y
terminate called after throwing an instance of 'youbot::FileNotFoundException'
  what():  ../config/youbot-ethercat.cfg file not found
Aborted (core dumped)

if I execute

rosrun youbot_driver base_arm_gripper_test

from any subdirectory of the youbot_driver package,it doesn't test start to run, but if I execute from
catkin_ws/src/youbot_driver/build subdirectory
in build folder
cmake ..
make
sudo setcap cap_net_raw+ep catkin_ws/devel/lib/youbot_driver/base_arm_gripper_test
rosrun youbot_driver base_arm_gripper_test
then it works but i am getting also errors again . I added in txt file again.
youbot_driver_error_1.txt
in this text file i am getting such a errors like below

ec_inframe expected index 6, received 5, last received was 4; discarding packet
Warning: Restored Communication (after 1 errors)
Warning: Receiving data failed

Warning: arm_joint_5 exceeded timeout
Trace: automatic send is not possible if the EtherCAT master has no thread

##Failure Location unknown## : Error
Test name: YouBotGripperTest::youBotGripperTest
uncaught exception of type std::runtime_error
- could not create folder!

and so on. do you know where are the coming from? is there any fix for it?

and also i added a video, which is included behaviour from youbot self.
youbot_driver_base_arm_1.zip
in this video has behaviour of youbot is normal ?

@frederikhegger
Copy link
Collaborator

Hi ChefOtter,
the problem when running the base/arm test executable from your catkin workspace is, that the test cases look for the "youbot-ethercat.cfg" file in ../config/youbot-ethercat.cfg (e.g. line 7 of https://github.com/youbot/youbot_driver/blob/master/testing/YouBotArmTest.cpp). Since this is a relative path, this happens with respect to your current working directory. For this, I do not see a quick fix yet.

The workaround, as described in the previous comment, worked for me (call rosrun from any subdirectory of the youbot_driver package). Unfortunately, I can not reconstruct your problem, that you can do this only from the build directory.

The errors in the txt file you provided, look like communication errors. Does your youBot work properly otherwise, e.g. by launching the driver?

It might be also that your youBot has an older firmware (1.48) than ours (2.00). I don't know if this makes a difference. But I guess not, since the test cases were written in the times where v2.00 was not available yet. And unfortunately, I do not have a youBot with firmware v1.4.8 available.

The remaining error with "could not create folder" I fixed. You can find the fix in the updated pull request #17 .

If it helps, I can upload the information outputted on the terminal when running the test cases on our youBot.

Best regards,
Frederik

@frederikhegger
Copy link
Collaborator

Hi ChefOtter,
I updated the pull request #17. It should work now with rosrun from any directory.

Best,
Frederik

@ChefOtter
Copy link
Author

Hi Frederik,
Sorry for delayed answer, i had a time today to test youbot_driver folder. Now i can call this file everywehere. it works. But i have another problem, if i execute
rosrun youbot_driver base_arm_gripper_test

Although I added all changes in my code, what you changed in here, i can call this program anywhere but i am getting this errors, it can't find config folder, actually which is in folder.

##Failure Location unknown## : Error
Test name: YouBotBaseTestWithoutThread::YouBotBaseTestWithoutThread_PositionMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-base.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseTestWithoutThread::YouBotBaseTestWithoutThread_VelocityMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-base.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseTestWithoutThread::YouBotBaseTestWithoutThread_CurrentMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-base.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseTest::youBotBaseTest_PositionMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseTest::youBotBaseTest_VelocityMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseTest::youBotBaseTest_CurrentMode
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotBaseKinematicsTest::youBotBaseKinematicsTest
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotArmTestWithoutThread::youBotArmTest
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-manipulator.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotArmTest::youBotArmTest
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

##Failure Location unknown## : Error
Test name: YouBotGripperTest::youBotGripperTest
uncaught exception of type youbot::FileNotFoundException

  • ../config/youbot-ethercat.cfg file not found

Failures !!!
Run: 10 Failure total: 10 Failures: 0 Errors: 10

Should I add also this config folder into my bashrc?
also i tried to change something in CMakeLists.txt, i gave direct path to the config folder, it can't find the path also.
add_definitions(-DCONFIG_FOLDER_PATH="catkin_ws/src/youbot_driver/config/")

Any idea?
Best Regards
ChefOtter

@frederikhegger
Copy link
Collaborator

Did you recompile the repository? Maybe you try to delete the devel and build folder before as well.

@ChefOtter
Copy link
Author

I deleted files under these folders

  • catkin_ws/src/youbot_driver/build
  • catkin_ws/build/youbot_driver/
  • catkin_ws/devel/lib/youbot_driver/
  • catkin_ws/devel/share/youbot_driver/

I recompile all

cd catkin_ws/src/youbot_driver/build
cmake ..
make
sudo make install

cd catkin_ws
catkin_make
source devel/setup.bash
sudo setcap cap_net_raw+ep devel/lib/youbot_driver/base_arm_gripper_test 
rosrun youbot_driver base_arm_gripper_test

and same errors like before, previous post.
Nothing changed

@frederikhegger
Copy link
Collaborator

Somehow, you are doing things twice. So, either you compile the youbot_driver package without catkin and just using plane cmake (like the first three commands) or you just compile it using catkin_make.

I suggest to do the following:

mkdir -p ~/test_ws/src
cd ~/test_ws/src
git clone -b hydro-devel https://github.com/youbot/youbot_driver    # even if you are using indigo or higher versions of ROS. Do not forget to get the modifications from the merge request
cd ~/test_ws
catkin_make
source devel/setup.bash
sudo setcap cap_net_raw+ep devel/lib/youbot_driver/base_arm_gripper_test 
rosrun youbot_driver base_arm_gripper_test

@ChefOtter
Copy link
Author

ChefOtter commented May 9, 2016

Hi again Frederick,
I tested like this, what you wrote above. and i used files with modifications.
I tried suggested option, just with catkin_make.
Das package cannot find *.cfg files, in the file you can see the errors.
errors.txt
I think, maybe error could be in the ethercatmaster.hpp and other header files. If the package find the arm and base, because of this he cannot find *.cfg file.
ps: i didn't do twice at all, i wrote just what i did, i try to reach the result, which I tried everything what i can 👍
thanks
best regards

@frederikhegger
Copy link
Collaborator

frederikhegger commented May 10, 2016

I hopefully fixed it with commit 94b398b (as part of the pull request #17)

@ChefOtter
Copy link
Author

ChefOtter commented May 10, 2016

Dear Frederik,
thank you for your help, it fixed well, it works well 👍 💯
best regards and Prost!!!

@frederikhegger
Copy link
Collaborator

Perfect. Nice to hear. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants