# kuka-lwr-ros
[![Build Status](https://travis-ci.com/epfl-lasa/kuka-lwr-ros.svg?token=d6T2YmvspfmdmqrMCGYv&branch=master)](https://travis-ci.com/epfl-lasa/kuka-lwr-ros/branches)
A ROS package to control the KUKA LWR 4 (both simulation and physical robot). **This was originally forked from** [CentroEPiaggio/kuka-lwr](https://github.com/CentroEPiaggio/kuka-lwr).
# Installation
Do the following steps:
* In your catkin src directory clone the repository
```
$ git clone https://github.com/epfl-lasa/kuka-lwr-ros.git
```
* wstool gets all other git repository dependencies, after the following steps you should see extra catkin
packages in your src directory.
```
$ wstool init
$ wstool merge kuka-lwr-ros/dependencies.rosinstall
$ wstool up
```
* Query and installs all libraries and packages
```
$ rosdep install --from-paths . --ignore-src --rosdistro indigo
```
* Install [**Gazebo**](http://gazebosim.org/), follow this [**link**](http://gazebosim.org/tutorials?tut=install_ubuntu&) for
instructions on how to install it on ubuntu. Make sure that the ros libraries of Gazebo are also installed:
```
$ sudo apt-get install ros-indigo-gazeboX-*
```
Alternatively try:
```
$ sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control
$ sudo apt-get install ros-indigo-ros-control ros-indigo-ros-controllers
```
#### Software Version Combinations
- ROS-Indigo + Gazebo2 (If you are having troubles starting-up the simulation, you need to install Gazebo7)
- ROS-Kinetic + Gazebo7
* Install [**move_it_library**](https://moveit.ros.org/)
```
sudo apt-get install ros-indigo-moveit
```
If not yet installed, <ncurses> c++ library is needed:
```
sudo apt-get install libncurses5-dev libncursesw5-dev
```
# Description
Set of packages for simulating and controlling the KUKA Light Weight Robot (LWR).
* [**kuka_lwr**](https://github.com/epfl-lasa/kuka-lwr-ros/tree/master/kuka_lwr) contains URDF robot description, hardware interface, controllers with configuration files.
* [**lwr_ros_client**](https://github.com/epfl-lasa/kuka-lwr-ros/tree/master/lwr_ros_client) basic implemenation of action handling such that it is easy to call different types of policies.
* [**robot_motion_generation**](https://github.com/epfl-lasa/kuka-lwr-ros/tree/master/robot_motion_generation) utilities such as filters for smoothing robot motion.
* [**kuka-lwr-ros-examples**](https://github.com/epfl-lasa/kuka-lwr-ros-examples) set of examples.
# Quick Start (Simulation)
Download the [**kuka-lwr-ros-examples**](https://github.com/epfl-lasa/kuka-lwr-ros-examples) into your catkin_ws and
after compling them are ready to run the lwr_simple_example.
Open a new terminal and run the following:
```sh
$ roslaunch lwr_simple_example sim.launch
```
This will run the simulator and the Gazebo simulator and ROS Rviz visualiser GUIs should both open. If the Gazebo
window does not open this is because a flag is set in the sim.launch file. In the
caption below Rviz is on the left and Gazebo is on the right.
![alt text](readme/gazebo_rviz.png "Gazebo and Rviz GUIs")
Now that the simulations are up and running we are ready to control the robot.
In on terminal run the following:
```sh
$ roslaunch lwr_simple_example client.launch
```
and in another:
```sh
$ roslaunch lwr_simple_example console.launch
```
You should have the following triptych view in your console
![alt text](readme/console.png "Triptych console view")
Notice on the bottom right console the heading is "KUKA PLANNING INTERFACE" and a prompt **Cmd>**. This is
the main interface from which you will be starting and stopping policies to be run on the robot. If you
press tab (in this console window) a list of possible actions (robot policies) will be displayed, which in the
simple example case are; **go_front**, **go_home**,
**go_left**, **grav_comp** and **linear** (note that grav_comp only works on the real physical robot).
# Quick start (real robot)
You first have to make sure that your network configurations are set correctly and you can ping the robot.
If you are unsure about this, take a look at [**Network setup**](https://github.com/epfl-lasa/kuka-lwr-ros/wiki/Network-setup)
Once the robot is turned on and you have loaded your script open the FRI such that in the KUKA interface
you see the following message: **FRI-Ctrl FRI successfully opened**.
In a terminal run the following:
```sh
$ roslaunch lwr_simple_example real.launch
```
You should see an Rviz window with the Robot displayed in the correct configuration.
![alt text](readme/real_rviz.png "real rviz view")
Now in another terminal run:
```sh
$ roslaunch lwr_fri lwr_fri_console.launch
```
In the terminal you should see the following:
![alt text](readme/fri_console.png "fri console")
Here you can see all the different state information of the robot. You can notice that
the FRI State is in MONITOR mode which means that you cannot control the robot for the moment.
Next go to this console and press tab. You will see that a **control** cmd is avaiable.
Now we are going to change the FRI State to COMMAND which will allow use to run the simple
example (see quick start simulation).
In the terminal type the follwoing:
```sh
FRI> control
```
In the terminal where you run real.lauch you will see the lign: **Waiting for script...**. This statement means
that you have to press the green button on the KUKA interface panel until you hear a click originating from the robot.
![alt text](readme/command_mode.png "fri in command mode")
Once this is down you will see in the FRI terminal that the FRI State is now in COMMAND mode and that the
Drives are in state GO.
To send actions to the robot proceed as in Quick start (**simulation**). Essentially open two new terminals and launch
the simple client and server nodes.
### FAQ
If the real-time control interface is not working, you might need to provide your user name with real time priority and memlock limits higher than the default ones. You can do it permanently like this:
1. ```sudo nano /etc/security/limits.conf``` and add these lines:
```
YOUR_USERNAME hard rtprio 95
YOUR_USERNAME soft rtprio 95
YOUR_USERNAME hard memlock unlimited
YOUR_USERNAME soft memlock unlimited
```
2. ```sudo nano /etc/pam.d/common-session``` and add ```session required pam_limits.so```
3. Reboot, open a terminal, and check that ```ulimit -r -l``` gives you the values set above.
没有合适的资源?快使用搜索试试~ 我知道了~
ROSKUKA机器人控制(仿真&实物)_C++_CMake_下载.zip
共244个文件
h:48个
cpp:41个
stl:28个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 40 浏览量
2023-04-08
18:01:52
上传
评论
收藏 13.14MB ZIP 举报
温馨提示
ROSKUKA机器人控制(仿真&实物)_C++_CMake_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
ROSKUKA机器人控制(仿真&实物)_C++_CMake_下载.zip (244个子文件)
passive_ds_param.cfg 816B
stiffness_param.cfg 795B
damping_param.cfg 778B
PID.cfg 341B
stiffness_param_all.cfg 300B
damping_param_all.cfg 277B
COPYRIGHT 477B
COPYRIGHT 477B
lwr_hw.cpp 20KB
Console.cpp 17KB
joint_controllers.cpp 16KB
joint_kinematics_imp.cpp 12KB
one_task_inverse_kinematics.cpp 12KB
kuka_joint_state_controller.cpp 10KB
Various.cpp 9KB
passive_ds.cpp 9KB
lwr_fri_console.cpp 8KB
LWRRobot_FRI.cpp 8KB
lwr_hw_gazebo_plugin.cpp 7KB
joint_position_impedance_controller.cpp 6KB
NCConsole.cpp 6KB
joint_impedance_controller.cpp 5KB
CDDynamics.cpp 4KB
lwr_fri_node.cpp 4KB
lwr_hw_fril_node.cpp 3KB
cartesian_position.cpp 3KB
lwr_fri_interface.cpp 3KB
ff_fb_cartesian.cpp 3KB
action_client_cmd_interface.cpp 3KB
change_ctrl_mode.cpp 3KB
cartesian_velocity.cpp 3KB
ros_ee_j.cpp 3KB
joint_action.cpp 3KB
kuka_action_console.cpp 2KB
joint_position_ac.cpp 2KB
gravity_compensation.cpp 2KB
kuka_action_client.cpp 2KB
joint_position.cpp 2KB
ros_joint.cpp 2KB
base_ee_action.cpp 2KB
speed_safety.cpp 2KB
ConsoleInterface.cpp 2KB
ros_passive_ds.cpp 1KB
contact_safety.cpp 1KB
default_topics.cpp 1004B
ros_param_parser.cpp 971B
safety.cpp 845B
speed_generator.cpp 720B
lwr_fri_console_node.cpp 502B
link_1.dae 633KB
arm_base_v2.dae 345KB
base.dae 324KB
arm_base.dae 324KB
link_5.dae 253KB
link_4.dae 243KB
link_2.dae 242KB
link_3.dae 235KB
arm_segment_a.dae 176KB
arm_segment_a.dae 176KB
arm_segment_b.dae 176KB
arm_segment_b.dae 176KB
prt0379.dae 147KB
link_6.dae 138KB
arm_wrist.dae 127KB
arm_wrist.dae 127KB
arm_segment_last.dae 118KB
arm_segment_last.dae 118KB
link_7.dae 72KB
arm_base.dae 65KB
arm_flanche.dae 21KB
arm_flanche_angle.dae 13KB
.gitignore 505B
.gitignore 9B
KinematicChainControllerBase.h 7KB
lwr_hw.h 7KB
joint_controllers.h 6KB
switch_controller.h 5KB
lwr_kuka_interface.h 5KB
Console.h 4KB
one_task_inverse_kinematics.h 4KB
utilities.h 4KB
joint_kinematics_imp.h 4KB
passive_ds.h 3KB
ros_ee_j.h 3KB
Various.h 2KB
lwr_fri_console.h 2KB
kuka_joint_state_controller.h 2KB
kuka_action_client.h 2KB
cartesian_velocity.h 2KB
ros_ee.h 2KB
ConsoleInterface.h 2KB
kuka_action_console.h 2KB
LWRRobot_FRI.h 2KB
action_client_cmd_interface.h 2KB
NCConsole.h 1KB
joint_position_impedance_controller.h 1KB
ros_passive_ds.h 1KB
ros_joint.h 1KB
cartesian_position.h 1KB
CDDynamics.h 1KB
共 244 条
- 1
- 2
- 3
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功