Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melodic support #219

Merged
merged 7 commits into from
Aug 12, 2019
Merged

Melodic support #219

merged 7 commits into from
Aug 12, 2019

Conversation

christian-rauch
Copy link
Contributor

This PR contains changes to support ROS melodic. It is based on #150.

Changes:

  • use types urdf::LinkConstSharedPtr and urdf::JointSharedPtr as replacement fopr boost pointers
  • replace move_group by move_group_interface

@sahandrez
Copy link

This works perfectly. Thanks!

@christian-rauch
Copy link
Contributor Author

Is there interest in merging this? @nsaif-kinova @alexvannobel

This PR includes changes from PR #150 (@xbbsky) and should fix the issue mentioned in #124 (@pholthau). Can you check if this PR solves your issues?

@christian-rauch
Copy link
Contributor Author

christian-rauch commented Apr 14, 2019

I integrated changes from PR #221 to avoid warning Skipping virtual joint 'world_joint' because its child frame 'root' does not match the URDF frame 'world'.

@christian-rauch
Copy link
Contributor Author

The driver and MoveIt! have been tested successfully with ROS melodic on a real Jaco j2n6s300.

@alexvannobel
Copy link
Contributor

Hi @christian-rauch !

First of all, thanks a lot for the contribution!
What we will probably end up doing is branch off the actual version of master to keep the Indigo and Kinetic versions in their own branches, then we will test on our side that everything works on Melodic soon and we will keep you updated.
When the appropriate Indigo and Kinetic branches will be created, then we will be able to merge your Melodic contribution into the master branch.

Cheers,
Alex

@christian-rauch
Copy link
Contributor Author

christian-rauch commented Apr 23, 2019

Some changes are simply implementing the proposed hints for deprecation warnings, i.e. those might already work on the kinetic branch. Other breaking changes could be guarded by version macros to make it work with kinetic and melodic.

Edit: I am able to compile this branch on ROS kinetic. I would first try to run this on ROS kinetic and melodic before branching off. Indigo goes EOL this month - I wouldn't spend too much effort on supporting this version.

@alexvannobel
Copy link
Contributor

Hi @christian-rauch ,

I just tested your branch on a j2n6s300 on ROS Kinetic.
The good news:

  • It builds fine with no deprecation warning.
  • The driver with a real arm works fine.
  • The MoveIt! works fine and demos are allright.

The bad news:

  • The Gazebo launch file starts a flying robot that quickly flies off in the Gazebo world.

I start Gazebo with the line
roslaunch kinova_gazebo robot_launch.launch

Can you check if the simulated robot acts normal in Melodic? If so, it may only be a Kinetic problem. I am aware of gravity bugs that were introduced in Gazebo 7, but it could also be a PID tuning problem.
Also, I noticed the robot base was not attached to the Gazebo world frame (before #221 it was attached by a dummy link).

Thanks a lot,
Cheers,
Alex

@christian-rauch
Copy link
Contributor Author

The robot is affected by gravity and other forces.
The standalone configuration of the Jaco needs to set <static>true</static> to keep the root static with respect to the world.

@christian-rauch
Copy link
Contributor Author

I added the static tag to the gazebo configuration.
Because of https://bitbucket.org/osrf/sdformat/issues/197/hard-to-set-urdf-model-to-static-with, this needs to be done on the sole gazebo in the main configuration.
Once this issue is solved, the static tag should be moved to the standalone configurations.

Does roslaunch kinova_gazebo robot_launch.launch now provide the expected behaviour?

@alexvannobel
Copy link
Contributor

Hi,
The robot does not start flying anymore, but it stays in place and the move_robot.py script (called from kinova_control.launch) does not home the robot as it should.
The command window shows errors in the joint trajectory controller (line 569):

avannobel@SW-AVANNOBE-LPU:~/ros/kinova-ros-melodic$ roslaunch kinova_gazebo robot_launch.launch
... logging to /home/avannobel/.ros/log/39f8f892-6691-11e9-91a4-14abc531faa6/roslaunch-SW-AVANNOBE-LPU-25676.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://SW-AVANNOBE-LPU:45189/

SUMMARY
========

PARAMETERS
 * /j2n6s300/effort_finger_trajectory_controller/constraints/goal_time: 1.0
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_1/goal: 0.02
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_1/trajectory: 0.05
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_2/goal: 0.02
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_2/trajectory: 0.05
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_3/goal: 0.02
 * /j2n6s300/effort_finger_trajectory_controller/constraints/j2n6s300_joint_finger_3/trajectory: 0.05
 * /j2n6s300/effort_finger_trajectory_controller/constraints/stopped_velocity_tolerance: 0.02
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_1/d: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_1/i: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_1/i_clamp: 1
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_1/p: 10
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_2/d: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_2/i: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_2/i_clamp: 1
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_2/p: 10
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_3/d: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_3/i: 0
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_3/i_clamp: 1
 * /j2n6s300/effort_finger_trajectory_controller/gains/j2n6s300_joint_finger_3/p: 10
 * /j2n6s300/effort_finger_trajectory_controller/joints: ['j2n6s300_joint_...
 * /j2n6s300/effort_finger_trajectory_controller/type: effort_controller...
 * /j2n6s300/effort_joint_trajectory_controller/constraints/goal_time: 1.0
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_1/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_1/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_2/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_2/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_3/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_3/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_4/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_4/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_5/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_5/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_6/goal: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/constraints/j2n6s300_joint_6/trajectory: 0.05
 * /j2n6s300/effort_joint_trajectory_controller/constraints/stopped_velocity_tolerance: 0.02
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_1/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_1/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_1/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_1/p: 5000
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_2/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_2/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_2/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_2/p: 5000
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_3/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_3/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_3/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_3/p: 5000
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_4/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_4/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_4/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_4/p: 500
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_5/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_5/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_5/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_5/p: 200
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_6/d: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_6/i: 0
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_6/i_clamp: 10
 * /j2n6s300/effort_joint_trajectory_controller/gains/j2n6s300_joint_6/p: 500
 * /j2n6s300/effort_joint_trajectory_controller/joints: ['j2n6s300_joint_...
 * /j2n6s300/effort_joint_trajectory_controller/type: effort_controller...
 * /j2n6s300/finger_1_position_controller/joint: j2n6s300_joint_fi...
 * /j2n6s300/finger_1_position_controller/pid/d: 0
 * /j2n6s300/finger_1_position_controller/pid/i: 0
 * /j2n6s300/finger_1_position_controller/pid/p: 10
 * /j2n6s300/finger_1_position_controller/type: effort_controller...
 * /j2n6s300/finger_2_position_controller/joint: j2n6s300_joint_fi...
 * /j2n6s300/finger_2_position_controller/pid/d: 0
 * /j2n6s300/finger_2_position_controller/pid/i: 0
 * /j2n6s300/finger_2_position_controller/pid/p: 10
 * /j2n6s300/finger_2_position_controller/type: effort_controller...
 * /j2n6s300/finger_3_position_controller/joint: j2n6s300_joint_fi...
 * /j2n6s300/finger_3_position_controller/pid/d: 0
 * /j2n6s300/finger_3_position_controller/pid/i: 0
 * /j2n6s300/finger_3_position_controller/pid/p: 10
 * /j2n6s300/finger_3_position_controller/type: effort_controller...
 * /j2n6s300/joint_1_position_controller/joint: j2n6s300_joint_1
 * /j2n6s300/joint_1_position_controller/pid/d: 0
 * /j2n6s300/joint_1_position_controller/pid/i: 0
 * /j2n6s300/joint_1_position_controller/pid/p: 5000
 * /j2n6s300/joint_1_position_controller/type: effort_controller...
 * /j2n6s300/joint_2_position_controller/joint: j2n6s300_joint_2
 * /j2n6s300/joint_2_position_controller/pid/d: 0
 * /j2n6s300/joint_2_position_controller/pid/i: 0
 * /j2n6s300/joint_2_position_controller/pid/p: 5000
 * /j2n6s300/joint_2_position_controller/type: effort_controller...
 * /j2n6s300/joint_3_position_controller/joint: j2n6s300_joint_3
 * /j2n6s300/joint_3_position_controller/pid/d: 0
 * /j2n6s300/joint_3_position_controller/pid/i: 0
 * /j2n6s300/joint_3_position_controller/pid/p: 5000
 * /j2n6s300/joint_3_position_controller/type: effort_controller...
 * /j2n6s300/joint_4_position_controller/joint: j2n6s300_joint_4
 * /j2n6s300/joint_4_position_controller/pid/d: 0
 * /j2n6s300/joint_4_position_controller/pid/i: 0
 * /j2n6s300/joint_4_position_controller/pid/p: 500
 * /j2n6s300/joint_4_position_controller/type: effort_controller...
 * /j2n6s300/joint_5_position_controller/joint: j2n6s300_joint_5
 * /j2n6s300/joint_5_position_controller/pid/d: 0
 * /j2n6s300/joint_5_position_controller/pid/i: 0
 * /j2n6s300/joint_5_position_controller/pid/p: 200
 * /j2n6s300/joint_5_position_controller/type: effort_controller...
 * /j2n6s300/joint_6_position_controller/joint: j2n6s300_joint_6
 * /j2n6s300/joint_6_position_controller/pid/d: 0
 * /j2n6s300/joint_6_position_controller/pid/i: 0
 * /j2n6s300/joint_6_position_controller/pid/p: 500
 * /j2n6s300/joint_6_position_controller/type: effort_controller...
 * /j2n6s300/joint_state_controller/publish_rate: 50
 * /j2n6s300/joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /j2n6s300/
    j2n6s300_trajectory_controller (controller_manager/spawner)
  /
    command_robot_home_pose (kinova_control/move_robot.py)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rviz (rviz/rviz)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [25691]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 39f8f892-6691-11e9-91a4-14abc531faa6
process[rosout-1]: started with pid [25704]
started core service [/rosout]
process[gazebo-2]: started with pid [25728]
process[gazebo_gui-3]: started with pid [25733]
process[urdf_spawner-4]: started with pid [25738]
process[j2n6s300/j2n6s300_trajectory_controller-5]: started with pid [25739]
process[robot_state_publisher-6]: started with pid [25740]
process[command_robot_home_pose-7]: started with pid [25741]
process[rviz-8]: started with pid [25743]
[INFO] [1556110956.092859, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1556110956.276148465]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1556110956.295237976]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1556110956.310072263]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1556110956.311194163]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
0x17e1470 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xdc8d40) ): Attempt to set a screen on a child window.
0x17da8b0 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xdc8d40) ): Attempt to set a screen on a child window.
0x17d9980 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xdc8d40) ): Attempt to set a screen on a child window.
0x17e2630 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xdc8d40) ): Attempt to set a screen on a child window.
[INFO] [1556110956.545891, 0.000000]: Loading model XML from ros parameter
[INFO] [1556110956.554987, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1556110956.972112135, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1556110957.143029687, 0.184000000]: Physics dynamic reconfigure ready.
[ INFO] [1556110957.165724314, 0.203000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[INFO] [1556110957.181950, 0.216000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1556110957.405414, 0.332000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1556110957.430379637, 0.332000000]: Physics dynamic reconfigure ready.
[urdf_spawner-4] process has finished cleanly
log file: /home/avannobel/.ros/log/39f8f892-6691-11e9-91a4-14abc531faa6/urdf_spawner-4*.log
[ INFO] [1556110957.968005201, 0.332000000]: Loading gazebo_ros_control plugin
[ INFO] [1556110957.968192861, 0.332000000]: Starting gazebo_ros_control plugin in namespace: j2n6s300
[ INFO] [1556110957.970771214, 0.332000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server.
[ INFO] [1556110958.096458035, 0.332000000]: Loaded gazebo_ros_control.
[INFO] [1556110958.235390, 0.473000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1556110958.237671, 0.475000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1556110958.239411, 0.477000]: Loading controller: effort_joint_trajectory_controller
[INFO] [1556110958.698700, 0.930000]: Loading controller: effort_finger_trajectory_controller
[INFO] [1556110958.965137, 1.199000]: Loading controller: joint_state_controller
[INFO] [1556110958.974710, 1.209000]: Controller Spawner: Loaded controllers: effort_joint_trajectory_controller, effort_finger_trajectory_controller, joint_state_controller
[INFO] [1556110958.979903, 1.214000]: Started controllers: effort_joint_trajectory_controller, effort_finger_trajectory_controller, joint_state_controller
[ERROR] [1556110959.046109578, 1.280000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.056191756, 1.291000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.066259956, 1.301000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.077299271, 1.311000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.086285668, 1.321000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.098470258, 1.332000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.106341723, 1.340000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.117567151, 1.351000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.126806333, 1.360000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.136761933, 1.371000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.147157489, 1.381000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.157277993, 1.391000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.166513743, 1.401000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.178873437, 1.412000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.187134752, 1.421000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.196286314, 1.430000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.206768639, 1.441000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.217665513, 1.451000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.227642256, 1.461000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.236959595, 1.470000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.248240174, 1.480000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.258651325, 1.491000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.270098591, 1.502000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[ERROR] [1556110959.279371109, 1.511000000]: Unexpected exception caught when initializing trajectory from ROS message data.
[command_robot_home_pose-7] process has finished cleanly
log file: /home/avannobel/.ros/log/39f8f892-6691-11e9-91a4-14abc531faa6/command_robot_home_pose-7*.log

In Gazebo, the robot does not move and is not in a possible configuration :
gaz

In RViz, the robot does not show :
rviz

The log for the command_robot_home_pose node does not tell much :

[rospy.client][INFO] 2019-04-24 09:02:36,016: init_node, name[/command_robot_home_pose], pid[25741]
[xmlrpc][INFO] 2019-04-24 09:02:36,017: XML-RPC server binding to 0.0.0.0:0
[rospy.init][INFO] 2019-04-24 09:02:36,017: ROS Slave URI: [http://SW-AVANNOBE-LPU:37529/]
[xmlrpc][INFO] 2019-04-24 09:02:36,017: Started XML-RPC server [http://SW-AVANNOBE-LPU:37529/]
[rospy.impl.masterslave][INFO] 2019-04-24 09:02:36,017: _ready: http://SW-AVANNOBE-LPU:37529/
[xmlrpc][INFO] 2019-04-24 09:02:36,019: xml rpc node: starting XML-RPC server
[rospy.registration][INFO] 2019-04-24 09:02:36,022: Registering with master node http://localhost:11311
[rospy.init][INFO] 2019-04-24 09:02:36,117: registered with master
[rospy.rosout][INFO] 2019-04-24 09:02:36,118: initializing /rosout core topic
[rospy.rosout][INFO] 2019-04-24 09:02:36,121: connected to core topic /rosout
[rospy.simtime][INFO] 2019-04-24 09:02:36,128: initializing /clock core topic
[rospy.simtime][INFO] 2019-04-24 09:02:36,136: connected to core topic /clock
[rospy.internal][INFO] 2019-04-24 09:02:36,424: topic[/rosout] adding connection to [/rosout], count 0
[rospy.internal][INFO] 2019-04-24 09:02:36,950: topic[/clock] adding connection to [http://SW-AVANNOBE-LPU:43601/], count 0
[rospy.internal][INFO] 2019-04-24 09:02:39,038: topic[/j2n6s300/effort_joint_trajectory_controller/command] adding connection to [/gazebo], count 0
[rospy.internal][INFO] 2019-04-24 09:02:39,540: topic[/j2n6s300/effort_finger_trajectory_controller/command] adding connection to [/gazebo], count 0
[rospy.core][INFO] 2019-04-24 09:02:44,346: signal_shutdown [atexit]
[rospy.internal][INFO] 2019-04-24 09:02:44,355: topic[/j2n6s300/effort_joint_trajectory_controller/command] removing connection to /gazebo
[rospy.internal][INFO] 2019-04-24 09:02:44,356: topic[/rosout] removing connection to /rosout
[rospy.internal][INFO] 2019-04-24 09:02:44,356: topic[/j2n6s300/effort_finger_trajectory_controller/command] removing connection to /gazebo
[rospy.internal][INFO] 2019-04-24 09:02:44,356: topic[/clock] removing connection to http://SW-AVANNOBE-LPU:43601/
[rospy.impl.masterslave][INFO] 2019-04-24 09:02:44,356: atexit

The static keyword looks to me like it prevents the robot from moving also, but I might be wrong.
Is this a Kinetic-only behavior or can you reproduce also in Melodic?

Cheers,
Alex

@christian-rauch
Copy link
Contributor Author

I am not getting the exceptions Unexpected exception caught when initializing trajectory from ROS message data., but I am getting a warning Controller Spawner couldn't find the expected controller_manager ROS interface..

Running rosrun kinova_control move_robot.py j2n6s300 does not have an effect on the robot, with or without that static transform.

@christian-rauch
Copy link
Contributor Author

Running on ROS kinetic from ff024c8 (the commit before merging the removal of the world link) actually produces a bunch of error messages and crashes Gazebo:

[ERROR] [1556201455.495006214, 0.370000000]: GazeboRosControlPlugin missing <legacyModeNS> while using DefaultRobotHWSim, defaults to true.
This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead.
If you do not want to fix this issue in an old package just set <legacyModeNS> to true.
[...]
Qt: Cannot set locale modifiers: 
[ERROR] [1556201455.870615709, 0.631000000]: Could not load controller 'effort_joint_trajectory_controller' because controller type 'effort_controllers/JointTrajectoryController' does not exist.
[ERROR] [1556201455.870645107, 0.631000000]: Use 'rosservice call controller_manager/list_controller_types' to get the available types
Error [Param.cc:451] Unable to set value [-nan -nan -nan] for key[size]
gzclient: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreNode.cpp:630: virtual void Ogre::Node::setScale(const Ogre::Vector3&): Assertion `!inScale.isNaN() && "Invalid vector supplied as parameter"' failed.
[ERROR] [1556201456.871838, 1.616000]: Failed to load effort_joint_trajectory_controller
[INFO] [1556201456.872127, 1.617000]: Loading controller: effort_finger_trajectory_controller
[ERROR] [1556201456.873664433, 1.619000000]: Could not load controller 'effort_finger_trajectory_controller' because controller type 'effort_controllers/JointTrajectoryController' does not exist.
[ERROR] [1556201456.873701346, 1.619000000]: Use 'rosservice call controller_manager/list_controller_types' to get the available types
[ERROR] [1556201457.874854, 2.599000]: Failed to load effort_finger_trajectory_controller
[...]
[gazebo_gui-3] process has died [pid 17043, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/christian/.ros/log/ef7c0c2c-6763-11e9-a564-408d5c587aba/gazebo_gui-3.log].
log file: /home/christian/.ros/log/ef7c0c2c-6763-11e9-a564-408d5c587aba/gazebo_gui-3*.log
[...]
[gazebo-2] escalating to SIGTERM
[j2n6s300/j2n6s300_trajectory_controller-5] escalating to SIGTERM
[WARN] [1556201497.356614, 18.723000]: Controller Spawner error while taking down controllers: transport error completing service call: receive_once[/j2n6s300/controller_manager/switch_controller]: unexpected error [Errno 4] Interrupted system call

Which is the last commit where this used to work as expected?

@christian-rauch
Copy link
Contributor Author

@alexvannobel
I was also unable to move the robot in my application and therefore only defined the root link as static. However, it is still affected by forces in Gazebo. This might as well be an issue in Gazebo. A workaround could be to re-introduce the fixed joint between root and world in a dedicated Gazebo xacro file.

Anyway, this issue is not related to this PR and should be dealt with in a separate PR.

@wxmerkt
Copy link

wxmerkt commented May 10, 2019

Hi, what is the status of this PR? We'd like to use the robot under Melodic.

@christian-rauch
Copy link
Contributor Author

@alexvannobel Is this PR ready for merging?

anqixu pushed a commit to ElementAI/kinova-ros that referenced this pull request Jul 12, 2019
@anqixu
Copy link

anqixu commented Jul 12, 2019

Gazebo support seems to be re-established here:
https://github.com/ElementAI/kinova-ros/commits/melodic

P.S.: while testing with an actual j2s6s300 robot however, we found that the gazebo version's joint 3 could not be moved, and joint 4 was rotated 180'. Also, we found that MoveIt! interactive trajectory planning fails in RViz with j2s6s300, although both of these are separate issues.

@christian-rauch
Copy link
Contributor Author

@alexvannobel After re-adding the fixed world frame for Gazebo, would you consider this PR again?

@alexvannobel
Copy link
Contributor

Hi @christian-rauch ,
I'm aiming at clarifying the branching scheme for this repo in the upcoming days, so most probably this PR won't be merged to master but to another branch that will be created when the scheme will be agreed upon.
I'll let you know soon if you need to change the destination branch or resubmit a PR.
Thanks,
Alex

@alexvannobel
Copy link
Contributor

Hi @christian-rauch ,
I just created the melodic-devel branch. Can you redirect your PR to this branch or close this one and create a new one? I'll probably just merge it and resubmit a PR if I see some bugs.
Thanks,
Alex

@christian-rauch
Copy link
Contributor Author

@alexvannobel There is actually no need to branch off from master or kinect-devel. The melodic branch builds on ROS kinetic and melodic without issues. Most changes in the melodic branch are shown as warnings in kinetic.
A common strategy is to only branch off if the new commits break backward compatibility. Supporting both ROS versions with the same branch reduces the maintenance costs. I would, therefore, propose to merge the melodic branch into the main branch. Maybe it would also make sense to remove either master or kinetic-devel since both are pointing to the same commit.

@alexvannobel alexvannobel merged commit cfb3cc0 into Kinovarobotics:master Aug 12, 2019
@christian-rauch christian-rauch deleted the melodic branch August 12, 2019 12:34
@christian-rauch
Copy link
Contributor Author

@alexvannobel Thanks for merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants