ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have tried running my launch file with debug:=true on the command line.

Unless the launch file your launching defines a debug arg and does something special if you set it to true, that will not make things run in gdb or turn on some debugging infrastructure. I don't see anything in the launch file you include that suggests setting that argument would work.

I have tried adding a gdb prefix to the controller spawner, but that's a Python script and in any case does not contain the executing controller.

If this is using gazebo_ros_control, then the process that is hosting the controller plugins would be gzserver, and it would be that process that you'd have to run in gdb.

empty_world.launch does accept a debug arg (here) and if that is set to true, it will eventually start gzserver in gdb (here).

So to do that, you would have to change:

<include file="$(find gazebo_ros)/launch/empty_world.launch" />

to:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="true" />
</include>

I have tried running my launch file with debug:=true on the command line.

Unless the launch file your launching defines a debug arg and does something special if you set it to true, that will not make things run in gdb or turn on some debugging infrastructure. I don't see anything in the launch file you include that suggests setting that argument would work.

I have tried adding a gdb prefix to the controller spawner, but that's a Python script and in any case does not contain the executing controller.

If this is using gazebo_ros_control, then the process that is hosting the controller plugins would be gzserver, and it would be that process that you'd have to run in gdb.

empty_world.launch does accept a debug arg (here) and if that is set to true, it will eventually start gzserver in gdb (here).

So to do that, you would have to change:

<include file="$(find gazebo_ros)/launch/empty_world.launch" />

to:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="true" />
</include>

Make sure to compile all relevant code with the Debug build type, or backtraces will be useless, but I guess you already know that.

I have tried running my launch file with debug:=true on the command line.

Unless the launch file your launching defines a debug arg and does something special if you set it to true, that will not make things run in gdb or turn on some debugging infrastructure. I don't see anything in the launch file you include that suggests setting that argument would work.

I have tried adding a gdb prefix to the controller spawner, but that's a Python script and in any case does not contain the executing controller.

If this is using gazebo_ros_control, then the process that is hosting the controller plugins would be gzserver, and it would be that process that you'd have to run in gdb.

empty_world.launch does accept a debug arg (here) and if that is set to true, it will eventually start gzserver in gdb (here, via this and then this).

So to do that, you would have to change:

<include file="$(find gazebo_ros)/launch/empty_world.launch" />

to:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="true" />
</include>

Make sure to compile all relevant code with the Debug build type, or backtraces will be useless, but I guess you already know that.