Commands and pi_robot movement

In lesson 4 we’re supposed to execute 2 commands

rostopic pub /pi_robot/head_tilt_joint_position_controller/command std_msgs/Float64 “data: 0.0”
rostopic pub -1 /pi_robot/head_pan_joint_position_controller/command std_msgs/Float64 “data: 0.7”

Two issues:

  1. How are we supposed to do this? The first command stays running (and gives a “>” prompt, which doesn’t seem to do anything). So I have to use CTRL-C to stop it. I can then run the second command. Am I missing something on how to do this?
  2. When I run the commands in the way I describe above, there is some movement when the commands run. But it doesn’t look anything like the example picture. So it makes me think I’m doing something wrong in step 1.

Thanks for any suggestions.

Hi @comm,

Could you please state the course, unit and exercise/example related to your query?

Apologies - I thought I had asked this in the TF101 forum (I’ve been having problems with the forum saying I’m logged out, and then having to click the “The Construct” logo at the top of the page to get back in - but that’s a different issue).

It’s Chapter 3 (the only one with the pi_robot). And it’s both exercises 3.1a and 3.1b (which is where the commands I listed came from).

(As an aside - it’s a bit confusing that the chapter is labeled “Chapter 3” but the section is titled “4 - Understanding Robot State Publisher and Joint State Publisher”).


1 Like

Thanks for clarifying. Someone will look into it shortly.

You can always log in to the forum by clicking the “?” button at the bottom-right of any of the pages. If you are running a course, it should take you to the course forum.

Thanks for the feedback, we’ll consider it.


I just tested the commands and had no issue really. That issue that you mention on the topics publish normally is because the command wasn’t copied correctly or sometimes the copy system of the browser doesn’t catch all the characters.

I executed the following comands:

I activated the controllers

roslaunch pi_robot_pkg pi_robot_control_norsp.launch

And in another webshell I copied the commands you sent. The first one should move the head up:

rostopic pub /pi_robot/head_tilt_joint_position_controller/command std_msgs/Float64 “data: 0.0”

And this should move the hed sideways

 rostopic pub -1 /pi_robot/head_pan_joint_position_controller/command std_msgs/Float64 "data: 0.7"

There is not much more to it really. Also sometime sin ros topic publish, its better to double tab the contents of the message , because it formats it correctly for the shell:

    rostopic pub -1 /pi_robot/head_pan_joint_position_controller/command std_msgs/Float64 [DOUBLETAB]

Hey, this is in reference to the same exercise as mentioned previously in the thread .
I followed the instructions specifically as mentioned by @duckfrost, however, the pi robot isn’t moving as shown in the example GIF.
Also, if I move a step ahead in the instructions, and run the ‘rosrun rviz rviz’ command on another webshell and open the rviz window, I don’t see any error messages (Which should appear since the tf topic isn’t running). When i see the compilation messages in the webshell (under the rosrun rviz rviz command), it shows a prompt stating, stereo is not supported.
I don’t understand what it means.

Any suggestions? Thank you.

I also ran them in another web shell - my question remains how did you do it? Run one, stop it, and then run the other? My point is that that isn’t clear from how it’s presented. When I did run them I got the same movements as you did. But the little animated GIF shows the right arm going up and down - that’s why I was confused because the movement I saw didn’t look like the movement in the animation. The GIF doesn’t show any head movement. So really it’s the GIF that is wrong.

That’s exactly what I did - but instead of the forum I was getting the error saying I needed to refresh my login. If it happens again I’ll take a screenshot and open up a new general support topic.

Thanks as always for the help - I do appreciate it.


You’re right! So I misunderstood you issue there then. Yeah the GIF is wrong and We will fix that right now ;).

So we are Updateing the GIF to show exactly what should appear.

As for the RVIZ, it apears like in the notebook unless you execute:

roslaunch pi_robot_pkg pi_robot_control.launch

Then it should appear like this:

Updated the gif

Hope it helps

Thanks. That does resolve the main issue.
The other issue - regarding running the two commands, I’m going to assume you just ran the first, stopped it with ctrl-C, and then ran the second. That’s what I had to do and that seemed to work fine.

Yes, you’re right. It worked now.
Thank you :smile:

1 Like