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

Sonar sensors topic shows in gazebo topics not in ros topics #61

Open
raomin opened this issue Apr 3, 2019 · 0 comments
Open

Sonar sensors topic shows in gazebo topics not in ros topics #61

raomin opened this issue Apr 3, 2019 · 0 comments

Comments

@raomin
Copy link

raomin commented Apr 3, 2019

Hi, first, I'm new to ROS so it's probably a noob mistake...
I added a libhector_gazebo_ros_sonar to my robot description as follow:

<xacro:property name="SONAR_HEIGHT" value="0.35" />

  <xacro:include filename="$(find hector_sensors_description)/urdf/sonar_sensor.urdf.xacro" />
  <property name="M_PI" value="3.1415926535897931" />
  <xacro:sonar_sensor name="sonar_sensor_zero" parent="link_chassis" ros_topic="sonar" update_rate="5" min_range="0.01" max_range="10" field_of_view="${30*M_PI/180}" ray_count="3">
    <origin xyz="0.0 0.0 ${SONAR_HEIGHT}" rpy="0 0 1.309"/>
  </xacro:sonar_sensor>

When I spawn my robot in the gazebo empty world, I can see a topic for the sonar in gazebo and it publishes proper values:

$ gz topic -l
...
/gazebo/default/lawnbot/link_chassis/sonar_sensor_zero/scan
...

However, in rostopics the sonar topic is missing.

$ rostopic list
/clock
/cmd_vel
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/lb/laser/scan
/odom
/rosout
/rosout_agg
/tf

and I see no error in the ros master logs...

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)

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

setting /run_id to 1bea7888-5626-11e9-8d05-34e6d75a3654
process[rosout-1]: started with pid [14453]
started core service [/rosout]
process[gazebo-2]: started with pid [14456]
process[gazebo_gui-3]: started with pid [14461]
[ INFO] [1554305730.366763778]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1554305730.367947499]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1554305730.419426726]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1554305730.420407117]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1554305734.825188343, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1554305734.842592068, 0.039000000]: Physics dynamic reconfigure ready.
[Err] [REST.cc:205] Error in REST request

libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'
[ INFO] [1554305790.480759050, 55.426000000]: Laser Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1554305790.480839712, 55.426000000]: Starting Laser Plugin (ns = /)
[ INFO] [1554305790.481919458, 55.426000000]: Laser Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1554305790.505892471, 55.426000000]: Starting plugin DiffDrive(ns = //)
[ WARN] [1554305790.505995793, 55.426000000]: DiffDrive(ns = //): missing <rosDebugLevel> default is na
[ INFO] [1554305790.506670621, 55.426000000]: DiffDrive(ns = //): <tf_prefix> =
[ WARN] [1554305790.506788343, 55.426000000]: DiffDrive(ns = //): missing <publishWheelTF> default is false
[ WARN] [1554305790.506810463, 55.426000000]: DiffDrive(ns = //): missing <publishOdomTF> default is true
[ WARN] [1554305790.506834367, 55.426000000]: DiffDrive(ns = //): missing <publishWheelJointState> default is false
[ WARN] [1554305790.506950087, 55.426000000]: DiffDrive(ns = //): missing <wheelAcceleration> default is 0
[ WARN] [1554305790.506975768, 55.426000000]: DiffDrive(ns = //): missing <wheelTorque> default is 5
[ WARN] [1554305790.507071666, 55.426000000]: DiffDrive(ns = //): missing <odometrySource> default is 1
[ WARN] [1554305790.507146784, 55.426000000]: GazeboRosDiffDrive Plugin (ns = ) missing <publishTf>, defaults to 1
[ INFO] [1554305790.507751222, 55.426000000]: DiffDrive(ns = //): Try to subscribe to cmd_vel
[ INFO] [1554305790.509423395, 55.426000000]: DiffDrive(ns = //): Subscribe to cmd_vel
[ INFO] [1554305790.509951925, 55.426000000]: DiffDrive(ns = //): Advertise odom on odom

What am I missing...?

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

No branches or pull requests

1 participant