Skip to content

Launching rviz with mavic drone #829

Answered by ygoumaz
MatWaze asked this question in Q&A
Discussion options

You must be logged in to vote

The robot_state_publisher needs the URDF of the robot as parameter to publish links over topics. Here you give the Command(['xacro ', LaunchConfiguration('model')]) xacro file, which doesn't seem to work.
What you can do is tell Webots to publish the URDF of the robot (with links and joints) in the background. You can inspire yourself from other examples like the tiago one for example. Here is the configuration you should use:

robot_state_publisher_node = launch_ros.actions.Node(
  package='robot_state_publisher',
  executable='robot_state_publisher',
  parameters=[{'robot_description': '<robot name=""><link name=""/></robot>'}]
)
mavic_driver = WebotsController(
  robot_name='Mavic_2_PRO',…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatWaze
Comment options

Answer selected by omichel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants