Hacks4ROS / h4r_ev3_ctrl

ROS Node for managing EV3 with ROS Control
GNU General Public License v3.0
21 stars 12 forks source link

Motors not moving #17

Open WardDufraing opened 6 years ago

WardDufraing commented 6 years ago

Hello, I installed the packages to control ev3 then I launched the motors but it doesn't work. I did everything that is mentioned in Geting Started but I can't seem to move my motors. I have tried to use the touch sensor and I can see the incoming data on my pc when I press the sensor.

rostopics: /ev3dev/OutPortA/command /ev3dev/OutPortB/command /ev3dev/joint_states /rosout /rosout_agg /statistics /touch

what command should I be sending? I saw the rostopic pub /ev3dev/OutPortA/command std_msgs/Float64 "data: 5.0" command but this doesn't seem to make my motors move

cyborg-x1 commented 6 years ago

Have you tried rostopic echo on the command topic on the brick? (Test if you can publish Computer -> Brick) Does that work? If not check on ROSIP / DNS etc...

WardDufraing commented 6 years ago

echoing doesn't work but how can it be that Brick -> computer works and Computer -> brick not

WardDufraing commented 6 years ago

I am able to echo the /touch topic and see the data generated by the touch sensor on both my pc and the brick. but when I run the script to see the /ev3dev/OutPortA/command topic I can see it on my pc but it shows me nothing.

WardDufraing commented 6 years ago

when i do rostopic list i get to see al the topics the same as on my pc but when i try to echo one like /touch or /ev3dev/joint_states it takes more than 20minutes to start showing data

cyborg-x1 commented 6 years ago

echoing doesn't work but how can it be that Brick -> computer works and Computer -> brick not

I do not have an Idea about your whole setup but this is a common problem if you have multiple machines running ROS.

If you have DNS you are probably fine - if you don't - setup ROS_IP on all systems. Use ip_address as hostname.

Probably you do not have DNS in your local network. Otherwise it would probably work. (Problem: Brick does not resolve your computers hostname to IP). You could add your computers IP in /etc/hosts or use ROS_IP instead.

Probably ROS_IP is not set on your computer.

On computer do

export ROS_IP=192.168.1.200 #COMPUTERS IP ADDRESS __NOT__ BRICKS!
WardDufraing commented 6 years ago

I used ROS_IP now but it still isn't working. I am running roscore and the launch files on 1 pc and ev3_manager on the brick. It's all still the same result