Skip to content

Turtlebot Waffle Pi from Openmanipulator with Gazebo #76

Open
@Alleekkss

Description

Hello, currently working in ROS Noetic
I have a problem with lifting a can and moving it to another place in Gazebo
The robot model is Turtlebot Waffle Pi from Openmanipulator
I want to do something similar to this repository: https://github.com/AuTURBO/open_manipulator_with_tb3
I already have a script with reaching the right point, all I need is to lift and move the can and if you could I would like to make it so that you detect the Aruco marker using the camera before lifting it
Maybe someone can help with this?

Image

Script with getting to the point:

`#!/usr/bin/env python3

import rospy
from geometry_msgs.msg import PoseStamped

def send_goal(x, y, theta):
# Publisher dla topicu /move_base_simple/goal
goal_pub = rospy.Publisher('/move_base_simple/goal', PoseStamped, queue_size=10)
# Oczekiwanie na połączenie z move_base
rospy.sleep(2)

# Tworzenie celu
goal = PoseStamped()
goal.header.frame_id = "map"
goal.header.stamp = rospy.Time.now()
goal.pose.position.x = x
goal.pose.position.y = y
goal.pose.orientation.z = theta  # Uwaga: pełny kwaternion może być potrzebny

# Publikacja celu
rospy.loginfo(f"Wysyłanie celu: x={x}, y={y}, theta={theta}")
goal_pub.publish(goal)

def main():
rospy.init_node('multi_point_navigation', anonymous=True)

while not rospy.is_shutdown():
    try:
        # Pobieranie współrzędnych od użytkownika
        x = float(input("Podaj współrzędną x: "))
        y = float(input("Podaj współrzędną y: "))
        theta = float(input("Podaj orientację (theta): "))
       
        # Wysyłanie celu
        send_goal(x, y, theta)

        # Pytanie o kontynuację
        cont = input("Czy chcesz wprowadzić kolejny punkt? (t/n): ").strip().lower()
        if cont != 't':
            rospy.loginfo("Koniec wprowadzania punktów.")
            break
    except ValueError:
        rospy.logwarn("Niepoprawny format danych. Spróbuj ponownie.")
    except rospy.ROSInterruptException:
        rospy.loginfo("Przerwano działanie skryptu.")
        break

if name == "main":
main()
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions