How to debug roslaunch with IDE RoboWare or Visual Code(RotorS MAV gazebo simulator)?

asked 2019-02-07 12:04:56 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello guys,

I installed RotorS the MAV Gazebo simulator and it's worked fine.( link for RotorS) but a trie use Debug in IDE RoboWare and i don't have success how to debug launch file witch RoboWare or Visual Code? Thank's guys

My launch this file: ~/catkin_ws/src/rotors_simulator/rotors_gazebo/launch/mav_hovering_example_with_vi_sensor.launch

image description

My launch file launch in this exactly moment:

 <arg name="mav_name" default="firefly"/>
 <arg name="world_name" default="basic"/>
 <arg name="enable_logging" default="true" />
 <arg name="enable_ground_truth" default="true" />
 <arg name="log_file" default="$(arg mav_name)" />

<env name="GAZEBO_MODEL_PATH" value="${GAZEBO_MODEL_PATH}:$(find rotors_gazebo)/models"/>
<env name="GAZEBO_RESOURCE_PATH" value="${GAZEBO_RESOURCE_PATH}:$(find rotors_gazebo)/models"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
   <arg name="world_name" value="$(find rotors_gazebo)/worlds/$(arg world_name).world" />
   <arg name="debug" value="true"/>
   <arg name="paused" value="true"/>
<!-- <arg name="gui" value="false"/> -->

<group ns="$(arg mav_name)">

 <include file="$(find rotors_gazebo)/launch/spawn_mav.launch">
      <arg name="mav_name" value="$(arg mav_name)" />
      <arg name="model" value="$(find rotors_description)/urdf/mav_with_vi_sensor.gazebo" />
      <arg name="enable_logging" value="$(arg enable_logging)" />
      <arg name="enable_ground_truth" value="$(arg enable_ground_truth)" />
      <arg name="log_file" value="$(arg log_file)"/>
    <node name="lee_position_controller_node" pkg="rotors_control" type="lee_position_controller_node" output="screen">
      <rosparam command="load" file="$(find rotors_gazebo)/resource/lee_controller_$(arg mav_name).yaml" />
      <rosparam command="load" file="$(find rotors_gazebo)/resource/$(arg mav_name).yaml" />
      <remap from="odometry" to="odometry_sensor1/odometry" />
    <node name="hovering_example" pkg="rotors_gazebo" type="hovering_example" output="screen"/>
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

My configuration debug in Roboware(launch.json)

    "version": "0.2.0",
    "configurations": [
            "name": "C++",
            "type": "gdb",
            "request": "launch",
            "target": "${file}",
            "cwd": "${workspaceRoot}",
            "arguments": "roscore"
            "name": "C++ (remote)",
            "type": "gdb",
            "request": "launch",
            "target": "dev${relativeFile}",
            "cwd": "${workspaceRoot}",
            "ssh": {
                "host": "remotehost",
                "user": "remoteuser",
                "keyfile": "/home/user/.ssh/id_rsa",
                "cwd": "/home/remote/ws"
            "name": "Python",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "debugOptions": [
edit retag flag offensive close merge delete