ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
2

RQT GUI for sending control_msgs

asked 2020-02-17 10:44:57 -0600

rickstaa gravatar image

updated 2020-02-17 10:46:53 -0600

I am currently testing out the PID values of an effort_controllers/JointTrajectoryController I created using the ros_control package. I was wondering if there already exists a GUI from which I can send JointTrajectoryController/command messages to this controller or that I need to create a rosnode/rqt_gui myself. I saw such a GUI being used in this video, but I wasn't able to find it online. I tried using the rqt_publisher plugin, but it keeps giving me a # error evaluating as "list" error as I can not get the syntax right.

image description

edit retag flag offensive close merge delete

Comments

1

Hi!

I'm stuck with the same error. Did you managed to solve it? I would like to make one of the joints move following a sinusoidal wave, so it would be nice to have the Message Publisher running.

I passed the points message as a Python list but I cannot find the correct type, I'm getting this on the terminal:

serialization error: field points[] must be of type [trajectory_msgs/JointTrajectoryPoint]

so, the points[] part is a list but it has not the correct format, I gues...

Thank you

lms95 gravatar image lms95  ( 2020-04-29 15:20:29 -0600 )edit
1

Hey @lms95. I was not able to send joint trajectory goals to the joint trajectory controller using the rqt_publisher. I think this is caused by the fact that the expression field is meant for simple expressions, not multi-line messages, or we are using the wrong syntax. In the end, however, I found several other methods of sending goal commands to the joint_trajectory_controller. The first two methods I currently use are the ones given by @gvdhoorn, namely the axclient and the rqt_joint_trajectory_controller. Additionally, I also wrote a small action client from which I could send goal command to the joint trajectory controller. Since you want to send a sinusoidal wave, I think the last option works best in your case. You can find a guide on how to build a simple action client in the actionlib documentation on how to do this.

rickstaa gravatar image rickstaa  ( 2020-05-07 09:55:32 -0600 )edit
1

Lastly, you can of course directly send control commands to a joint_trajectory_controller action service via the terminal by making use of the rostopic pub. While doing this you can use the ROS autocomplete feature to create the action server message for you. I, however, do not know a way to send a sinusoidal using this method. In case you really want to use the rqt_publisher I think it is best to open a separate issue in which you state the exact syntax you are currently using.

rickstaa gravatar image rickstaa  ( 2020-05-07 10:02:02 -0600 )edit

Thanks for the reply! I ended discarding the effort_controller so I get rid of the PID values for the moment and ended publishing via rostopic pub. As my plan was to use MoveIt! everything is OK for me now.

Thank you again!

lms95 gravatar image lms95  ( 2020-05-07 10:45:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-17 11:00:01 -0600

gvdhoorn gravatar image

updated 2020-02-17 11:01:30 -0600

wiki/rqt_joint_trajectory_controller?

Edit: what is shown in the video is the axclient if I'm not mistaken (rosrun actionlib axclient.py).

edit flag offensive delete link more

Comments

@gvdhoorn Thanks a lot! These tools are perfect for testing.

rickstaa gravatar image rickstaa  ( 2020-02-17 15:23:45 -0600 )edit

Based on the recommendations of @gvdhoorn I decided to use the following two tools for tuning my controllers: - wiki/rqt_joint_trajectory_controller - rosrun actionlib axclient.py

rickstaa gravatar image rickstaa  ( 2020-02-17 15:27:35 -0600 )edit

@gvdhoorn Thanks again for your answer! Just one question why did I get -15 karma for this post? The user profile karma or activity tabs don't specify a reason for the karma drop. Is this a side-effect of you having to delete my accepted answer in which I created a summary of your solution to add your comment as the accepted answer? I created this summary because I did not see a way to accept your comment as the accepted answer or could it just be the result of a hidden downvote (-10 karma). I don't mind the karma drop but I am just curious about what I did wrong so I can adhere to the ROS answers guidelines next time.

rickstaa gravatar image rickstaa  ( 2020-02-18 04:04:09 -0600 )edit
1

I converted my comment to an answer and then deselected your answer and selected mine as the answer.

That's why you got a -15.

I assumed that is what you wanted to do yourself, and seeing this:

I created this summary because I did not see a way to accept your comment as the accepted answer

it would seem my assumption was correct.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-18 06:05:41 -0600 )edit

@gvdhoorn Thanks a lot for the explanation. Next time I will wait a bit for summarizing an answer that is given as a comment or ask a moderator to convert it.

rickstaa gravatar image rickstaa  ( 2020-02-18 06:47:32 -0600 )edit

For future reference, in ROS noetic the axclient.py was moved under the ros-noetic-actionlib-tools package.

rickstaa gravatar image rickstaa  ( 2021-05-21 09:26:23 -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

1 follower

Stats

Asked: 2020-02-17 10:44:57 -0600

Seen: 1,081 times

Last updated: Apr 29 '20