Coder Social home page Coder Social logo

iiwa_stack_examples's Introduction

iiwa_stack_examples

Sample packages on how to extend iiwa_stack.

This packages are used within the wiki of iiwa_stack to explain some concepts of its usage.
iiwa_stack needs to be present on the system to make these packages work.

In brief, here is contained :

  • iiwa_tool: packages that show an example of how to add a tool to the KUKA LBR IIWA description.
  • two_iiwa : packages that show an example of how to work with two iiwas (in Gazebo).

iiwa_stack_examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

iiwa_stack_examples's Issues

rate defined as ms instead of frequency

Correct me if I'm wrong but I noticed the construction of rate objects in the example package always assumes its value in [ms] as is mentioned in the comments right behind it.
The rate class is actually expecting a frequency, not a sampling time, so the examples might give some surprising/dangerous behaviour when using those default values.

As expected the lower level code in the main iiwa_stack examples do assume frequencies so all good there.

"setting_control_mode" with current version of "development"

I am playing around with the control modes in the current state of development and I have not succeeded running a compliant setting_mode_control example.

The current state can be seen here.

Things I've noticed/changed are

  1. Apparently one doesn't initialize a robot anymore, but the services/topics one needs
  2. iiwa_ros::service::ControlModeService.isConnected() never gave me true, so I initialized a iiwa_ros::state::CartesianPose which worked (see code)
  3. When setting the new mode I got a Java error for some sorts of bound checks. java.lang.IllegalStateException: Load Mass Validation failed Whereas there were values for ~10 and ~13 (kg I guess?) on my iiwa7. I tried to avoid to load a tool when starting the code since I have just the flanch for now. Maybe that didn't work.
  4. Why is iiwa_ros::conversions::CartesianQuantityFromFloat upper case and the rest of them like jointQuantityFromFloat lower case?

Any ideas why it wouldn't work?

Errors from iiwa_stack_examples package when catkin_make

When I run catkin_make in my workspace after cloning the iiwa_stack_examples repo, I get a lot of errors coming from files setting_control_mode.cpp, command_robot.cpp and command_robot_moveit.cpp. See the error I am getting below. Is there any mismatch between variables or namespaces between iiwa_stack and iiwa_stack_examples?

``/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp: In function ‘int main(int, char**)’:
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:14:3: error: ‘iiwaRos’ is not a member of ‘iiwa_ros’
iiwa_ros::iiwaRos my_iiwa;
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:15:3: error: ‘my_iiwa’ was not declared in this scope
my_iiwa.init();
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:29:64: error: ‘cartesianQuantityFromDouble’ is not a member of ‘iiwa_ros’
my_iiwa.getSmartServoService().setCartesianImpedanceMode(iiwa_ros::cartesianQuantityFromDouble(1500,1500,350,300,300,300), iiwa_ros::cartesianQuantityFromDouble(0.7));
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:29:130: error: ‘cartesianQuantityFromDouble’ is not a member of ‘iiwa_ros’
my_iiwa.getSmartServoService().setCartesianImpedanceMode(iiwa_ros::cartesianQuantityFromDouble(1500,1500,350,300,300,300), iiwa_ros::cartesianQuantityFromDouble(0.7));
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:38:60: error: ‘jointQuantityFromDouble’ is not a member of ‘iiwa_ros’
my_iiwa.getSmartServoService().setJointImpedanceMode(iiwa_ros::jointQuantityFromDouble(1500,1500,1500,1500,1500,0,1500), iiwa_ros::jointQuantityFromDouble(0.7));
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:38:128: error: ‘jointQuantityFromDouble’ is not a member of ‘iiwa_ros’
my_iiwa.getSmartServoService().setJointImpedanceMode(iiwa_ros::jointQuantityFromDouble(1500,1500,1500,1500,1500,0,1500), iiwa_ros::jointQuantityFromDouble(0.7));
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot.cpp:7:31: error: variable or field ‘sleepForMotion’ declared void
void sleepForMotion(iiwa_ros::iiwaRos& iiwa, const double maxSleepTime) {
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot.cpp:7:21: error: ‘iiwaRos’ is not a member of ‘iiwa_ros’
void sleepForMotion(iiwa_ros::iiwaRos& iiwa, const double maxSleepTime) {
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot.cpp:7:40: error: ‘iiwa’ was not declared in this scope
void sleepForMotion(iiwa_ros::iiwaRos& iiwa, const double maxSleepTime) {
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot.cpp:7:46: error: expected primary-expression before ‘const’
void sleepForMotion(iiwa_ros::iiwaRos& iiwa, const double maxSleepTime) {
^
iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/setting_control_mode.dir/build.make:62: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/setting_control_mode.dir/src/setting_control_mode.cpp.o' failed
make[2]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/setting_control_mode.dir/src/setting_control_mode.cpp.o] Error 1
CMakeFiles/Makefile2:8644: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/setting_control_mode.dir/all' failed
make[1]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/setting_control_mode.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot.dir/build.make:62: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot.dir/src/command_robot.cpp.o' failed
make[2]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot.dir/src/command_robot.cpp.o] Error 1
CMakeFiles/Makefile2:8606: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot.dir/all' failed
make[1]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot.dir/all] Error 2
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot_moveit.cpp: In function ‘int main(int, char**)’:
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot_moveit.cpp:17:3: error: ‘iiwaRos’ is not a member of ‘iiwa_ros’
iiwa_ros::iiwaRos my_iiwa;
^
/home/dkilanga/catkin_ws/src/iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot_moveit.cpp:18:3: error: ‘my_iiwa’ was not declared in this scope
my_iiwa.init();
^
iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot_moveit.dir/build.make:62: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot_moveit.dir/src/command_robot_moveit.cpp.o' failed
make[2]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot_moveit.dir/src/command_robot_moveit.cpp.o] Error 1
CMakeFiles/Makefile2:8938: recipe for target 'iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot_moveit.dir/all' failed
make[1]: *** [iiwa_stack/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/CMakeFiles/command_robot_moveit.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed`

Out of dated?

Thank you for your iiwa_stack, it could be really helpful for me. But It seems that this repo is out of dated, cause it use iiwa_msgs::SmartServoMode, iiwa_msgs::ConfigureSmartServo, etc, which cannot be found in the latest master branch of iiwa_stack.

So is there are any examples of the latest version of iiwa_stack ?

Thank you very much.

Adding new tool

Hi, I come here by following the wiki on iiwa_stack repo. I saw that there is a definition of a simple tool. I want to create mine with a prismatic joint but this error appears:

The complete state of the robot is not yet known.

How can I solve?
Thank you

iiwa_ros.h: No such file or directory

I have the following error with the package iiwa_tool_examples when I do "catkin build" I receive the following error:

Errors << iiwa_tool_examples:make /home/karam/ros/iiwa_stack_ws/logs/iiwa_tool_examples/build.make.000.log
/home/karam/ros/iiwa_stack_ws/src/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot.cpp:1:10: fatal error: iiwa_ros.h: No such file or directory
#include <iiwa_ros.h>
^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/command_robot.dir/src/command_robot.cpp.o] Error 1
make[1]: *** [CMakeFiles/command_robot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/karam/ros/iiwa_stack_ws/src/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/setting_control_mode.cpp:1:10: fatal error: iiwa_ros.h: No such file or directory
#include <iiwa_ros.h>
^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/setting_control_mode.dir/src/setting_control_mode.cpp.o] Error 1
make[1]: *** [CMakeFiles/setting_control_mode.dir/all] Error 2
/home/karam/ros/iiwa_stack_ws/src/iiwa_stack_examples/iiwa_tool/iiwa_tool_examples/src/command_robot_moveit.cpp:2:10: fatal error: iiwa_ros.h: No such file or directory
#include <iiwa_ros.h>

where is the robotConnected flag set?

Where is the isRobotConnected Boolean supposed to be set to true?

I can't find any mention of it on the ros or jave side, only the the iiwa_stack/iiwa_ros.cpp has a commented out method that looks related.

It never seems to be set high, although in most cases do receive messages from the iiwa if I manually set it to true.

RRTConnect problem with iiwa_tool_command_moveit.launch

Hi,

I have some issues using the iiwa_tool_command_moveit.launch:

I copied the code, build it and so on.

The robot connects without a problem, rviz starts (and I can move it with rviz), but apart from that it is not moving.

I added some printfs to command_robot_moveit.cpp to check if it really is used and the print outs are shown on the console.

The console output (apart from the the self-made print outs) looks like this:

[ INFO] [1492452669.679801043]: TrajectoryExecution will use old service capability.
[ INFO] [1492452669.679925640]: Ready to take MoveGroup commands for group manipulator.
[ INFO] [1492452669.681272319]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[ INFO] [1492452669.683383412]: No optimization objective specified, defaulting to PathLengthOptimizationObjective
[ INFO] [1492452669.683511710]: Planner configuration 'manipulator[RRTConnectkConfigDefault]' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1492452669.684247069]: manipulator[RRTConnectkConfigDefault]: Starting planning with 1 states already in datastructure
[ERROR] [1492452670.187395060]: manipulator[RRTConnectkConfigDefault]: Unable to sample any valid states for goal tree
[ INFO] [1492452670.187434241]: manipulator[RRTConnectkConfigDefault]: Created 1 states (1 start + 0 goal)
[ INFO] [1492452670.187455892]: No solution found after 0.503424 seconds
[ INFO] [1492452670.207438112]: Unable to solve the planning problem
[ WARN] [1492452670.207727045]: Fail: ABORTED: No motion plan found. No execution attempted.
[ INFO] [1492452671.295119723]: Loading robot model 'iiwa7_tool'...
[ INFO] [1492452671.295187819]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ INFO] [1492452671.443492083]: Loading robot model 'iiwa7_tool'...
[ INFO] [1492452671.443533010]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ INFO] [1492452671.813359788]: Starting scene monitor
[ INFO] [1492452671.816146036]: Listening to '/iiwa/move_group/monitored_planning_scene'
[ INFO] [1492452672.288447367]: No active joints or end effectors found for group ''. Make sure you have defined an end effector in your SRDF file and that kinematics.yaml is loaded in this node's namespace.
[ INFO] [1492452672.291745622]: Constructing new MoveGroup connection for group 'manipulator' in namespace ''
[ INFO] [1492452673.060466072]: TrajectoryExecution will use old service capability.
[ INFO] [1492452673.060582288]: Ready to take MoveGroup commands for group manipulator.
[ INFO] [1492452673.060664281]: Looking around: no
[ INFO] [1492452673.060781894]: Replanning: no

and then it goes on and on like this

it would be great if you could suggest anything

Robot is not connected

Hi,

I'm trying to run a simplified version of this code (not sleeping for motion, only cartesian control).

However, when I run the ROSSmartServo application on my SmartPad and rosrun the executable, I just get the warning that the robot is not connected, even though it is still publishing to other topics like the JointState, JointTorques, etc.

Any idea what I could be doing wrong?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.