AlessioTonioni / Autonomous-Flight-ROS

A simple autopilot for a quadrotor realized using MoveIt!. The system use a simulated RGBD sensor to reconstruct the map, then ompl for path generation.
47 stars 24 forks source link

Group is not a chain! #1

Closed ankitvora7 closed 8 years ago

ankitvora7 commented 8 years ago

Hi Alessio,

Did you face an error saying 'Group quadrotor is not a chain. Kinematic solver cannot be initialized!' ? I'm facing this issue when I try to run Moveit! demo.launch or move_group.launch. Any suggestions ?

Ankit

AlessioTonioni commented 8 years ago

Hi Ankit, This demo was developed more than two years ago, so I can't really recall well what problems I faced. What version of ROS are you using? And have you tried to use my ".sh" files or have you wrote your own scripts? Anyway the main idea behind the project was to set up moveit with the setup assistant in order to use the hector quadrotor urdf and a virtual "floating joint" to connect the drone to the fixed "/map" joint. After doing this step you can create a new planning group with the real quadrotor joints and the virtual one you have just created, moveit should then be able to produce valid trajectory to move the drone avoiding obstacle. For question strictly related to moveit I would suggest you to write in the MoveIt google group here: https://groups.google.com/forum/#!forum/moveit-users Unfortunatly I'm now working on a totally different field and I haven't touched this code for a long time. Regards, Alessio.

ChengFrank commented 8 years ago

Hi,

I understand that it was implemented two years ago. But it will be very appreciated if I could have some information about how to configure and test it. I hope these are basic and easy questions for you and thanks in advance.

I have moveit!, ROS-groovy and hector_quadrotor installed.

  1. After creating a workspace, should I configure each package separately, using rosmake or catkin_make?

the following is what I did, after copying them into src filefolder of workspace,

catkin_make -----> moveit_simple_controller_manager rosmake--------> pr2_tele && action_controller

  1. How should I deal with hector_quadrotor and quadrotore2_moveit in your code?

Best regards,

AlessioTonioni commented 8 years ago

Hi, moveit_simple_controller_manager: is a modified version of this http://wiki.ros.org/moveit_simple_controller_manager to handle multiDofFollowJointTrajectoryAction, it must be compiled with catkin_make. action_controller: is the node that handle the trajectory execution, it translate multiDofFollowJointTrajectoryAction into cmd_vel to fly the drone. It should be compiled with rosmake. pr2_teleop: is a modified version of http://wiki.ros.org/pr2_teleop to handle 6 degrees of freedom movement, compile with rosmake. hector_quadrotor: is a modified version of http://wiki.ros.org/hector_quadrotor, if I remember correctly the only change I made were in some lunch file and a modified urdf in 'hector_quadrotor_urdf', so you can just add them to the installed default hector quadrotor. The additional files should be "hector_quadrotor_urdf/urdf/quadrotore.urdf", "hector_quadrotor_gazebo/launch/mySpawn_quadrotor_with_kinect.launch", "hector_quadrotor_gazebo/launch/mySpawn_quadrotor.launch". quadrotore2_moveit: are configuration files for move it generated with moveit setup assistant using "quadrotore.urdf". You shouldn't need to change anything there, nor compile it in any way, they are just configuration and launch files.

When everything is ready the four .sh files will launch the simuator and spawn a quadrotor (1-simulator.sh), create the action_controller (2-controller.sh), open rviz with the moveit plugin for visualization and planning (3-planner.sh) and create the teleop node to manualy fly the drone (4-teleOp.sh)

ChengFrank commented 8 years ago

Hi,

Thank you very much for your help.

I understand that you are very busy in working so thank you again for your time. Now, I think I am pretty close. (If I can figure it out I would like to post the detailed instructions under your video to help more guys.)

"catkin_make moveit_simple_controller_manager" success
"rosmake action_controller" success pr2_teleop In progress on installing groovy-version moveit...

Now, still on the topic of ## hector_quadrotor I think every single folder in the hector_quadrotor is a single package, so I placed each of them in my workspace's /src/ and used rosmake to configure them. Looks fine but I feel unsure. Should I place it as a whole folder under the src/ of the same workplace with other packages? If so, how should I configure it?

Thank you very much for your time and help!

Best regards

ankitvora7 commented 8 years ago

Hi @AlessioTonioni , I'm using Indigo and have written my own launch files. Actually I'm not using your code but read somewhere that code also gives the same error that I'm getting. So just wanted to check with you. Anyways thanks :) @ChengFrank : If you're working on this project, can you share your email id so that we could collaborate and help each other out ?

ChengFrank commented 8 years ago

Hi Ankitvora,

Thank you for your invitation. I am working on this project for testing several paper's algorithms but I'm new to Robot. I catkin_make the indigo release source and got the same problems like yours. Glad to share the detailed information with you.

Did you get warnings about the topics of robot urdf, camera name not specific, and no join to motor so robot uncontrollable when executing sh1?

I also tested the groovy version on another machine. After deleting all MakeCache and modifying the source paths, rosmake [action_controller], rosmake [pr2], rosmake [hector_quadrotor], catkin_make moveit_simple_controller_manager (no errors, seems) successful. But also got the problems above.

Same problems of this project also raised years ago here ) so it looks like we are not the only guys confused.

It seems that the modified urdf of hector_quadrotor does not work with Moveit! and caused the problem, which is a little bit unexpected.

Early hope that Mr. Tonioni could spare few minutes to post how to run the code, at least of groovy-release.

By the way, may I know whether you configured this project on a groovy-ros, moveit-pr2-groovy, and gazebo2?

Best regards,

cy05073@gmail.com

AlessioTonioni commented 8 years ago

Hi,

I think every single folder in the hector_quadrotor is a single package, so I placed each of them in my workspace's /src/ and used rosmake to configure them. Looks fine but I feel unsure. Should I place it as a whole folder under the src/ of the same workplace with other packages? If so, how should I configure it?

If I remember well I simply added the additional urdf and launch files in the default installation folder of hector_quadrotor installed with apt-get install. Anyhow I don't think that the location of the package matters as long as ROS is able to correctly locate the package. Do you get the correct path executing rospack find %your_package_name%?

I catkin_make the indigo release source and got the same problems like yours

The indigo version was a porting made some months ago by a bitbucket user, you can find his username in contributors.txt, I think that he was able to correctly compile everything and execute the demo. I haven't personally tried it, so I don't know if it has some specific problem.

It seems that the modified urdf of hector_quadrotor does not work with Moveit! and caused the problem, which is a little bit unexpected.

This seems really strange, certainly, new versions of moveit have come out in two years, but everything should be backward compatible, at least I hope!. The only difference between my urdf and the default _quadrotor_whitkinect.urf.xacro is the addition of this plugin to publish ground truth information: `

100.0
  <bodyName>base_link</bodyName>
  <topicName>ground_truth/state</topicName>
  <gaussianNoise>0.0</gaussianNoise>
  <frameName>map</frameName>

`

So I don't think that this could create problems with moveit.

If you have already tried to rebuild your configuration files for moveit please ignore the following.

If you think that your problem could be related to _quadrotore2moveit you can ignore it and recreate it easily using moveit setup assistant. To do so follow this tutorial: http://docs.ros.org/hydro/api/moveit_setup_assistant/html/doc/tutorial.html Obviously you should use my modified "quadrotore.urdf" instead of "pr2.urdf", maybe you'll need the xacro version of the urdf, but it should be esily generable with command line tools. When you reach step 3 of the tutorial remember to set the joint type as "virtual/floating", this essentially means that your robot has 6 degrees of freedom. This is the only crucial step to use moveit with a uav, credits to rosAnswer user 'isucan' that answer my question back in 2013! http://answers.ros.org/question/72238/quadrotor-navigation-by-goal/ The next steps are all well explained in the tutorial so there shouldn't be any problem, skip the meaningless parts for a quadrotor like the configuration of grippers or fixed pose. At the end you should get a package that is pretty much equivalent to my _quadrotore2moveit and at least you should be able to launch the rviz demo following these steps: http://docs.ros.org/indigo/api/moveit_ros_visualization/html/doc/tutorial.html

If anything goes explicitly wrong maybe we can figure out better where the problems are.

Regards, Alessio

ankitvora7 commented 8 years ago

@AlessioTonioni ,

By adding the plugin 'libgazebo_ros_p3d.so' you get the states in the topic /ground_truth/state through nav_msgs/Odometry type messages. Whereas the move_group requires you to have /joint_states topic publishing sensor_msgs/JointState. Do you remember transforming the message types ?

ChengFrank commented 8 years ago

Hi, @ankitvora7

Have you get things working?

I attached the errors report of Groovy release here for you and @AlessioTonioni to have a look.

After sh 1-simulator.sh, the followings.

[ WARN] [1459807145.634478245]: The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead [ WARN] [1459807145.646292440]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. process[ground_truth_to_tf-3]: started with pid [19524] loading model xml from ros parameter [INFO] [WallTime: 1459807146.465655] [7.295000] waiting for service /gazebo/spawn_urdf_model Warning [parser.cc:314] parse from urdf. [ INFO] [1459807147.482107971, 7.676000000]: Camera plugin missing , default to empty This one is critical I think _Error _[SDF.cc:760] Missing element description for [CxPrime] [ INFO] [1459807147.482292176, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482356253, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482391725, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482435154, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482477998, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482521208, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482552149, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482583691, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482636913, 7.676000000]: Camera plugin missing , defaults to 0 [ INFO] [1459807147.482672514, 7.676000000]: Camera plugin missing , defaults to 0 [ WARN] [1459807147.552664974, 7.676000000]: dynamic reconfigure is not enabled for this image topic [camera/rgb/image_raw] becuase is not specified Error [SDF.cc:760] Missing element description for [pointCloudCutoff] spawn status: SpawnModel: successfully spawned model [ INFO] [1459807148.076522353, 7.676000000]: p3d plugin missing , defaults to 0s [ INFO] [1459807148.076597965, 7.676000000]: p3d plugin missing , defaults to 0s [spawn_robot-1] process has finished cleanly log file: /home/yc/.ros/log/6cafb5e6-fab0-11e5-bf03-001c4232e3d3/spawn_robot-1*.log Error [Events.hh:141] Events::ConnectWorldUpdateStart is deprecated in v 1.5.0. Please use Events::ConnectWorldUpdateBegin [ INFO] [1459807148.167691499, 7.676000000]: starting gazebo_ros_controller_manager plugin in ns: / [ INFO] [1459807148.168197295, 7.676000000]: Callback thread id=0x7f41e4106e30 [ WARN] [1459807148.377945334, 7.676000000]: No transmissions were specified in the robot description.

[ WARN] [1459807148.378064775, 7.676000000]: None of the joints in the robot desription matches up to a motor. The robot is uncontrollable. [ WARN] [1459807148.577937330, 7.676000000]: No transmissions were specified in the robot description. [ WARN] [1459807148.578054006, 7.676000000]: None of the joints in the robot desription matches up to a motor. The robot is uncontrollable.

I worked it on ubuntu 12.04, groovy-full with gazebo simulator. Moveit installed via sudo apt-get install ros-groovy-moveit-full. So as libgazebo.

Best regards,

Frank

AlessioTonioni commented 8 years ago

By adding the plugin 'libgazebo_ros_p3d.so' you get the states in the topic /ground_truth/state through nav_msgs/Odometry type messages. Whereas the move_group requires you to have /joint_states topic publishing sensor_msgs/JointState. Do you remember transforming the message types ?

No I didn't had to transform the message type, maybe something has indeed changed from when I runned the demo for the video.

[ INFO] [1459807147.482107971, 7.676000000]: Camera plugin missing

[ INFO] [1459807148.076522353, 7.676000000]: p3d plugin missing , defaults to 0s

It seems that you are missing two gazebo plugin, one to simulate the rgb camera and one for the ground truth data, you should be able to install them individually.

[ WARN] [1459807148.378064775, 7.676000000]: None of the joints in the robot desription matches up to a motor. The robot is uncontrollable.

This warning instead if I remember well was also present in my setup.

chethanparameshwara commented 8 years ago

Hey Guys,

I am also facing same error that " Group 'Quadrotore' is not a chain ". Have you guys could able to solve this? I would like to collaborate with you guys in solving this problem. Here is my mail id analogicalnexus159@gmail.com . Feel free to ping me.

ankitvora7 commented 8 years ago

@analogicalnexus ,

This actually shouldn't cause any issues. I get that error but still I'm able to plan paths.

chethanparameshwara commented 8 years ago

@ankitvora7

Were you able to create 3D grid map of whole environment using pr2 teleop ? And, I also getting error When I run 4-teleop.sh file ? So, how did you build pr2 teleop? Rosbuild or catkin

ankitvora7 commented 8 years ago

I'm not using Alessio's code but yes you can create a 3D map with his code base.

On Sat, Apr 9, 2016 at 2:41 PM, Chethan M P notifications@github.com wrote:

@ankitvora7 https://github.com/ankitvora7

Were you able to create 3D grid map of whole environment using pr2 teleop ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/AlessioTonioni/Autonomous-Flight-ROS/issues/1#issuecomment-207828447

chethanparameshwara commented 8 years ago

Could you please share the link to the code base which you are using if it is available as open source repository? Thanks in advance