Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • kit/aifb/BIS/kit-bis/robotik/ros-learning-platform/learn-environment-franka-emika-panda
1 result
Select Git revision
Show changes
Commits on Source (2)
......@@ -5,7 +5,7 @@ The Learn Environment for the Franka Panda Robot is a tutorial on how to program
![Plugin with VS Code](./developer_docs/images/plugin_with_vs_code.png)
### Install the Plugin:
If you only want to use the plugin, the **easiest option** is to use a **devcontainer** or **Docker setup** from [this](TODO:ADD_LINK) repository.
If you only want to use the plugin, the **easiest option** is to use a **devcontainer** or **Docker setup** from [this](https://gitlab.kit.edu/kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/containerized-setup-learn-environment-franka-emika-panda) repository. There you can find a detailed setup instruction.
Alternatively without Docker, you can implement this repository as a submodule in your catkin workspace or copy the entire plugin into your catkin workspace.
......
......@@ -9,7 +9,7 @@ roscpp_initialize(sys.argv)
rospy.init_node('move_it_basics_1_eval', anonymous=True)
group = MoveGroupCommander("panda_arm")
group.set_planner_id("RRTConnectkConfigDefault")
group.set_planner_id("RRTConnect")
group.set_num_planning_attempts(10)
current_joint_values = group.get_current_joint_values()
......
%% Cell type:markdown id: tags:
# Educational Plattform Panda Robot
Author: uninh, uqwfa, ultck
%% Cell type:markdown id: tags:
## MoveIt Basics
### Task 1
---
> In this task, you will learn ...
>
> - ... what MoveIt is.
> - ... how to use it.
---
%% Cell type:markdown id: tags:
After mastering the direct method of rotating the Panda robot’s joints using ``ROS``, it’s time to explore an easier approach. For this, we’ll use the ``MoveIt`` package. The ``MoveIt Commander`` Python package provides a straightforward interface for motion planning and Cartesian path computation. MoveIt, as a whole, is a robust framework for motion planning and robot manipulation.
%% Cell type:markdown id: tags:
First, we need to import the required modules. We still use ``rospy`` to initialize a``ROS node``. What’s new here are ``MoveGroupCommander``, ``roscpp_initialize``, and ``roscpp_shutdown`` from the ``MoveIt Commander`` package. As the names suggest, ``roscpp_initialize`` is used to initialize, and ``roscpp_shutdown`` to shut down the ``MoveIt Commander`` within the ``ROS system``. The ``MoveGroupCommander``, on the other hand, acts as the core interface for commanding robot motion planning.
%% Cell type:code id: tags:
```
##### DO NOT CHANGE #####
import rospy
import math
import sys
from moveit_commander import MoveGroupCommander, roscpp_initialize, roscpp_shutdown
##### DO NOT CHANGE #####
```
%% Cell type:markdown id: tags:
The next step would be initialize roscpp and initialize a ``ROS node``.
%% Cell type:code id: tags:
```
##### DO NOT CHANGE #####
roscpp_initialize(sys.argv)
rospy.init_node('commander', anonymous=True)
##### DO NOT CHANGE #####
```
%% Cell type:markdown id: tags:
Next, we create a ``MoveGroupCommander`` instance. We configure it to use the planning algorithm ``'RRTConnectkConfigDefault'`` and set the number of planning attempts to 10 for better motion planning results.
%% Cell type:code id: tags:
```
##### DO NOT CHANGE #####
group = MoveGroupCommander("panda_arm")
group.set_planner_id("RRTConnectkConfigDefault")
group.set_planner_id("RRTConnect")
group.set_num_planning_attempts(10)
##### DO NOT CHANGE #####
```
%% Cell type:markdown id: tags:
Now we can adjust the joint values. To do this, use the ``get_current_joint_values()`` method of the ``MoveGroupCommander`` to retrieve the current joint values, then modify the specific axes you want.
ToDo:
- add 50 degrees to the joint4 and store the changed values in the ``joint_goal`` variable
%% Cell type:code id: tags:
```
joint_goal = None
##### YOUR CODE HERE #####
joint_goal = group.get_current_joint_values()
joint_goal[4] += (50 * math.pi) / 180
##### YOUR CODE HERE #####
```
%% Cell type:markdown id: tags:
We can now set our ``joint_goal`` as the target joint values for the ``MoveGroupCommander`` by using the ``set_joint_value_target()`` method. Once the target is set, execute the movement with the ``go(wait=True)`` method.
%% Cell type:code id: tags:
```
##### YOUR CODE HERE #####
group.set_joint_value_target(joint_goal)
group.go(wait=True)
##### YOUR CODE HERE #####
```
%% Cell type:markdown id: tags:
As always, we clean up by deleting the node and shutting down the MoveIt Commander.
%% Cell type:code id: tags:
```
##### DO NOT CHANGE #####
rospy.signal_shutdown("Task completed")
roscpp_shutdown()
##### DO NOT CHANGE #####
```
......
# Welcome to the Tutorial
**Before you start:** We recommend reading the [theoretical introduction](theoretical_introduction.md) first.
**Before you start:** We recommend reading the [theoretical introduction](documentation/theoretical_introduction.md) first.
**After that:** Follow these steps to start with the tasks:
......@@ -16,7 +16,8 @@
3. **Open RViz**
- **Coder / Devcontainer setups:** Open [localhost:6080](http://localhost:6080/) in your browser and click `connect`. In the top bar, you should be able to select RViz, the plugin should show up there immediately.
- **Local setups without Devcontainer:** When executing the command above, RViz should automatically show up and display the plugin immediately. If you are on Windows or MacOS, make sure to make your display available to Docker with tools like `XLaunch` (Windows) or `XQuartz` (MacOS).
- <img src="./../developer_docs/images/plugin.png" alt="plugin" width="600"/>
<img src="./documentation/images/plugin.png" alt="plugin" width="600"/>
4. **Begin with the Tasks**
- After running the command, the task files for the **tutorial will be copied into this folder**.
......@@ -27,6 +28,9 @@
Familiarize yourself with RViz and start working on the tasks at your own pace!
## Next Steps After the Tutorial
Once you have completed the tutorial, you can begin working on your own projects. Refer to [this guide](./documentation/after_the_tutorial.md) for instructions on how to control the robot with your own scripts without using the tutorial plugin.
## FAQ:
<details>
......
# TODO!
\ No newline at end of file