Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1441

How to connect the MoveIt! planning with Gazebo simulation

$
0
0
I am copying my [question from the answers.gazebosim.org](http://answers.gazebosim.org/question/22353/how-to-connect-the-moveit-planning-with-gazebo-simulation/) forum here, because I'm not sure to which forum this better suits. I am trying for several days to achieve a connection between MoveIt! and Gazebo. I tried to follow various tutorials and find the right usage in other people repositories. I wasn't able to get to a working prototype and I run out of options what to try. My current code is in this repository: https://github.com/kkumpa/ros-robotic-arm How I got to this code: 1. I have build a robot model in URDF format. The robot consists of two moving joints. ([robotic_arm_description](https://github.com/kkumpa/ros-robotic-arm/tree/master/robotic_arm_description)) ![image description](/upfiles/15560955868593006.png) 2. Following [this tutorial](http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/setup_assistant/setup_assistant_tutorial.html), I have used the MoveIt! Setup Assistant 2.0 to generate moveit config files. ([robotic_arm_moveit_config](https://github.com/kkumpa/ros-robotic-arm/tree/master/robotic_arm_moveit_config)) 3. I clicked "Generate Collision Matrix" in the Self-Collisions tab. I didn't uncheck anything. Left it as it was generated. 4. I added a virtual joint in the Virtual Joints tab. I don't know what is this good for. I saw it in one of the tutorial. I don't know what should be the parent frame and the child link. 3. I added the planning group consisting of the two revolute joints and the fixed joint fixing the long arm to the second revolute joint. And a planning group containing the end effector link. 3. I added some robot poses 3. I set the end `effector_link` as the end effector in the End Effectors tab. 3. I have created the `forearm_position_controller` set as `position_controllers/JointTrajectoryController` (that is the type of the joints in the group) and assigned to it the forearm planning group (two revolute joints and one fixed) 3. And I have generated the files. 3. I have followed [this tutorial](https://github.com/AS4SR/general_info/wiki/Basic-ROS-MoveIt!-and-Gazebo-Integration) to set the Gazebo part of the package. 4. Created the `controllers.yaml` 4. My `robotic_arm_moveit_config/launch/robotic_arm_moveit_controller_manager.launch.xml` already had some content which was almost the same to what the tutorial said to write into it, so I rewrite the one different name (ros_controllers.yaml to controllers.yaml) 4. uncommented the octomap_frame parameter in the `robotic_arm_moveit_config/launch/sensor_manager.launch.xml` file and set the frame to `map`. 4. Created a new `config/robotic_arm_control.yaml` and `launch/robotic_arm_control.launch` files in the [robot control package](https://github.com/kkumpa/ros-robotic-arm/tree/master/robotic_arm_control). When I run the gazebo simulation using `roslaunch robotic_arm_gazebo empty_world.launch` command and run the rviz using the `roslaunch robotic_arm_moveit_config moveit_planning_execution.launch` command, I can find the predefined positions in the planning manager in rviz and plan the movement from one to another, but when I click 'execute', the robotic arm in Gazebo doesn't move. Not even the arm inside Gazebo changes it's initial position. When I apply a force on some of the robot arm links in gazebo, the controller just keeps the pose in initial position. I have toyed with other people's robotic arm, there the behavior of the arm in gazebo was such, that without the rviz the robotic arm falls to the ground and when you open rviz, the pose of the robotic arm in the rviz corresponds to the pose in Gazebo. What am I missing? What is wrong in my package? ___ EDIT 1 I have change the joint interface to effort_controllers. Now when I apply a force to the robotic arm in the simulation, the robotic arm falls to the ground and the pose does transfer to the rviz, so there is this connection with the rviz. Rviz does know the pose of the robotic arm inside the Gazebo simulation and recognizes it as the current position of the arm. The inability to execute the planned path persists.

Viewing all articles
Browse latest Browse all 1441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>