uuvsimulator / uuv_simulator

Gazebo/ROS packages for underwater robotics simulation
https://uuvsimulator.github.io/
Other
694 stars 360 forks source link

Creating a new custom dynamic positioning controller #272

Closed galfunk closed 6 years ago

galfunk commented 6 years ago

Hello try to run roslaunch uuv_tutorial_dp_controller start_tutorial_dp_controller_demo.launch

the following error appears

[INFO] [1531160226.812975, 0.000000]: Calling service /gazebo/spawn_urdf_model [rexrov/tutorial_dp_controller-11] process has died [pid 22836, exit code 1, cmd /home/gal/catkin_ws/src/uuv_simulator/uuv_tutorials/uuv_tutorial_dp_controller/scripts/tutorial_dp_controller.py odom:=pose_gt trajectory:=dp_controller/trajectory input_trajectory:=dp_controller/input_trajectory waypoints:=dp_controller/waypoints error:=dp_controller/error reference:=dp_controller/reference thruster_output:=thruster_manager/input_stamped name:=tutorial_dp_controller log:=/home/gal/.ros/log/486a11ac-83a4-11e8-ac53-9cb6d0f2f06b/rexrov-tutorial_dp_controller-11.log]. log file: /home/gal/.ros/log/486a11ac-83a4-11e8-ac53-9cb6d0f2f06b/rexrov-tutorial_dp_controller-11*.log

any help??

Many thanks

Gal

musamarcusso commented 6 years ago

Hi @galfunk, could you provide the whole output where this error occurs?

galfunk commented 6 years ago

Thank you for your reply, please find the whole output

gal@gal-XPS-15-9560:~$ roslaunch eca_a9_gazebo start_demo_teleop.launch joy_id:=0 ... logging to /home/gal/.ros/log/ba51bd2c-83d8-11e8-ac53-9cb6d0f2f06b/roslaunch-gal-XPS-15-9560-19453.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.

redefining global property: gamma when processing file: /home/gal/catkin/src/eca_a9/eca_a9_description/urdf/eca_a9_sensors.xacro included from: /home/gal/catkin/src/eca_a9/eca_a9_description/robots/eca_a9_default.urdf.xacro started roslaunch server http://gal-XPS-15-9560:45909/

SUMMARY

PARAMETERS

NODES /eca_a9/ finned_uuv_teleop (uuv_teleop/finned_uuv_teleop.py) joystick (joy/joy_node) robot_state_publisher (robot_state_publisher/robot_state_publisher) urdf_spawner (uuv_descriptions/spawn_model.py) / ground_truth_to_tf_eca_a9 (message_to_tf/message_to_tf) recording (rosbag/record) rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[eca_a9/urdf_spawner-1]: started with pid [19474] process[eca_a9/robot_state_publisher-2]: started with pid [19475] process[ground_truth_to_tf_eca_a9-3]: started with pid [19476] process[eca_a9/finned_uuv_teleop-4]: started with pid [19483] process[eca_a9/joystick-5]: started with pid [19500] [ WARN] [1531182762.513436604]: The root link eca_a9/base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. process[rviz-6]: started with pid [19524] process[recording-7]: started with pid [19536] [ INFO] [1531182762.725779339]: rviz version 1.12.16 [ INFO] [1531182762.725864979]: compiled against Qt version 5.5.1 [ INFO] [1531182762.725880571]: compiled against OGRE version 1.9.0 (Ghadamon) [ INFO] [1531182762.937683709]: Stereo is NOT SUPPORTED [ INFO] [1531182762.937769415]: OpenGl version: 3 (GLSL 1.3). spawn_model script started starting FinnedUUVControllerNode.py [INFO] [1531182763.627752, 0.000000]: Loading model xml from ros parameter [INFO] [1531182763.638986, 0.000000]: Waiting for service /gazebo/spawn_urdf_model [INFO] [1531182763.640382, 0.000000]: Calling service /gazebo/spawn_urdf_model FinnedUUVControllerNode: initializing node Thruster #0 - proportional - thrusters/0/input [INFO] [1531182763.711138, 12.544000]: Thruster model:

QMetaObject::invokeMethod: No such method QMenuBar::aboutToShow() [INFO] [1531182764.314355, 12.604000]: Spawn status: SpawnModel: Successfully spawned entity [eca_a9/urdf_spawner-1] process has finished cleanly log file: /home/gal/.ros/log/ba51bd2c-83d8-11e8-ac53-9cb6d0f2f06b/eca_a9-urdf_spawner-1*.log ^C[recording-7] killing on exit [rviz-6] killing on exit [eca_a9/joystick-5] killing on exit [eca_a9/finned_uuv_teleop-4] killing on exit [ground_truth_to_tf_eca_a9-3] killing on exit [eca_a9/robot_state_publisher-2] killing on exit exiting shutting down processing monitor... ... shutting down processing monitor complete done gal@gal-XPS-15-9560:~$ roslaunch uuv_tutorial_dp_controller start_tutorial_dp_controller_demo.launch ... logging to /home/gal/.ros/log/ae609832-8421-11e8-ac53-9cb6d0f2f06b/roslaunch-gal-XPS-15-9560-22284.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://gal-XPS-15-9560:43655/

SUMMARY

PARAMETERS

NODES /rexrov/ ground_truth_to_tf_rexrov (message_to_tf/message_to_tf) robot_state_publisher (robot_state_publisher/robot_state_publisher) thruster_allocator (uuv_thruster_manager/thruster_allocator.py) trajectory_marker_publisher (uuv_control_utils/trajectory_marker_publisher.py) tutorial_dp_controller (uuv_tutorial_dp_controller/tutorial_dp_controller.py) urdf_spawner (uuv_descriptions/spawn_model.py) / gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) publish_world_models (uuv_assistants/publish_world_models.py) rviz (rviz/rviz) world_ned_frame_publisher (tf2_ros/static_transform_publisher)

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

setting /run_id to ae609832-8421-11e8-ac53-9cb6d0f2f06b process[rosout-1]: started with pid [22310] started core service [/rosout] process[gazebo-2]: started with pid [22334] process[gazebo_gui-3]: started with pid [22339] process[world_ned_frame_publisher-4]: started with pid [22344] process[publish_world_models-5]: started with pid [22345] process[rexrov/urdf_spawner-6]: started with pid [22363] process[rexrov/robot_state_publisher-7]: started with pid [22364] process[rexrov/ground_truth_to_tf_rexrov-8]: started with pid [22365] process[rexrov/thruster_allocator-9]: started with pid [22369] process[rexrov/trajectory_marker_publisher-10]: started with pid [22389] [ WARN] [1531214084.212068035]: The root link rexrov/base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. process[rexrov/tutorial_dp_controller-11]: started with pid [22402] process[rviz-12]: started with pid [22419] Gazebo multi-robot simulator, version 7.13.1 Copyright (C) 2012 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

[ INFO] [1531214084.390509735]: rviz version 1.12.16 [ INFO] [1531214084.390633650]: compiled against Qt version 5.5.1 [ INFO] [1531214084.390698695]: compiled against OGRE version 1.9.0 (Ghadamon) Gazebo multi-robot simulator, version 7.13.1 Copyright (C) 2012 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

[ INFO] [1531214084.508542233]: Finished loading Gazebo ROS API Plugin. [Msg] Waiting for master. [ INFO] [1531214084.510832545]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1531214084.510907500]: Finished loading Gazebo ROS API Plugin. [ INFO] [1531214084.511264186]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.104 [Msg] Publicized address: 192.168.1.104 libGL error: failed to create drawable [ INFO] [1531214084.548975861]: Stereo is NOT SUPPORTED [ INFO] [1531214084.549330075]: OpenGl version: 3 (GLSL 1.3). Warning [parser.cc:527] Can not find the XML attribute 'version' in sdf XML tag for model: NED frame. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used Start publishing vehicle footprints to RViz spawn_model script started Traceback (most recent call last): File "/home/gal/catkin_ws/src/uuv_simulator/uuv_tutorials/uuv_tutorial_dp_controller/scripts/tutorial_dp_controller.py", line 24, in from uuv_control_interfaces import DPControllerBase File "/home/gal/catkin_ws/devel/lib/python2.7/dist-packages/uuv_control_interfaces/init.py", line 35, in exec(__fh.read()) File "", line 17, in File "/home/gal/catkin_ws/src/uuv_simulator/uuv_control/uuv_trajectory_control/src/uuv_control_interfaces/sym_vehicle.py", line 17, in import casadi ImportError: No module named casadi Starting trajectory and waypoint marker publisher [INFO] [1531214085.012968, 0.000000]: Loading model xml from ros parameter [INFO] [1531214085.019945, 0.000000]: Waiting for service /gazebo/spawn_urdf_model [INFO] [1531214085.022564, 0.000000]: Calling service /gazebo/spawn_urdf_model New model being published: north Position: [1000, 0, -50] Orientation: [0, 0, 0, 1] Scale: [1, 1, 1] New model being published: west Position: [0, -1000, -50] Orientation: [0, 0, 0, 1] Scale: [1, 1, 1] [rexrov/tutorial_dp_controller-11] process has died [pid 22402, exit code 1, cmd /home/gal/catkin_ws/src/uuv_simulator/uuv_tutorials/uuv_tutorial_dp_controller/scripts/tutorial_dp_controller.py odom:=pose_gt trajectory:=dp_controller/trajectory input_trajectory:=dp_controller/input_trajectory waypoints:=dp_controller/waypoints error:=dp_controller/error reference:=dp_controller/reference thruster_output:=thruster_manager/input_stamped name:=tutorial_dp_controller log:=/home/gal/.ros/log/ae609832-8421-11e8-ac53-9cb6d0f2f06b/rexrov-tutorial_dp_controller-11.log]. log file: /home/gal/.ros/log/ae609832-8421-11e8-ac53-9cb6d0f2f06b/rexrov-tutorial_dp_controller-11*.log [Msg] Loading underwater world... [Msg] Current velocity [m/s] Gauss-Markov process model: [Msg] Mean = 0 Min. Limit = 0 Max. Limit = 5 Mu = 0 Noise Amp. = 0 [Msg] Current velocity horizontal angle [rad] Gauss-Markov process model: [Msg] Mean = 0 Min. Limit = -3.14159 Max. Limit = 3.14159 Mu = 0 Noise Amp. = 0 [Msg] Current velocity horizontal angle [rad] Gauss-Markov process model: [Msg] Mean = 0 Min. Limit = -3.14159 Max. Limit = 3.14159 Mu = 0 Noise Amp. = 0 [Msg] Current velocity topic name: hydrodynamics/current_velocity [Msg] Underwater current plugin loaded! WARNING: Current velocity calculated in the ENU frame [Msg] UnderwaterCurrentROSPlugin::namespace=hydrodynamics [Msg] Spherical coordinates reference=

musamarcusso commented 6 years ago

Hi @galfunk, thanks for the information. It seems that you are missing casadi in your system. This is part of a new implementation but it shouldn't affect other controllers. I will fix this to enforce the use of this package to be optional. If you want to fix this now, you can install casadi using

sudo pip install casadi
galfunk commented 6 years ago

Thanks

galfunk commented 6 years ago

I have another question regarding the option to generate a ROS bag with the recorded simulated data, if I set the flag "true", where the location of the recorded bag file define ?

Thanks again

galfunk commented 6 years ago

I try to install the casadi - unfortunately received sudo: pip: command not found

musamarcusso commented 6 years ago

For pip: to install pip you have to run

sudo apt install python-pip

In the tutorial I forgot to put the option to determine the path to the recording.bag file. Per default it should be stored in your $HOME/.ros folder. If you check the record.launch file, you should be able to see the argument bag_filename with the full path for the ROS bag. I will this add option to the tutorial, though.

galfunk commented 6 years ago

Problem solved