LogoLogo
Navigate?
  • XXX!
    • Frequently Asked XQuestions
  • YYY!
    • Advanced: Help me troubleshoot weird build problems
    • Advanced: Help me troubleshoot weird camera problems
  • ZZZ!
    • Basic Chatgpt ROS interface
    • Camera Calibration
    • Claw Movement
    • Computer Vision With Yolo8a
    • Connecting to the robot
    • Creating and Executing Launch Files
  • FIIVA
    • Download File From vscode
    • Edge Detection
    • Finding HSV values for any color
    • Finding correct color for line following
    • GPS Data with iPhone (GPS2IP)
    • How can I calculate a better way to rotate?
    • How do I attach a Bluetooth headset?
    • How do I control AWS RoboMaker?
    • How do I control the Arm
    • How do I convert Imagenet to Darknet
    • How do I create a Gazebo world
    • How do I create a ROS UI with TkInter?
    • How do I creating a gazebo world
    • How do I deploy a Pytorch model our cluster?
    • How do I move a file from my vnc and back?
    • How do I read a BDLC motor spec sheet
    • How do I set up AprilTags
    • How do I set up a USB camera?
    • How do I set up the Astra Pro Depth Camera?
    • How do I setup to Coral TPU
    • How do I spawn an animated Human?
    • How do I use Alexa Flask-ASK for ROS
    • How do I use OpenCV and Turtlebot3 Camera
    • How do I use Parameters and Arguments in ROS?
    • How do I use a sigmoid function instead of a PID
    • How do I visualize the contents of a bag
    • How do you use UDP to communicate between computers?
    • How does GPS work?
    • How to Copy a MicroSD
    • How to add an SDF Model
    • How to approach computer vision
    • How to connect to multiple robots
    • How to define and Use your own message types
    • Interbotix Pincher X100 Arm
    • PID-guide.md
    • PX-100 Arm ROS2 Setup
    • Pincer Attachment
    • ROSBridge and ROSLIBJS
    • Recognizing Objects Based on Color and Size using OpenCV
    • Reinforcement Learning and its Applications
    • Robot Arm Transforms
    • Running Multi Robot in Gazebo and Real Robot
    • Simplifying_Lidar.md
    • Spawning Multiple Robots
    • Tips for using OpenCV and Cameras
    • Using ROS2 with Docker
    • What are some Computer Vision Tips
    • What are the ROS Message Types
    • Why does roscd go wrong?
    • Why is my robot not moving?
    • Working with localStorage in React for web clients
    • bouncy-objects.md
    • camera-performance-notes.md
    • camera_pitch.md
    • change_model_color.md
    • communicate-with-rosserial.md
    • contribution-guide.md
    • customize_tb3.md
    • diy-gazebo-world.md
    • fiducial-tips.md
    • fiducial_follows.md
    • gazebo_tf.md
    • gazebo_world.md
    • handy-commands.md
    • how-to-add-texture-to-sdf.md
    • how_to_get_correct_color_for_line_following.md
    • joint-controllers.md
    • laserscan-definition-modify.md
    • launch-files.md
    • lidar_placement_and_drift.md
    • logging.md
    • model_teleportation.md
    • modular_teleop.md
    • multi-robot-one-core.md
    • multirobot-map-merge.md
    • namespacing-tfs.md
    • object_detection_yolo_setup.md
    • publish_commands_to_commandline.md
    • quaternions.md
    • reset-world-gazebo.md
    • robot multitasking
    • ros_and_aws_integration.md
    • rosbridge.md
    • rviz-markers.md
    • sdf_to_urdf.md
    • spawn_model_terminal.md
    • using-conditionals-in-roslaunch.md
    • ROS and TkInter
    • Brandeis Robotics Utility
      • Controlling Robots from VNC
      • BRU Concepts
      • Commands
      • Standard ROSUTILS directory everywhere
      • script.md
    • Cosi119 Final Reports!
      • 2023
        • Autopilot
        • Bowling Bot
        • Cargo Claw
        • Command and Control Dashboard
        • Dynamaze
        • Guard Robot
        • Multi Robot Surveilance
        • Object Sorter
        • Robot Race
        • Typenator
      • 2022
        • NASCAR-style-turtlebot-racing.md
        • RoboTag.md
        • litter_picker.md
        • mini_scouter.md
        • not-play-catch.md
        • Waiterbot
      • 2020
        • Behavior Trees Investigatoin
        • Computer Vision Maze Solver
        • FiducialSLAM.md
        • Gesture Recognition
          • color.md
          • demo.md
          • gestures.md
          • kinect.md
          • kinectv2.md
          • leap-motion.md
          • leap_motion.md
          • local-camera.md
          • ssd.md
        • dangersigns.md
        • pathplanning.md
        • reinforcement-learning-racer.md
        • stalkerbot.md
      • 2019
        • robot-arm.md
      • Sample Project Template
      • past-gen-letters.md
    • Brandeis Rover Cluster
      • intro.md
      • operation-guide
        • architecture.md
        • cluster.md
        • faq.md
        • graphs
        • graphs.md
        • image.md
        • lifecycle.md
        • nodes.md
        • operating
          • cluster.md
          • users.md
        • sources.md
      • user-guide
        • code-editor.md
        • desktop-ui.md
        • getting-started.md
    • Robots in our Lab
      • linorobot
        • Platform Hardware Specs
        • connections.md
        • howto.md
        • stack.md
        • troubleshooting.md
        • validating.md
      • minirover
        • mrbuild.md
        • mrsetup.md
        • mrtroubleshooting.md
        • mruse.md
      • platform
      • platform.md
      • pupper
        • boundary-generation.md
        • controls.md
        • fiducial-detection.md
        • hardware.md
        • introduction.md
        • planning.md
        • software-overview.md
        • software-setup.md
        • testing.md
    • Campus Rover Packages
      • C3 Architecture Notes
      • Campus Rover V 3
      • campus-rover-4
        • Working with TIVAC
        • progress-report.md
      • demos
        • demo-script-fall-2018.md
        • gen2-demo-instructions.md
      • mutant
        • Description of Mutant
        • mutant-usage.md
        • mutantsetup.md
        • raspicam.md
      • navigation
        • costmap-clearing
          • costmap-clearing-part-1.md
          • costmap-clearing-part-2.md
        • cpu-usage-and-errors-in-navigation.md
        • fiducials.md
        • floormapping.md
        • lost-and-found.md
      • nodes.md
      • package-delivery
        • talker-node.md
      • state-management-services.md
      • voice
        • [voice integration.md](./cr-package/voice/voice integration.md)
        • voice-integration.md-.-cr-package-voice-voice-integration.md.md
        • voice.md
      • web-application
        • Integrating using Flask and ROS
        • flask.md
        • livemap.md
    • Lab Infrastructure
      • Tailscale VPN
      • Creating a bootable SSD
      • Danger Signs with Batteries and Chargers
      • How to use the Rover Cluster
      • Setting up SSH on a new robot
      • Turtlebot3s.md
      • copying-robot-sd-cards.md
      • external-ssd-instructions
      • external-ssd-instructions.md
      • linux_terminal_eduroam_setup.md
      • multi-robot-infrastructure.md
      • networking.md
      • our-robots.md
      • private-networking.md
      • ros-melodic.md
      • setup-hints.md
      • ubuntubrandeis.md
    • Our ROS Packages
      • Behavior Trees
        • Nodes
        • Visualization of the behavior Tree
        • basic_movement.md
        • build
          • defining_blackboard.md
          • defining_nodes.md
          • defining_references.md
        • custom_nodes
          • custom_action.md
          • custom_conditional.md
          • custom_update.md
        • included_nodes
          • action_nodes.md
          • conditional_nodes.md
          • included_nodes.md
          • parent_nodes.md
          • update_nodes.md
        • nodes
          • leaf_nodes.md
          • parent_nodes.md
      • Speech Recognition Report
Powered by GitBook

Copyright (c) Brandeis University

On this page
  • Basic Trouble Shooting:
  • Getting onboard a robot
  • How to understand and make a simple launch file:
  • how to turn in a zip submission for class
  • How to simple Git (and create package)
  • Using the Python Object/Class structure
  • More commands for running gazebo simulations:

Was this helpful?

Edit on GitHub
Export as PDF
  1. FIIVA

Why is my robot not moving?

Created by Jeremy Huey 05/04/2023

Basic Trouble Shooting:

Are you connected to roscore? Ensure that roscore is running either in simulation (create a terminal window running '$ roscore') or have run '$ bringup' on an real robot.

If you are onboard a real robot, the window you ran bringup in should say [onboard]. To check that you have the connection, type $ rostopic list. This should output a list of topics the system can see.

Is the battery dead or the hardware not working? Check to see if the battery has died/beeping or if any cables have come loose.

To check to see if the robot is getting commands, you can type in a single cmd_vel message.

$ rostopic pub -r 10 /cmd_vel geometry_msgs/Twist  '{linear:  {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}'

You must ensure there is a space after things like x: . Info here: https://answers.ros.org/question/218818/how-to-publish-a-ros-msg-on-linux-terminal/

Let's say you make a new project and now you cannot find that package, or you try to run your launch file and it gives you the error that it cannot find that package. To check or find out if you have the package you want you can do this: $ roscd package_name This should auto complete. If it does not, you may not have the right package_name as designated in the package.xml. Other packages you may find will send you to opt noetic something. You can likely download these packages to your local somehow.

Getting onboard a robot

Follow the link here to get onboard a robot: https://campus-rover.gitbook.io/lab-notebook/faq/02_connect_to_robot

How to understand and make a simple launch file:

https://campus-rover.gitbook.io/labnotebook/faq/launch_file_create.md

how to turn in a zip submission for class

TAR AND UNTAR ==== How to turn it in: On the VM/VNC, go to System Tools > File Manager. In a terminal window, use to TAR the file: $ tar -czvf foldername.tar.gz foldername

Then inside of the CODE window, you'll see the tar file appear in the vscode file manager. If you right click on a tar file, only this kind of file will seem to give the option to "Download". Do this to download to your computer.

Then, go to your own PC's powershell/terminal. The UNTAR command is = -x.

$ cd .\Downloads\
$ tar -xvkf .\pa2.tar.gz 

Optionally also instead of downloading, you can also On the VM, go to the bottom menu, Internet, use Firefox or Chrome to log into your email or github or whatever to send that way.

How to simple Git (and create package)

go to github.com and get a username and personal key. This key is important, save it somewhere safe where you can get access to it. When asked for a password, this is what you'll place in (as of 2023).

On github.com, you should be able to create a repository do this. Then on your local computer or your CODE window go to the folder where you want to place your files. (In this class, as of 2023, you're recommended to place them in $ cd ~/catkin_ws/src). Then copy the link to the github repo you just made, and run: git clone your_link.git. Make sure you add .git to the end of it. You should now see a copy of it appear on your local computer. In the CODE window, you will see a circular arrow "Refresh Explorer" at the top of the File Explorer side tab.

(Create Package) To create a package run this: $ catkin_create_pkg name_of_my_package std_msgs rospy roscpp replace name_of_my_package with the name you want for your package, eg. dance_pa.

The easiest thing to do when working on these group projects is to split the work up into separate areas/files/commented_segments so that you do not incur merge conflicts. Eg. Abby works on fileA.py, while you work on fileB.py. Or you both work on fileA.py but you comment out a segment line 1-50 for Abby to work, while you work on line51-100.

Once you've made some changes, do this: (Be in the folder you want to make changes to, eg. your package folder.)

git add . //Alternatively, you can specify a folder or file here.
git commit -m "some commit message"
git pull // updates your local to take any new changes. 
git push //pushes your changes to origin/github. 

Using the Python Object/Class structure

If you use a Python class and get an undefined error, you most likely forgot to make that variable a self variable. eg: linear_speed is undefined. change to: self.linear_speed. The same applies to functions and callback cb functions, reminder to place these inside the Class classname: section and to write them as:

import rospy
from geometry_msgs.msg import TransformStamped, Twist
from std_msgs.msg import Bool, String # if you get errors for creating your own publisher, see if you have the right type here.

Class Classname:
    def __init__(self):
        rospy.init_node('main')
        self.linear_speed = 0.0
        self.rate = rospy.Rate(30) # reminder: this must be self. too. 
        self.twist = Twist()
        # CORE pub subs ====
        self.cmd_pub = rospy.Publisher("/cmd_vel", Twist, queue_size=1) 
        self.state_sub = rospy.Subscriber("/state", String, self.state_cb) #self.state_cb

    def state_cb(self, msg):
        self.state = msg.data 
        # when accessing the information, you most likely will need to access .data

    def funcname(self):
        self.linear_speed = 0.3 # This is where you might see the error if you forgot self.
        self.twist.linear.x = self.linear_speed
        self.twist.angular.z = 0.0
        self.cmd_pub.publish(self.twist)

    def run(self):
        while not rospy.is_shutdown():
            self.funcname()
            self.rate.sleep()

if __name__ == '__main__':
c = Classname()
c.run()
# EOF

More commands for running gazebo simulations:

https://campus-rover.gitbook.io/labnotebook/faq/handy-commands.md

PreviousWhy does roscd go wrong?NextWorking with localStorage in React for web clients

Last updated 1 year ago

Was this helpful?