Comments (5)
Did you try the "Up axis: Z" setting (see https://crazyswarm.readthedocs.io/en/latest/usage.html#optitrack)?
from crazyflie_ros.
Hi, thanks for the answer @whoenig
I'm going to check this https://crazyswarm.readthedocs.io/en/latest/usage.html#optitrack in the morning when i'm in the lab.
In this moment i'm writing a code about the topic for roll, pitch and yaw on vrpn_client_ros.cpp
Doesn't matter that if i use crazyflie_ros and not crazyswarm?, this questions is about the link https://crazyswarm.readthedocs.io/en/latest/usage.html#optitrack
from crazyflie_ros.
The description there applies regardless. Crazyswarm just has OptiTrack support compiled in, while in crazyflie_ros you need to use a separate node/package.
from crazyflie_ros.
Hi @whoenig thanks, all its okay with the frames.
@whoenig I have another issue, i try to do traking on yaw in publish_pose.py but like do you do know
the angles are in quaternions, do you know how can i give the disered to yaw in publish_pose.py?
I trayed the next code but i had an error
`if name == 'main':
rospy.init_node('publish_pose', anonymous=True)
worldFrame = rospy.get_param("~worldFrame", "/world")
name = rospy.get_param("~name")
r = rospy.get_param("~rate")
o = 0
x = 0
y = 0
z = 0.5
rate = rospy.Rate(r)
msg = PoseStamped()
msg.header.seq = 0
msg.header.stamp = rospy.Time.now()
msg.header.frame_id = worldFrame
msg.pose.position.x = x
msg.pose.position.y = y
msg.pose.position.z = z
quaternion = tf.transformations.quaternion_from_euler(0, 0, 0)
msg.pose.orientation.x = quaternion[0]
msg.pose.orientation.y = quaternion[1]
msg.pose.orientation.z = quaternion[2]
msg.pose.orientation.w = quaternion[3]
quaternion = tf.transformations.euler_from_quaternion(0, 0, 0, 0)
msg.pose.orientation.x = euler[0]
msg.pose.orientation.y = euler[1]
pub = rospy.Publisher(name, PoseStamped, queue_size=1)
while not rospy.is_shutdown():
msg.header.seq += 1
o += 0.03
msg.header.stamp = rospy.Time.now()
msg.pose.orientation.z = 90*math.sin(2*3.1416*0.05*o)
pub.publish(msg)
rate.sleep()`
in the last month i did a sine way in Z, but in this were easy because just changed the msg.pose.position, but here i have quaternion and i wiil like that the angles will be euler angles.
Also the first code that i trayed were it
` pub = rospy.Publisher(name, PoseStamped, queue_size=1)
while not rospy.is_shutdown():
msg.header.seq += 1
o += 0.03
msg.header.stamp = rospy.Time.now()
yaw = 90*math.sin(2*3.1416*0.1*o)
pub.publish(msg)
rate.sleep()`
but the crazyflie didn't the task.
thank you @whoenig
from crazyflie_ros.
there are helper functions for the conversion, see http://wiki.ros.org/tf2/Tutorials/Quaternions#Think_in_RPY_then_convert_to_quaternion.
Glad to hear that the frames work for you now!
from crazyflie_ros.
Related Issues (20)
- Failure to launch crazyflie_server.launch with cf firmware: 2020.06 HOT 3
- Failing to log valid LOG_GROUP ctrltarget (setpoint) HOT 2
- Issues about hover_vicon.launch HOT 2
- Roscpp Update Params HOT 2
- Logging Pose Fails HOT 5
- Problems with Vicon and Hovering HOT 6
- Advice on how to use the crazyflie server for low level control HOT 2
- Questions on cmd_vel HOT 1
- Cmake error HOT 4
- Reading Ranger Deck Sensor HOT 4
- 运行crazyswarm中的hove_vicon.launch报错,出现terminate called after throwing an instance of 'std::runtime_error' what(): timeout HOT 1
- Could not find <log> in log toc!
- CMake Error HOT 2
- `LIBUSB_ERROR_ACCESS` What should I DO? HOT 2
- teleop_xbox360.launch,error occurred HOT 5
- Problems about test_high_level
- hover_vicon.launch error HOT 1
- vicon_bridge: zero pose and View frame issue
- The velocity of crazyflie
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crazyflie_ros.