Ask Your Question
0

How to move the robot both in gazebo and rviz?

asked 2018-03-29 23:07:55 -0600

jn-chen gravatar image

Hi everyone, I can make my robot move on gazebo by posting a twist message on cmd_vel. What should I do if I want the robot to move simultaneously in rviz?

edit retag flag offensive close merge delete

Comments

Is this not a duplicate of #q286866?

gvdhoorn gravatar imagegvdhoorn ( 2018-03-30 01:38:08 -0600 )edit

Yes, it is, sir. I just simplify the question and post it again.

jn-chen gravatar imagejn-chen ( 2018-03-30 03:42:18 -0600 )edit

@jn-chen instead of posting a duplicate question, next time just edit your question.

jayess gravatar imagejayess ( 2018-03-30 11:51:32 -0600 )edit

@jayess I am not that familiar with the using of this Q&A forum, just forgot the edit thing when I post this question. After receiving your suggestion, I'll just do so next time.

jn-chen gravatar imagejn-chen ( 2018-03-31 05:03:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-03-30 10:00:08 -0600

ARB gravatar image

Add this to your launch file

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <param name="/use_gui" value="false"/>
        <rosparam param="/source_list">[/your_robot_name/joint_states]</rosparam>
      </node>

gazebo publishes the joint states to /robotname/joint_states topic and rviz listens to /joint_states topic.

source list param takes the values from /robotname/joint_states and publishes to /joint_states

edit flag offensive delete link more

Comments

I just imitate this repo and then robot can move both in rviz and gazebo simultaneously. Thank you!

jn-chen gravatar imagejn-chen ( 2018-04-06 22:05:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-03-29 23:07:55 -0600

Seen: 476 times

Last updated: Mar 30 '18