tomlogan501 / robosense_simulator

Package for the simulation of the Robosense sensors
Other
31 stars 13 forks source link

Example.urdf.xacro not spawning the sensor #9

Open miraculin1 opened 6 months ago

miraculin1 commented 6 months ago

In robosense_description/urdf/example.urdf.xacro line 36.

  <RS-16 parent="base_link" name="robosense" topic="/rs_points" hz="20" samples="900" gpu="${gpu}">
    <origin xyz="0 0 0.4" rpy="0 0 0" />
  </RS-16>

Which causes the sensor not correctly spawned.

I thought it should be like this:

<xacro:RS-16 parent="base_link" name="robosense" topic="/rs_points" hz="20" samples="900" gpu="${gpu}">
 <origin xyz="0 0 0.4" rpy="0 0 0"/>
</xacro:RS-16>
tomlogan501 commented 6 months ago

Do you have some logs about it ? Can you create a PR ?

miraculin1 commented 6 months ago

I can make a PR.

When I run roslaunch robosense_description example.launch gpu:=true, this is what I got in rviz: 2024-03-08_17-05 in gazebo: 2024-03-08_17-04

log like this

[rospy.init][INFO] 2024-03-08 17:03:34,813: ROS Slave URI: [http://mira-ubuntu1:38137/]
[rospy.init][INFO] 2024-03-08 17:03:34,813: registered with master
[rospy.rosout][INFO] 2024-03-08 17:03:34,813: initializing /rosout core topic
[xmlrpc][INFO] 2024-03-08 17:03:34,815: xml rpc node: starting XML-RPC server
[rospy.rosout][INFO] 2024-03-08 17:03:34,823: connected to core topic /rosout
[rospy.simtime][INFO] 2024-03-08 17:03:34,827: initializing /clock core topic
[rospy.simtime][INFO] 2024-03-08 17:03:34,835: connected to core topic /clock
[rosout][INFO] 2024-03-08 17:03:34,837: Loading model XML from ros parameter /robot_description
[rosout][INFO] 2024-03-08 17:03:34,843: Waiting for service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2024-03-08 17:03:35,036: topic[/rosout] adding connection to [/rosout], count 0
[rospy.internal][INFO] 2024-03-08 17:03:36,244: topic[/clock] adding connection to [http://mira-ubuntu1:37115/], count 0
[rosout][INFO] 2024-03-08 17:03:36,355: Calling service /gazebo/spawn_urdf_model
[rosout][INFO] 2024-03-08 17:03:36,408: Spawn status: SpawnModel: Successfully spawned entity
[rospy.core][INFO] 2024-03-08 17:03:36,409: signal_shutdown [atexit]
[rospy.internal][INFO] 2024-03-08 17:03:36,410: topic[/rosout] removing connection to /rosout
[rospy.internal][INFO] 2024-03-08 17:03:36,410: topic[/clock] removing connection to http://mira-ubuntu1:37115/
[rospy.impl.masterslave][INFO] 2024-03-08 17:03:36,410: atexit
[rospy.client][INFO] 2024-03-08 17:05:07,658: init_node, name[/spawn_model], pid[29051]
[xmlrpc][INFO] 2024-03-08 17:05:07,658: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2024-03-08 17:05:07,658: Started XML-RPC server [http://mira-ubuntu1:43511/]
[rospy.init][INFO] 2024-03-08 17:05:07,658: ROS Slave URI: [http://mira-ubuntu1:43511/]
[rospy.impl.masterslave][INFO] 2024-03-08 17:05:07,658: _ready: http://mira-ubuntu1:43511/
[rospy.registration][INFO] 2024-03-08 17:05:07,659: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2024-03-08 17:05:07,659: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2024-03-08 17:05:07,759: registered with master
[rospy.rosout][INFO] 2024-03-08 17:05:07,759: initializing /rosout core topic
[rospy.rosout][INFO] 2024-03-08 17:05:07,761: connected to core topic /rosout
[rospy.simtime][INFO] 2024-03-08 17:05:07,762: initializing /clock core topic
[rospy.simtime][INFO] 2024-03-08 17:05:07,762: connected to core topic /clock
[rosout][INFO] 2024-03-08 17:05:07,764: Loading model XML from ros parameter /robot_description
[rosout][INFO] 2024-03-08 17:05:07,771: Waiting for service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2024-03-08 17:05:08,031: topic[/rosout] adding connection to [/rosout], count 0
[rospy.internal][INFO] 2024-03-08 17:05:08,642: topic[/clock] adding connection to [http://mira-ubuntu1:34123/], count 0
[rosout][INFO] 2024-03-08 17:05:08,683: Calling service /gazebo/spawn_urdf_model
[rosout][INFO] 2024-03-08 17:05:08,830: Spawn status: SpawnModel: Successfully spawned entity
[rospy.core][INFO] 2024-03-08 17:05:08,831: signal_shutdown [atexit]
[rospy.internal][INFO] 2024-03-08 17:05:08,832: topic[/rosout] removing connection to /rosout
[rospy.internal][INFO] 2024-03-08 17:05:08,832: topic[/clock] removing connection to http://mira-ubuntu1:34123/
[rospy.impl.masterslave][INFO] 2024-03-08 17:05:08,832: atexit
tomlogan501 commented 6 months ago

On which ROS distro ?

miraculin1 commented 6 months ago

noetic